2019-02-03 18:58:30 +01:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<ruleset
|
|
|
|
name="PHPCS Coding Standards for Respect"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
|
|
|
|
>
|
|
|
|
<arg name="basepath" value="." />
|
|
|
|
<arg name="cache" value=".phpcs.cache" />
|
|
|
|
<arg name="colors" />
|
|
|
|
<arg name="extensions" value="php,phpt" />
|
|
|
|
<arg value="p" />
|
2019-02-07 19:45:57 +01:00
|
|
|
<arg value="s" />
|
2019-02-03 18:58:30 +01:00
|
|
|
|
|
|
|
<file>library/</file>
|
|
|
|
<file>tests/</file>
|
|
|
|
|
|
|
|
<rule ref="PSR1" />
|
|
|
|
<rule ref="PSR2" />
|
2019-02-07 19:45:57 +01:00
|
|
|
<rule ref="Generic.Arrays.ArrayIndent" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
|
|
|
|
<rule ref="Generic.Formatting.SpaceAfterNot">
|
|
|
|
<properties>
|
|
|
|
<property name="spacing" value="0" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-02-07 20:13:01 +01:00
|
|
|
<rule ref="Generic.NamingConventions.CamelCapsFunctionName" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="Generic.PHP.NoSilencedErrors" />
|
|
|
|
<rule ref="Generic.Strings.UnnecessaryStringConcat">
|
|
|
|
<properties>
|
|
|
|
<property name="allowMultiline" value="true" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
<rule ref="Generic.WhiteSpace.ArbitraryParenthesesSpacing" />
|
2019-02-17 19:41:55 +01:00
|
|
|
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing" />
|
2019-02-07 20:26:40 +01:00
|
|
|
<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation" />
|
2019-02-09 12:57:50 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility" />
|
2019-02-09 12:07:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference" />
|
|
|
|
<rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming" />
|
|
|
|
<rule ref="SlevomatCodingStandard.Classes.SuperfluousTraitNaming" />
|
2019-02-09 13:06:20 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing">
|
|
|
|
<properties>
|
|
|
|
<property name="linesCountBeforeFirstUse" value="0" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-02-09 12:15:13 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition" />
|
2019-02-09 13:17:02 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing">
|
|
|
|
<properties>
|
|
|
|
<property name="tokensToCheck" type="array">
|
|
|
|
<element value="T_RETURN" />
|
|
|
|
</property>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch" />
|
2019-02-09 13:28:08 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison" />
|
2019-02-09 12:27:11 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit" />
|
2019-02-09 13:19:52 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses" />
|
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" />
|
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator" />
|
2019-02-09 13:25:54 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator" />
|
2019-02-09 14:00:53 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator" />
|
|
|
|
<rule ref="SlevomatCodingStandard.Exceptions.DeadCatch" />
|
2019-02-09 11:28:13 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly" />
|
2019-02-09 12:31:09 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Functions.StaticClosure" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue" />
|
2019-02-09 13:31:32 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse" />
|
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceDeclaration" />
|
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceSpacing" />
|
2019-02-09 13:48:17 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
|
|
|
|
<properties>
|
2019-02-17 19:41:55 +01:00
|
|
|
<property name="allowFallbackGlobalConstants" value="false"/>
|
|
|
|
<property name="allowFallbackGlobalFunctions" value="false"/>
|
|
|
|
<property name="allowFullyQualifiedGlobalClasses" value="false"/>
|
|
|
|
<property name="allowFullyQualifiedGlobalConstants" value="false"/>
|
|
|
|
<property name="allowFullyQualifiedGlobalFunctions" value="false"/>
|
|
|
|
<property name="allowFullyQualifiedNameForCollidingClasses" value="true"/>
|
|
|
|
<property name="allowFullyQualifiedNameForCollidingConstants" value="true"/>
|
|
|
|
<property name="allowFullyQualifiedNameForCollidingFunctions" value="true"/>
|
|
|
|
<property name="searchAnnotations" value="true"/>
|
2019-02-09 13:48:17 +01:00
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile" />
|
2019-02-09 12:40:50 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
|
|
|
|
<properties>
|
|
|
|
<property name="searchAnnotations" value="true" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash" />
|
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace" />
|
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias" />
|
2019-02-09 13:34:53 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing" />
|
2019-02-09 12:51:31 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking" />
|
2019-02-09 13:38:56 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.PHP.ShortList" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.PHP.TypeCast" />
|
2019-02-09 12:45:53 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon" />
|
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing" />
|
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing" />
|
2019-02-09 11:44:33 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
|
|
|
<properties>
|
|
|
|
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2" />
|
|
|
|
<property name="spacesCountAroundEqualsSign" value="0" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-02-09 13:42:51 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue" />
|
2019-02-07 21:22:10 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
|
|
|
|
<properties>
|
|
|
|
<property name="allAnnotationsAreUseful" value="true" />
|
|
|
|
<property name="enableEachParameterAndReturnInspection" value="true" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-02-09 11:24:25 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint" />
|
2019-02-09 11:44:33 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable" />
|
2019-02-09 12:54:39 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable" />
|
2019-02-09 11:44:33 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Variables.UselessVariable" />
|
2019-02-07 20:37:23 +01:00
|
|
|
<rule ref="Squiz.PHP.CommentedOutCode" />
|
2019-02-07 21:04:38 +01:00
|
|
|
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
|
|
|
|
<properties>
|
|
|
|
<property name="spacing" value="1" />
|
|
|
|
<property name="spacingBeforeFirst" value="0" />
|
|
|
|
<property name="spacingAfterLast" value="0" />
|
2019-02-07 21:04:16 +01:00
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
<rule ref="Squiz.Strings.ConcatenationSpacing">
|
|
|
|
<properties>
|
|
|
|
<property name="spacing" value="0" />
|
|
|
|
<property name="ignoreNewlines" value="true" />
|
|
|
|
</properties>
|
2019-02-07 20:46:46 +01:00
|
|
|
</rule>
|
2019-02-17 19:41:55 +01:00
|
|
|
<rule ref="Squiz.Strings.DoubleQuoteUsage"/>
|
|
|
|
<rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
|
|
|
|
<message>Variable "%s" not allowed in double quoted string; use sprintf() or concatenation instead</message>
|
|
|
|
</rule>
|
2019-02-07 20:46:46 +01:00
|
|
|
<rule ref="Squiz.WhiteSpace.MemberVarSpacing">
|
|
|
|
<properties>
|
|
|
|
<property name="spacing" value="1" />
|
|
|
|
<property name="spacingBeforeFirst" value="0" />
|
2019-02-07 21:04:38 +01:00
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-02-17 19:41:55 +01:00
|
|
|
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing" />
|
|
|
|
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing" />
|
|
|
|
<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing">
|
|
|
|
<properties>
|
|
|
|
<property name="ignoreNewlines" value="true" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-02-07 20:57:28 +01:00
|
|
|
<rule ref="Squiz.WhiteSpace.OperatorSpacing" />
|
2019-02-17 19:41:55 +01:00
|
|
|
<rule ref="Squiz.WhiteSpace.SemicolonSpacing" />
|
|
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
|
|
|
<properties>
|
|
|
|
<property name="ignoreBlankLines" value="false" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
|
|
|
|
<severity>5</severity>
|
|
|
|
</rule>
|
2019-05-11 19:59:12 +02:00
|
|
|
<rule ref="Symfony.Functions.ScopeOrder" />
|
2019-02-03 18:58:30 +01:00
|
|
|
</ruleset>
|