Mac OS PHPStorm settings.
<?xml version="1.0"?>
<ruleset name="CustomStandard">
<rule ref="PSR2">
<!-- 隐藏命名空间反白 -->
<!-- <exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/> -->
<!-- 隐藏行代码字符数超出反白 -->
<exclude name="Generic.Files.LineLength"/>
</rule>
<rule ref="PSR1">
<!-- 隐藏蛇形命名法反白 -->
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
</rule>
</ruleset>
phpstorm > Preferences > Inspections
, 展开PHP > Quality tools
, 选中PHP_CodeSniffer validation
, 点击右侧的Coding standard
的...
, 选择保存的文件.- 点击右侧的
Coding standard
的下拉框, 选择custom
.