Add phpunit in composer
Refactor types