Change phpcs config

This commit is contained in:
Dennis Eichhorn 2018-02-03 10:30:54 +01:00
parent 952f442a7a
commit df114587ba

View File

@ -2,6 +2,7 @@
<ruleset name="default">
<description></description>
<exclude-pattern>*.tpl.php</exclude-pattern>
<exclude-pattern>*Routes.php</exclude-pattern>
<arg value="q"/>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
@ -10,12 +11,17 @@
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.Commenting.Fixme"/>
<rule ref="Generic.Commenting.Todo">
<severity>3</severity>
</rule>
<rule ref="Generic.Commenting.Fixme">
<severity>3</severity>
</rule>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Files.ByteOrderMark"/>
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Files.LineLength">
<severity>3</severity>
<properties>
<property name="lineLimit" value="150"/>
<property name="absoluteLineLimit" value="250"/>
@ -33,6 +39,7 @@
<property name="complexity" value="15"/>
<property name="absoluteComplexity" value="25"/>
</properties>
<exclude-pattern>*Measurement.php</exclude-pattern><!-- Very simple switch statements -->
</rule>
<rule ref="Generic.Metrics.NestingLevel">
<properties>
@ -43,6 +50,7 @@
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.NamingConventions.CamelCapsFunctionName">
<severity>3</severity>
<exclude-pattern>*StringUtils.php</exclude-pattern><!-- Implements missing default functions -->
<exclude-pattern>*FinanceFormulas.php</exclude-pattern><!-- Correct name is more important than rule -->
<exclude-pattern>*StockBonds.php</exclude-pattern><!-- Correct name is more important than rule -->
@ -62,6 +70,7 @@
<rule ref="PEAR.Functions.ValidDefaultValue"/>
<rule ref="PSR1.Classes.ClassDeclaration"/>
<rule ref="PSR1.Files.SideEffects">
<severity>3</severity>
<exclude-pattern>*Pdf.php</exclude-pattern><!-- Just a wrapper -->
<exclude-pattern>*Excel.php</exclude-pattern><!-- Just a wrapper -->
<exclude-pattern>*/tests/*</exclude-pattern><!-- Tests don't always have side effects -->
@ -79,7 +88,7 @@
<rule ref="Squiz.Scope.StaticThisUsage"/>
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing"/>
<!--<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing"/> multiline object operator should be valid e.g. -> -->
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>