I just figured out neither #phpstan nor #phpcodesniffer reported that a class was differrent from the file it is in. I bet it's a setting somewhere that my quick search didn't find...

BTW #PHPStorm with the defaults didn't report it either... (again may be there's a checkbox somewhere in the settings)...

PSR2.Classes.PropertyDeclaration.Multiple is just not having it with property hooks.

#PHP #PHPCodeSniffer

Every couple of weeks, I find myself checking on #PHPCodeSniffer to see if there's a new release that supports readonly classes in PHP.

It looks like it's now part of the 3.8.0 milestone. Yay! Fingers crossed that's coming soon. 🀞

https://github.com/squizlabs/PHP_CodeSniffer/milestone/31

GitHub - squizlabs/PHP_CodeSniffer: PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. - GitHub - squizlabs/PHP_CodeSniffer: PHP_CodeSniffer tokenizes PHP files and detects violations of ...

GitHub