Fix phpcs
This commit is contained in:
parent
5f639f611a
commit
e8ba312d2a
@ -75,10 +75,13 @@
|
|||||||
<!-- Warning if action on same line than if -->
|
<!-- Warning if action on same line than if -->
|
||||||
<!--
|
<!--
|
||||||
<rule ref="Generic.ControlStructures.InlineControlStructure">
|
<rule ref="Generic.ControlStructures.InlineControlStructure">
|
||||||
<properties> <property name="error" value="false"/> </properties>
|
<properties>
|
||||||
|
<property name="error" value="false"/>
|
||||||
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!-- PHP code MUST use only UTF-8 without BOM. -->
|
<!-- PHP code MUST use only UTF-8 without BOM. -->
|
||||||
<rule ref="Generic.Files.ByteOrderMark"/>
|
<rule ref="Generic.Files.ByteOrderMark"/>
|
||||||
|
|
||||||
@ -97,8 +100,11 @@
|
|||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<!-- To disallow several statements on same line -->
|
<!-- Disallow several statements on same line -->
|
||||||
<!-- <rule ref="Generic.Formatting.DisallowMultipleStatements" /> -->
|
<!-- We want to allow 'if () { ...small code... }' on same line for better code compacity and readability -->
|
||||||
|
<rule ref="Generic.Formatting.DisallowMultipleStatements">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<!-- Have 2 chars padding maximum and always show as errors -->
|
<!-- Have 2 chars padding maximum and always show as errors -->
|
||||||
<!--
|
<!--
|
||||||
@ -112,13 +118,17 @@
|
|||||||
<rule ref="Generic.Functions.CallTimePassByReference" />
|
<rule ref="Generic.Functions.CallTimePassByReference" />
|
||||||
|
|
||||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
|
||||||
|
|
||||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma"> <!-- We don't want this rule, we want to be able to align params on several similare functions on different lines -->
|
|
||||||
|
<!-- Disallow several spaces after comma -->
|
||||||
|
<!-- We want to allow this because we want to be able to align params on several similare functions on different lines -->
|
||||||
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
@ -152,7 +162,10 @@
|
|||||||
<rule ref="Generic.PHP.ForbiddenFunctions" />
|
<rule ref="Generic.PHP.ForbiddenFunctions" />
|
||||||
|
|
||||||
<!-- Warning when using @ before functions -->
|
<!-- Warning when using @ before functions -->
|
||||||
<!-- <rule ref="Generic.PHP.NoSilencedErrors" /> -->
|
<!-- We want this. Some features need this -->
|
||||||
|
<rule ref="Generic.PHP.NoSilencedErrors">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<!-- Say if null, true, false must be uppercase (Rule 2.5 of PSR2 https://www.php-fig.org/psr/psr-2/) -->
|
<!-- Say if null, true, false must be uppercase (Rule 2.5 of PSR2 https://www.php-fig.org/psr/psr-2/) -->
|
||||||
<rule ref="Generic.PHP.LowerCaseConstant" />
|
<rule ref="Generic.PHP.LowerCaseConstant" />
|
||||||
@ -169,6 +182,7 @@
|
|||||||
<!-- Check indent are done with spaces and with correct number -->
|
<!-- Check indent are done with spaces and with correct number -->
|
||||||
<!-- Disabled as this does not support tab -->
|
<!-- Disabled as this does not support tab -->
|
||||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||||
|
|
||||||
<arg name="tab-width" value="4"/>
|
<arg name="tab-width" value="4"/>
|
||||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||||
<properties>
|
<properties>
|
||||||
@ -177,6 +191,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
|
||||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||||
|
|
||||||
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
|
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
|
||||||
@ -317,22 +332,29 @@
|
|||||||
|
|
||||||
<rule ref="PEAR.Commenting.InlineComment" />
|
<rule ref="PEAR.Commenting.InlineComment" />
|
||||||
|
|
||||||
<!-- <rule ref="PEAR.ControlStructures.ControlSignature" /> -->
|
<!-- Check position of { after a control structure like if (), while (), etc... -->
|
||||||
|
<!--
|
||||||
|
<rule ref="PEAR.ControlStructures.ControlSignature" />
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- <rule ref="PEAR.ControlStructures.MultiLineCondition" /> -->
|
<!-- <rule ref="PEAR.ControlStructures.MultiLineCondition" /> -->
|
||||||
|
|
||||||
<!-- Test if () are removed for includes -->
|
<!-- Test if () are removed for includes -->
|
||||||
<rule ref="PEAR.Files.IncludingFile" />
|
<rule ref="PEAR.Files.IncludingFile" />
|
||||||
|
|
||||||
<!-- Disable some error messages that we do not want. -->
|
<!-- Disable some error messages that we do not want. -->
|
||||||
|
|
||||||
<rule ref="PEAR.Files.IncludingFile.UseInclude">
|
<rule ref="PEAR.Files.IncludingFile.UseInclude">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
<!-- TODO Enable this test. We should use require for include in prior of include when out of if -->
|
||||||
<rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
|
<rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
<rule ref="PEAR.Files.IncludingFile.UseRequire">
|
<rule ref="PEAR.Files.IncludingFile.UseRequire">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
<!-- TODO Enable this test. We should use require for include in prior of include when out of if -->
|
||||||
<rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
|
<rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
@ -341,12 +363,15 @@
|
|||||||
|
|
||||||
<rule ref="PEAR.Functions.FunctionCallSignature" />
|
<rule ref="PEAR.Functions.FunctionCallSignature" />
|
||||||
|
|
||||||
|
<!-- TODO Enable this test. -->
|
||||||
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
|
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
<!-- TODO Enable this test. -->
|
||||||
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
|
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
|
<rule ref="PEAR.Functions.FunctionCallSignature.EmptyLine">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user