当我以 PSR2 ruleset.xml 为例时,我看到很多注释块说<!-- checked in Files/SideEffectsSniff -->
这是来自: https ://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/PSR2/ruleset.xml
<!-- PHP code MUST use only UTF-8 without BOM. -->
<rule ref="Generic.Files.ByteOrderMark"/>
<!-- 2.3. Side Effects -->
<!-- A file SHOULD declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it SHOULD execute logic with side effects, but SHOULD NOT do both. -->
<!-- checked in Files/SideEffectsSniff -->
该文件的其余部分没有类似于Files.SideEffectsSniff
.
我的问题是,是否检查了副作用?如果是的话,什么规则对此负责?
谢谢你的澄清。