我得到了 PHP 代码嗅探器 2.6.0。我正在使用 phpcs,它工作正常。我在 PHP 5.2.17 有一个巨大的项目,2000 多个类,它将迁移到 5.6.20。我想首先关注使用不推荐使用的 PHP 函数重构类。我试图只运行 Generic.PHP.DeprecatedFunctions 和 Squiz.PHP.ForbiddenFunctions 嗅探,但没有运气。使用了命令:
phpcs --standard=Squiz --sniffs=Squiz.PHP.ForbiddenFunctions /path/to/class
我得到了错误:
错误:选项“--sniffis=Squiz.PHP.ForbiddenFunctions”未知。
我错过了什么?
对不起,我的英语不好。