在终端运行命令后,我在 Linux Mint 上安装了 composer 和 phpcs
phpcs --standard=WordPress-VIP class-wpeka-auto-updater.php
它引发以下错误
PHP Fatal error: Uncaught PHP_CodeSniffer_Exception: Referenced sniff "Generic.PHP.DisallowAlternativePHPTags" does not exist in /home/.config/composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php:1086
Stack trace:
#0 /home/.config/composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php(733): PHP_CodeSniffer->_expandRulesetReference(Object(SimpleXMLElement), '/home/w...', 2)
#1 /home/.config/composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php(1099): PHP_CodeSniffer->processRuleset('/home/w...', 2)
#2 /home/.config/composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php(733): PHP_CodeSniffer->_expandRulesetReference('/home/w...', '/home/w...', 0)
#3 /home/.config/composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php(551): PHP_CodeSniffer->processRuleset('/home/w...')
#4 /home/.config/composer/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.php(830): PHP_CodeSniffer->initStandard(Array, Array)
#5 /home/.config/comp in /home/.config/composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php on line 1086