I see phpcs -standard=wordpress works fine but in the case of phpcbf it throws fatal error. It does not hapen when I use phpcbf without WordPress standard.
The issue happens when running this command:
➜ ~ phpcbf --standard=WordPress /Users/muhammadzaki/"Local Sites"/max-slider/app/public/wp-content/plugins/rex-slider/public/class-rex-slider-public.php
Error I am seeing:
PHP Fatal error: Uncaught PHP_CodeSniffer\Exceptions\RuntimeException: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/muhammadzaki/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php on line 280 in /Users/muhammadzaki/.composer/vendor/squizlabs/php_codesniffer/src/Runner.php:604
I am using php 8.2
installed latest phpcs and wpcs from GitHub.
I see phpcs -standard=wordpress works fine but in the case of phpcbf it throws fatal error. It does not hapen when I use phpcbf without WordPress standard.
The issue happens when running this command:
➜ ~ phpcbf --standard=WordPress /Users/muhammadzaki/"Local Sites"/max-slider/app/public/wp-content/plugins/rex-slider/public/class-rex-slider-public.php
Error I am seeing:
PHP Fatal error: Uncaught PHP_CodeSniffer\Exceptions\RuntimeException: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/muhammadzaki/wpcs/WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php on line 280 in /Users/muhammadzaki/.composer/vendor/squizlabs/php_codesniffer/src/Runner.php:604
I am using php 8.2
installed latest phpcs and wpcs from GitHub.