Reputation: 39
squizlabs/php_codesniffer/bin/phpcbf fails with this error:
php vendor/squizlabs/php_codesniffer/bin/phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/customModule PHP Fatal error: Uncaught PHP_CodeSniffer\Exceptions\RuntimeException: $stackPtr is not a class member var in \vendor\squizlabs\php_codesniffer\src\Files\File.php:1888
Upvotes: 0
Views: 20
Reputation: 39
$stackPtr is not a class member var in \vendor\squizlabs\php_codesniffer\src\Files\File.php:1888. It is generally thrown when the parser doesn't find the matching brackets during sniff, however it can be confusing what is causing the issue.
If the number of files are too large to pin point the error causing file, we can print and check the $this->path above this line \vendor\squizlabs\php_codesniffer\src\Files\File.php:1888.
Upvotes: 0