Skip to content

Commit

Permalink
More strict phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
pepakriz committed Oct 15, 2014
1 parent 154f205 commit e839070
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions build/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Functions.CallTimePassByReference"/>
<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
<rule ref="PEAR.Classes.ClassDeclaration"/>
<rule ref="PEAR.Commenting.InlineComment"/>
Expand All @@ -23,37 +23,27 @@
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
<rule ref="Squiz.PHP.NonExecutableCode"/>
<rule ref="Squiz.Scope.StaticThisUsage"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
<message>Variable "%s" not allowed in double quoted string; use sprintf() instead</message>
</rule>
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace"/>
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1"/>
</properties>
<exclude name="Squiz.WhiteSpace.FunctionSpacing.After"/><!-- does not allow PHPUnit ignore comments -->
</rule>
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.MemberVarSpacing"/>
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing">
<exclude name="Squiz.WhiteSpace.ObjectOperatorSpacing.Before"/><!-- clashes in multiline calls -->
<exclude name="Squiz.WhiteSpace.ObjectOperatorSpacing.Before"/>
</rule>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<exclude name="Squiz.WhiteSpace.OperatorSpacing.SpacingBefore"/><!-- does not work for operators on beginning of the line -->
<exclude name="Squiz.WhiteSpace.OperatorSpacing.SpacingBefore"/>
</rule>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
<rule ref="PSR2">
<exclude name="Generic.Files.LineLength"/><!-- can not be suppressed -->
<exclude name="PEAR.Functions.ValidDefaultValue"/><!-- we want to allow null as "default" value -->
<exclude name="PSR2.Classes.ClassDeclaration"/><!-- we want whitespace around class body and rules for extends and implements, using PEAR instead -->
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/><!-- we want to put first expression of multiline condition on next line -->
<exclude name="PSR2.ControlStructures.SwitchDeclaration.caseIndent"/><!-- checked by more generic Generic.WhiteSpace.ScopeIndent.Incorrect -->
<exclude name="PSR2.ControlStructures.SwitchDeclaration.defaultIndent"/><!-- checked by more generic Generic.WhiteSpace.ScopeIndent.Incorrect -->
<exclude name="PSR2.Methods.FunctionCallSignature.ContentAfterOpenBracket"/><!-- we want to allow comments -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.NewlineBeforeOpenBrace"/><!-- clashes with OpeningFunctionBraceBsdAllman -->
<exclude name="Generic.PHP.LowerCaseConstant"/>
<exclude name="Generic.Files.LineLength"/>
<exclude name="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody"/>
</rule>
</ruleset>

0 comments on commit e839070

Please sign in to comment.