PHP代码嗅探器能告诉我违反了哪条规则以及如何关闭它吗?

PHP代码嗅探器能告诉我违反了哪条规则以及如何关闭它吗?,php,laravel,codesniffer,Php,Laravel,Codesniffer,是否有可能让嗅探器输出规则已被破坏,因此我可以更改配置的哪一行以阻止出现这些违规行为 e、 g.我收到了大量与数组相关的违规行为,但我对数组缩进感到满意。我如何找到规则以及如何禁用它 谢谢 494 | ERROR | [x] Array double arrow not aligned correctly; expected | | 20 space(s) but found 1 495 | ERROR | [x] Array key not aligned c

是否有可能让嗅探器输出规则已被破坏,因此我可以更改配置的哪一行以阻止出现这些违规行为

e、 g.我收到了大量与数组相关的违规行为,但我对数组缩进感到满意。我如何找到规则以及如何禁用它

谢谢

 494 | ERROR | [x] Array double arrow not aligned correctly; expected
     |       |     20 space(s) but found 1
 495 | ERROR | [x] Array key not aligned correctly; expected 19
     |       |     spaces but found 12
 495 | ERROR | [x] Array double arrow not aligned correctly; expected
     |       |     22 space(s) but found 1
 496 | ERROR | [x] Array key not aligned correctly; expected 19
     |       |     spaces but found 12
 496 | ERROR | [x] Array double arrow not aligned correctly; expected
     |       |     25 space(s) but found 1
 497 | ERROR | [x] Array key not aligned correctly; expected 19
     |       |     spaces but found 12

使用
-s
参数,它列在中的“打印完整和摘要报告”下

e、 g.
phpcs-s myfile.php

要回答问题的第二部分,有多种方法可以忽略特定的嗅探。您可以使用注释和
phpcs:disable
语法进行内联操作,也可以使用命令行参数排除特定的嗅探,这似乎更符合您的需要:


phpcs--exclude=Generic.PHP.LowerCaseConstant,Some.Other.Rule myfile.PHP

您如何调用它
phpcs-s myfile.php
噢-这是规则,谢谢!我看了医生,答应过,我回答了。希望能帮助别人。