Closed
Description
Preconditions (*)
- You need code under app/code
Steps to reproduce (*)
- ./vendor/bin/phpcs --standard=./dev/tests/static/framework/Magento/ app/code/
Expected result (*)
- phpcs should report in the terminal all errors and warnings.
Actual result (*)
- Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Sniffs\Annotation\ClassAnnotationStructureSniff::validateAnnotationBlockExists() must be of the type integer, boolean given, called in /var/www/magento2/dev/tests/static/framework/Magento/Sniffs/Annotation/ClassAnnotationStructureSniff.php on line 100 and defined in /var/www/magento2/dev/tests/static/framework/Magento/Sniffs/Annotation/ClassAnnotationStructureSniff.php:76
Solution
For some reason, the functions are using Variable Typing for integers, however some scenarios is sending boolean. I fixed my local removing the variable typing of any "int" in method signature.