我正在处理一个专有的遗留代码库,一些变量是驼峰式的,而另一些是蛇形的。我想清理并仅强制执行驼峰变量名,但我似乎无法找到它的嗅探。这是我的自定义规则集的内容。Theruleset.xmlstandardcontains68sniffsGeneric(22sniffs)-------------------Generic.Classes.DuplicateClassNameGeneric.CodeAnalysis.ForLoopShouldBeWhileLoopGeneric.CodeAnalysis.UnconditionalIfStatementGeneric.CodeAnalysis
是否有一个PHPCS编码标准可以检查正确的注释(@param、@return、@throws等)出现在文档block中,包括它们之间的适当间距? 最佳答案 尝试运行以下命令,看看它是否产生您想要的结果:phpcs/path/to/code--standard=Squiz--sniffs=Squiz.Commenting.FunctionComment,Squiz.Commenting.FunctionCommentThrowTag,Squiz.Commenting.ClassComment,Squiz.Commenting.File
是否有一个PHPCS编码标准可以检查正确的注释(@param、@return、@throws等)出现在文档block中,包括它们之间的适当间距? 最佳答案 尝试运行以下命令,看看它是否产生您想要的结果:phpcs/path/to/code--standard=Squiz--sniffs=Squiz.Commenting.FunctionComment,Squiz.Commenting.FunctionCommentThrowTag,Squiz.Commenting.ClassComment,Squiz.Commenting.File