Use phpstan to improve code quality
robertfausk opened this issue · 2 comments
robertfausk commented
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.
kevinkhill commented
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.
kevinkhill commented
Thanks @AntonLazarev!