[英]Class not found PHP Code Sniffer
I am using PHP_CodeSniffer to clean my project code.我正在使用 PHP_CodeSniffer 来清理我的项目代码。
But below error occurred while validating a class file.但是在验证类文件时发生以下错误。 I got the latest version 2.3.4 PHP_CodeSniffer here .
我在这里获得了最新版本 2.3.4 PHP_CodeSniffer。
I am using windows machine with the below command.我正在使用带有以下命令的 Windows 机器。
Error : "Class Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff not found"
How to resolve this.如何解决这个问题。
I got the solution for this issue.我得到了这个问题的解决方案。
The class file was missed on the path路径中缺少类文件
"C:\xampp\htdocs\PHP_CodeSniffer-2.3.4\PHP_CodeSniffer-2.3.4\CodeSniffer\Standards\Generic\Sniffs\Functions"
I placed the class with the file name "OpeningFunctionBraceBsdAllmanSniff.php"
at the same path.我将文件名为
"OpeningFunctionBraceBsdAllmanSniff.php"
的类放在同一路径中。
Now I can use the PHP Code Sniffer to validate my files.现在我可以使用 PHP Code Sniffer 来验证我的文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.