kevinkhill/php-duration

Use phpstan to improve code quality

robertfausk opened this issue · 2 comments

see: https://github.com/phpstan/phpstan

e.g. new Duration() expects null via type hint which throws phpstan violations in projects using:

$duration = new Duration(60);

when these projects use phpstan. At least in latest stable version ;) In master it is fixed.

e.g. 2: $housPerDay in constructor doesn't have a type hint.

I've wanted to play with phpstan/psalm/phan but don't seem to ever have the time. If you want to integrate it into the project and add composer scripts to run it, I would happily accept a pull request.