Closed mrmukaoy closed 6 years ago
I receive the following any time I type a character in a PHP file:
[Linter] Error running PHPCS Error: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /usr/local/bin/wpcs/WordPress/Sniffs/WP/I18nSniff.php on line 234 PHP Stack trace: PHP 1. {main}() /usr/local/bin/phpcs:0 PHP 2. PHP_CodeSniffer_CLI->runphpcs() /usr/local/bin/phpcs:6 PHP 3. PHP_CodeSniffer_CLI->process() phar:///usr/local/bin/phpcs/CodeSniffer/CLI.php:113 PHP 4. PHP_CodeSniffer->processFile() phar:///usr/local/bin/phpcs/CodeSniffer/CLI.php:1016 PHP 5. PHP_CodeSniffer->_processFile() phar:///usr/local/bin/phpcs/CodeSniffer.php:1772 PHP 6. PHP_CodeSniffer_File->start() phar:///usr/local/bin/phpcs/CodeSniffer.php:1894 PHP 7. WordPress_Sniffs_WP_I18nSniff->process() phar:///usr/local/bin/phpcs/CodeSniffer/File.php:576 PHP 8. WordPress_Sniffs_WP_I18nSniff->check_argument_tokens() /usr/local/bin/wpcs/WordPress/Sniffs/WP/I18nSniff.php:208 at ChildProcess.<anonymous> (/Users/myoakum/.atom/packages/linter-phpcs/node_modules/sb-exec/lib/index.js:56:20) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
You should report this on WordPress-Coding-Standards, the error is simply being forwarded from phpcs.
phpcs
I receive the following any time I type a character in a PHP file: