|
20 | 20 | PHPCompatibility sniffs to check for PHP cross-version incompatible code. |
21 | 21 | https://github.com/PHPCompatibility/PHPCompatibility |
22 | 22 | --> |
23 | | - <config name="testVersion" value="7.1-"/> |
| 23 | + <config name="testVersion" value="7.3-"/> |
24 | 24 | <rule ref="PHPCompatibility"/> |
25 | 25 |
|
| 26 | + <!-- |
| 27 | + Generic sniffs |
| 28 | + https://github.com/squizlabs/PHP_CodeSniffer/tree/master/src/Standards/Generic/Sniffs |
| 29 | + --> |
| 30 | + <rule ref="Generic.Arrays"> |
| 31 | + <exclude name="Generic.Arrays.DisallowShortArraySyntax"/> |
| 32 | + </rule> |
| 33 | + <rule ref="Generic.Classes.DuplicateClassName"/> |
| 34 | + <rule ref="Generic.CodeAnalysis"/> |
| 35 | + <rule ref="Generic.Commenting"/> |
| 36 | + <rule ref="Generic.ControlStructures"> |
| 37 | + <exclude name="Generic.ControlStructures.DisallowYodaConditions"/> |
| 38 | + </rule> |
| 39 | + <rule ref="Generic.Files"> |
| 40 | + <exclude name="Generic.Files.EndFileNoNewline"/> |
| 41 | + <exclude name="Generic.Files.LowercasedFilename"/> |
| 42 | + </rule> |
| 43 | + <rule ref="Generic.Files.LineLength"> |
| 44 | + <properties> |
| 45 | + <property name="lineLimit" value="120"/> |
| 46 | + <property name="absoluteLineLimit" value="120"/> |
| 47 | + </properties> |
| 48 | + </rule> |
| 49 | + <rule ref="Generic.Formatting"> |
| 50 | + <exclude name="Generic.Formatting.NoSpaceAfterCast"/> |
| 51 | + </rule> |
| 52 | + <rule ref="Generic.Functions"> |
| 53 | + <exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/> |
| 54 | + </rule> |
| 55 | + <rule ref="Generic.Metrics"/> |
| 56 | + <rule ref="Generic.NamingConventions"> |
| 57 | + <exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps"/> |
| 58 | + </rule> |
| 59 | + <rule ref="Generic.PHP"> |
| 60 | + <exclude name="Generic.PHP.ClosingPHPTag"/> |
| 61 | + <exclude name="Generic.PHP.UpperCaseConstant"/> |
| 62 | + </rule> |
| 63 | + <rule ref="Generic.Strings"/> |
| 64 | + <rule ref="Generic.WhiteSpace"> |
| 65 | + <exclude name="Generic.WhiteSpace.DisallowSpaceIndent"/> |
| 66 | + </rule> |
| 67 | + |
| 68 | + <!-- |
| 69 | + Squiz Labs sniffs |
| 70 | + https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties |
| 71 | + --> |
| 72 | + <rule ref="Squiz.Arrays.ArrayBracketSpacing"/> |
| 73 | + <rule ref="Squiz.Classes"/> |
| 74 | + <rule ref="Squiz.Commenting"> |
| 75 | + <exclude name="Squiz.Commenting.ClosingDeclarationComment"/> |
| 76 | + <exclude name="Squiz.Commenting.ClassComment.TagNotAllowed"/> |
| 77 | + <exclude name="Squiz.Commenting.FileComment"/> |
| 78 | + <exclude name="Squiz.Commenting.LongConditionClosingComment"/> |
| 79 | + <exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing"/> |
| 80 | + <exclude name="Squiz.Commenting.FunctionCommentThrowTag.WrongNumber"/> |
| 81 | + </rule> |
| 82 | + <rule ref="Squiz.Commenting.FunctionComment"> |
| 83 | + <exclude-pattern>tests/*\.php</exclude-pattern> |
| 84 | + </rule> |
| 85 | + <rule ref="Squiz.ControlStructures"/> |
| 86 | + <rule ref="Squiz.Functions"> |
| 87 | + <exclude name="Squiz.Functions.MultiLineFunctionDeclaration.NewlineBeforeOpenBrace"/> |
| 88 | + <exclude name="Squiz.ControlStructures.InlineIfDeclaration.NoBrackets"/> |
| 89 | + </rule> |
| 90 | + <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> |
| 91 | + <properties> |
| 92 | + <property name="equalsSpacing" value="1"/> |
| 93 | + </properties> |
| 94 | + </rule> |
| 95 | + <rule ref="Squiz.Operators"> |
| 96 | + <exclude name="Squiz.Operators.ComparisonOperatorUsage.NotAllowed"/> |
| 97 | + <exclude name="Squiz.Operators.ComparisonOperatorUsage.ImplicitTrue"/> |
| 98 | + </rule> |
| 99 | + <rule ref="Squiz.PHP"> |
| 100 | + <exclude name="Squiz.PHP.DisallowComparisonAssignment.AssignedComparison"/> |
| 101 | + <exclude name="Squiz.PHP.DisallowInlineIf.Found"/> |
| 102 | + <exclude name="Squiz.PHP.DisallowBooleanStatement.Found"/> |
| 103 | + </rule> |
| 104 | + <rule ref="Squiz.Scope"/> |
| 105 | + <rule ref="Squiz.Strings"/> |
| 106 | + <rule ref="Squiz.WhiteSpace"> |
| 107 | + <exclude name="Squiz.WhiteSpace.FunctionClosingBraceSpace"/> |
| 108 | + <exclude name="Squiz.WhiteSpace.FunctionSpacing"/> |
| 109 | + <exclude name="Squiz.WhiteSpace.ObjectOperatorSpacing"/> |
| 110 | + </rule> |
| 111 | + <rule ref="Squiz.WhiteSpace.FunctionSpacing"> |
| 112 | + <properties> |
| 113 | + <property name="spacing" value="1"/> |
| 114 | + <property name="spacingBeforeFirst" value="0"/> |
| 115 | + <property name="spacingAfterLast" value="0"/> |
| 116 | + </properties> |
| 117 | + </rule> |
26 | 118 | </ruleset> |
0 commit comments