|
| 1 | +<?xml version="1.0"?> |
| 2 | +<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 | + xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"> |
| 4 | + |
| 5 | + <arg name="basepath" value="."/> |
| 6 | + <arg name="cache" value=".phpcs-cache"/> |
| 7 | + <arg name="colors"/> |
| 8 | + <arg name="extensions" value="php"/> |
| 9 | + <arg name="parallel" value="10"/> |
| 10 | + <arg name="encoding" value="utf-8"/> |
| 11 | + <arg name="tab-width" value="4"/> |
| 12 | + <!-- Show progress --> |
| 13 | + <arg value="sp"/> |
| 14 | + |
| 15 | + <file>src</file> |
| 16 | + |
| 17 | + <rule ref="Generic"> |
| 18 | + <exclude name="Generic.Arrays.ArrayIndent"/> <!-- see below --> |
| 19 | + <exclude name="Generic.Arrays.DisallowShortArraySyntax"/> |
| 20 | + <exclude name="Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"/> |
| 21 | + <exclude name="Generic.CodeAnalysis.EmptyStatement"/> <!-- see below --> |
| 22 | + <exclude name="Generic.CodeAnalysis.JumbledIncrementer"/> |
| 23 | + <exclude name="Generic.Commenting"/> <!-- see below --> |
| 24 | + <exclude name="Generic.Files.EndFileNoNewline"/> |
| 25 | + <exclude name="Generic.Files.LineLength"/> |
| 26 | + <exclude name="Generic.Files.LowercasedFilename"/> |
| 27 | + <exclude name="Generic.Formatting.DisallowMultipleStatements"/> |
| 28 | + <exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning"/> |
| 29 | + <exclude name="Generic.Formatting.NoSpaceAfterCast"/> |
| 30 | + <exclude name="Generic.Formatting.SpaceBeforeCast"/> |
| 31 | + <exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman"/> |
| 32 | + <exclude name="Generic.Metrics.CyclomaticComplexity"/> <!-- see below --> |
| 33 | + <exclude name="Generic.NamingConventions.AbstractClassNamePrefix"/> |
| 34 | + <exclude name="Generic.NamingConventions.CamelCapsFunctionName"/> |
| 35 | + <exclude name="Generic.NamingConventions.InterfaceNameSuffix"/> |
| 36 | + <exclude name="Generic.NamingConventions.TraitNameSuffix"/> |
| 37 | + <exclude name="Generic.PHP.ClosingPHPTag"/> |
| 38 | + <exclude name="Generic.PHP.UpperCaseConstant"/> |
| 39 | + <exclude name="Generic.Strings.UnnecessaryStringConcat"/> |
| 40 | + <exclude name="Generic.WhiteSpace.DisallowSpaceIndent"/> |
| 41 | + <exclude name="Generic.WhiteSpace.ScopeIndent"/> <!-- see below --> |
| 42 | + |
| 43 | + <!-- temporary --> |
| 44 | + <exclude name="Generic.CodeAnalysis.UnusedFunctionParameter"/> |
| 45 | + <exclude name="Generic.Metrics.NestingLevel"/> |
| 46 | + </rule> |
| 47 | + <rule ref="Generic.Arrays.ArrayIndent"> |
| 48 | + <properties> |
| 49 | + <property name="indent" value="4"/> |
| 50 | + </properties> |
| 51 | + <type>warning</type> |
| 52 | + </rule> |
| 53 | + <rule ref="Generic.CodeAnalysis.EmptyStatement"> |
| 54 | + <type>warning</type> |
| 55 | + </rule> |
| 56 | + <rule ref="Generic.Commenting"> |
| 57 | + <type>warning</type> |
| 58 | + </rule> |
| 59 | + <rule ref="Generic.Formatting.SpaceAfterNot"> |
| 60 | + <properties> |
| 61 | + <property name="spacing" value="0"/> |
| 62 | + </properties> |
| 63 | + </rule> |
| 64 | + <rule ref="Generic.Metrics.CyclomaticComplexity"> |
| 65 | + <type>warning</type> |
| 66 | + <severity>2</severity> |
| 67 | + </rule> |
| 68 | + <rule ref="Generic.WhiteSpace.ScopeIndent"> |
| 69 | + <properties> |
| 70 | + <property name="indent" value="4"/> |
| 71 | + <property name="tabIndent" value="false"/> |
| 72 | + </properties> |
| 73 | + </rule> |
| 74 | + |
| 75 | + <rule ref="PSR1"/> |
| 76 | + |
| 77 | + <rule ref="PSR12.Classes"> |
| 78 | + <exclude name="PSR12.Classes.OpeningBraceSpace"/> |
| 79 | + <exclude name="PSR12.Classes.AnonClassDeclaration"/> |
| 80 | + </rule> |
| 81 | + <rule ref="PSR12.Functions"/> |
| 82 | + <rule ref="PSR12.Keywords"/> |
| 83 | + <rule ref="PSR12.Namespaces"/> |
| 84 | + |
| 85 | + <rule ref="PEAR.Commenting.InlineComment"/> |
| 86 | + <rule ref="PEAR.Functions.ValidDefaultValue"/> |
| 87 | + <rule ref="PEAR.WhiteSpace.ObjectOperatorIndent"> |
| 88 | + <properties> |
| 89 | + <property name="indent" value="4"/> |
| 90 | + </properties> |
| 91 | + </rule> |
| 92 | + |
| 93 | + <rule ref="Squiz.Arrays.ArrayBracketSpacing"/> |
| 94 | + <rule ref="Squiz.Classes.LowercaseClassKeywords"/> |
| 95 | + <rule ref="Squiz.Classes.SelfMemberReference"/> |
| 96 | + <rule ref="Squiz.Commenting.DocCommentAlignment"/> |
| 97 | + <rule ref="Squiz.Commenting.FunctionCommentThrowTag"/> |
| 98 | + <rule ref="Squiz.ControlStructures.ForEachLoopDeclaration"/> |
| 99 | + <rule ref="Squiz.ControlStructures.LowercaseDeclaration"/> |
| 100 | + <rule ref="Squiz.Functions.FunctionDuplicateArgument"/> |
| 101 | + <rule ref="Squiz.Functions.FunctionDuplicateArgument"/> |
| 102 | + <rule ref="Squiz.Functions.LowercaseFunctionKeywords"/> |
| 103 | + <rule ref="Squiz.Scope.StaticThisUsage"/> |
| 104 | + <rule ref="Squiz.Strings.DoubleQuoteUsage"/> |
| 105 | + <rule ref="Squiz.Strings.EchoedStrings"/> |
| 106 | + <rule ref="Squiz.WhiteSpace.CastSpacing"/> |
| 107 | + <rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/> |
| 108 | + <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/> |
| 109 | + <rule ref="Squiz.WhiteSpace.SemicolonSpacing"/> |
| 110 | +</ruleset> |
0 commit comments