Add more tests

This commit is contained in:
Dennis Eichhorn 2018-02-28 20:39:16 +01:00
parent 70f334fd6f
commit a0792d8691

View File

@ -7,6 +7,7 @@
<exclude-pattern>*/vendor/*</exclude-pattern> <exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/Routes/*</exclude-pattern> <exclude-pattern>*/Routes/*</exclude-pattern>
<arg value="q"/> <arg value="q"/>
<arg name="colors"/>
<rule ref="Generic.Classes.DuplicateClassName"/> <rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/> <rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/> <rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
@ -21,9 +22,29 @@
<severity>3</severity> <severity>3</severity>
</rule> </rule>
<rule ref="Generic.ControlStructures.InlineControlStructure"/> <rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowAlternativePHPTags"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.DiscourageGoto"/>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array" value="delete=>unset,print=>echo,create_function=>null" />
</properties>
</rule>
<rule ref="Generic.Files.ByteOrderMark"/> <rule ref="Generic.Files.ByteOrderMark"/>
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Files.LineLength"> <rule ref="Generic.Files.LineLength">
<rule ref="Generic.Files.OneTraitPerFile"/>
<rule ref="Generic.Files.OneInterfacePerFile"/>
<rule ref="Generic.Files.OneClassPerFile"/>
<rule ref="Generic.Files.OneObjectStructurePerFile"/>
<rule ref="Generic.Files.LineEndings">
<properties>
<property name="eolChar" value="\n"/>
</properties>
</rule>
<rule ref="Generic.Debug.ESLint"/>
<rule ref="Generic.Debug.CSSLint"/>
<rule ref="Generic.Debug.JSHint"/>
<severity>3</severity> <severity>3</severity>
<properties> <properties>
<property name="lineLimit" value="150"/> <property name="lineLimit" value="150"/>
@ -36,7 +57,6 @@
<rule ref="Generic.Formatting.MultipleStatementAlignment"/> <rule ref="Generic.Formatting.MultipleStatementAlignment"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/> <rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Functions.CallTimePassByReference"/> <rule ref="Generic.Functions.CallTimePassByReference"/>
<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
<rule ref="Generic.Metrics.CyclomaticComplexity"> <rule ref="Generic.Metrics.CyclomaticComplexity">
<properties> <properties>
<property name="complexity" value="15"/> <property name="complexity" value="15"/>
@ -67,10 +87,7 @@
</properties> </properties>
</rule> </rule>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/> <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="MySource.PHP.EvalObjectFactory"/> <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="MySource.PHP.GetRequestData">
<exclude-pattern>*Request.php</exclude-pattern>
</rule>
<rule ref="PEAR.Classes.ClassDeclaration"/> <rule ref="PEAR.Classes.ClassDeclaration"/>
<rule ref="PEAR.Commenting.FunctionComment"> <rule ref="PEAR.Commenting.FunctionComment">
<exclude-pattern>*/tests/*</exclude-pattern><!-- Tests don't need comments --> <exclude-pattern>*/tests/*</exclude-pattern><!-- Tests don't need comments -->
@ -79,8 +96,8 @@
<rule ref="PEAR.ControlStructures.ControlSignature"/> <rule ref="PEAR.ControlStructures.ControlSignature"/>
<rule ref="PEAR.ControlStructures.MultiLineCondition"/> <rule ref="PEAR.ControlStructures.MultiLineCondition"/>
<rule ref="PEAR.Functions.ValidDefaultValue"/> <rule ref="PEAR.Functions.ValidDefaultValue"/>
<rule ref="PSR1.Classes.ClassDeclaration"/>
<rule ref="PSR1.Files.SideEffects"> <rule ref="PSR1.Files.SideEffects">
<rule ref="PSR1.Classes.ClassDeclaration"/>
<severity>3</severity> <severity>3</severity>
<exclude-pattern>*Pdf.php</exclude-pattern><!-- Just a wrapper --> <exclude-pattern>*Pdf.php</exclude-pattern><!-- Just a wrapper -->
<exclude-pattern>*Excel.php</exclude-pattern><!-- Just a wrapper --> <exclude-pattern>*Excel.php</exclude-pattern><!-- Just a wrapper -->
@ -95,6 +112,24 @@
<rule ref="PSR2.Methods.MethodDeclaration"/> <rule ref="PSR2.Methods.MethodDeclaration"/>
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/> <rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
<rule ref="PSR2.Namespaces.UseDeclaration"/> <rule ref="PSR2.Namespaces.UseDeclaration"/>
<rule ref="MySource.Objects.AssignThis"/>
<rule ref="MySource.PHP.EvalObjectFactory"/>
<rule ref="MySource.PHP.GetRequestData">
<exclude-pattern>*Request.php</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.DuplicateProperty"/>
<rule ref="Squiz.CSS.DuplicateStyleDefinition"/>
<rule ref="Squiz.CSS.EmptyClassDefinition"/>
<rule ref="Squiz.CSS.EmptyStyleDefinition"/>
<rule ref="Squiz.CSS.Indentation"/>
<rule ref="Squiz.CSS.LowercaseStyleDefinition"/>
<rule ref="Squiz.CSS.MissingColon"/>
<rule ref="Squiz.CSS.ShorthandSize"/>
<rule ref="Squiz.Functions.GlobalFunction">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.PHP.ForbiddenFunctions"/>
<rule ref="Squiz.PHP.GlobalKeyword"/>
<rule ref="Squiz.PHP.NonExecutableCode"/> <rule ref="Squiz.PHP.NonExecutableCode"/>
<rule ref="Squiz.Scope.StaticThisUsage"/> <rule ref="Squiz.Scope.StaticThisUsage"/>
<rule ref="Squiz.WhiteSpace.CastSpacing"/> <rule ref="Squiz.WhiteSpace.CastSpacing"/>