|
11 | 11 | <arg name="extensions" value="php"/> |
12 | 12 | <arg value="s"/> |
13 | 13 | <arg value="p"/> |
| 14 | + <rule ref="vendor/wmde/fundraising-phpcs/WMDE/Fundraising" /> |
14 | 15 |
|
15 | | - <!--<rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki/Sniffs/WhiteSpace">--> |
16 | | - <!--<exclude name="vendor/mediawiki/mediawiki-codesniffer/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeSingleLineCommentSniff.php" />--> |
17 | | - <!--</rule>--> |
18 | | - |
19 | | - <rule ref="Generic.Arrays.DisallowLongArraySyntax" /> |
20 | | - <rule ref="Generic.Classes" /> |
21 | | - <rule ref="Generic.CodeAnalysis"> |
22 | | - <exclude name="Generic.CodeAnalysis.EmptyStatement" /> |
23 | | - <exclude name="Generic.CodeAnalysis.UnusedFunctionParameter" /> |
24 | | - <exclude name="Generic.CodeAnalysis.AssignmentInCondition.Found" /> |
25 | | - </rule> |
26 | | - <rule ref="Generic.ControlStructures" /> |
27 | | - |
28 | | - <rule ref="Generic.Files.ByteOrderMark" /> |
29 | | - <rule ref="Generic.Files.LineEndings" /> |
30 | | - <rule ref="Generic.Files.LineLength"> |
31 | | - <properties> |
32 | | - <!-- https://github.com/squizlabs/PHP_CodeSniffer/issues/1094 --> |
33 | | - <property name="lineLimit" value="170" /> |
34 | | - <property name="absoluteLineLimit" value="170" /> |
35 | | - </properties> |
36 | | - </rule> |
37 | | - |
38 | | - <rule ref="Generic.Formatting.DisallowMultipleStatements" /> |
39 | | - |
40 | | - <rule ref="Generic.Functions.CallTimePassByReference" /> |
41 | | - <rule ref="Generic.Functions.FunctionCallArgumentSpacing" /> |
42 | | - |
43 | | - <rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" /> |
44 | | - |
45 | | - <rule ref="Generic.Metrics.NestingLevel"> |
46 | | - <properties> |
47 | | - <property name="nestingLevel" value="3" /> |
48 | | - <property name="absoluteNestingLevel" value="3" /> |
49 | | - </properties> |
50 | | - </rule> |
51 | | - |
52 | | - <rule ref="Generic.Metrics.CyclomaticComplexity"> |
53 | | - <properties> |
54 | | - <property name="complexity" value="10" /> |
55 | | - <property name="absoluteComplexity" value="10" /> |
56 | | - </properties> |
57 | | - </rule> |
58 | | - |
59 | | - <rule ref="Generic.NamingConventions" /> |
60 | | - <!-- TODO: create variation of this sniff that allows underscores in test methods --> |
61 | | - <rule ref="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps"> |
62 | | - <!-- Exclude test methods like "testGivenInvalidInput_methodThrowsException". --> |
63 | | - <exclude-pattern>*Test\.php</exclude-pattern> |
64 | | - </rule> |
65 | | - |
66 | | - <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag" /> |
67 | | - <rule ref="Generic.PHP.DeprecatedFunctions" /> |
68 | | - <rule ref="Generic.PHP.DisallowShortOpenTag" /> |
69 | | - <rule ref="Generic.PHP.ForbiddenFunctions" /> |
70 | | - <rule ref="Generic.PHP.LowerCaseConstant" /> |
71 | | - <rule ref="Generic.PHP.LowerCaseKeyword" /> |
72 | | - <rule ref="Generic.PHP.SAPIUsage" /> |
73 | | - |
74 | | - <rule ref="Generic.WhiteSpace.DisallowSpaceIndent" /> |
75 | | - |
76 | | - <rule ref="PSR1" /> |
77 | | - <!-- TODO: create variation of this sniff that allows underscores in test methods --> |
78 | | - <rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"> |
79 | | - <!-- Exclude test methods like "testGivenInvalidInput_methodThrowsException". --> |
80 | | - <exclude-pattern>*Test\.php</exclude-pattern> |
81 | | - </rule> |
82 | | - |
83 | | - <rule ref="PSR2.Classes.PropertyDeclaration" /> |
84 | | - <rule ref="PSR2.ControlStructures.ElseIfDeclaration" /> |
85 | | - <rule ref="PSR2.Namespaces" /> |
86 | | - |
87 | | - <rule ref="Squiz.Arrays.ArrayBracketSpacing" /> |
88 | | - <rule ref="Squiz.CSS.SemicolonSpacing" /> |
89 | | - <rule ref="Squiz.Classes.DuplicateProperty" /> |
90 | | - <rule ref="Squiz.Classes.SelfMemberReference" /> |
91 | | - <rule ref="Squiz.Classes.ValidClassName" /> |
92 | | - <rule ref="Squiz.Functions.FunctionDuplicateArgument" /> |
93 | | - <rule ref="Squiz.Functions.GlobalFunction" /> |
94 | | - <rule ref="Squiz.Scope" /> |
95 | | - |
96 | | - <rule ref="Squiz.Strings.DoubleQuoteUsage" /> |
97 | | - <rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar"> |
98 | | - <severity>0</severity> |
99 | | - </rule> |
100 | | - |
101 | | - <rule ref="Squiz.WhiteSpace.CastSpacing" /> |
102 | | - <rule ref="Squiz.WhiteSpace.LanguageConstructSpacing" /> |
103 | | - <rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing" /> |
104 | | - |
105 | | - <rule ref="Squiz.WhiteSpace.OperatorSpacing"> |
106 | | - <properties> |
107 | | - <property name="ignoreNewlines" value="true" /> |
108 | | - </properties> |
109 | | - <exclude name="Squiz.WhiteSpace.OperatorSpacing.NoSpaceBefore" /> |
110 | | - <exclude name="Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfter" /> |
111 | | - </rule> |
112 | | - |
113 | | - <rule ref="Squiz.WhiteSpace.ScopeClosingBrace" /> |
114 | | - <rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing" /> |
115 | | - <rule ref="Squiz.WhiteSpace.SemicolonSpacing" /> |
116 | | - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" /> |
117 | | - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"> |
118 | | - <severity>0</severity> |
119 | | - </rule> |
120 | | - |
121 | | - <rule ref="Zend.Files.ClosingTag" /> |
122 | | - |
123 | | - <!-- Using 3rd party sniff while Squiz isn't there, yet. https://github.com/squizlabs/PHP_CodeSniffer/issues/911 --> |
124 | | - <rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DeclareStrictTypesSniff.php" /> |
125 | | - <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> |
126 | | - <properties> |
127 | | - <property name="newlinesCountBetweenOpenTagAndDeclare" value="2" /> |
128 | | - <property name="spacesCountAroundEqualsSign" value="1" /> |
129 | | - </properties> |
130 | | - </rule> |
131 | | - |
132 | | - <rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/ReturnTypeHintSpacingSniff.php" /> |
133 | | - |
134 | | - <rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/TypeHintDeclarationSniff.php"> |
135 | | - <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification" /> |
136 | | - <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversablePropertyTypeHintSpecification" /> |
137 | | - <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification" /> |
138 | | - <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingPropertyTypeHint" /> |
139 | | - </rule> |
140 | | - |
141 | | - <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration"> |
142 | | - <properties> |
143 | | - <property name="usefulAnnotations" type="array" value=" |
144 | | - @see, |
145 | | - @throws, |
146 | | - @expectedException, |
147 | | - @expectedExceptionMessage, |
148 | | - @dataProvider, |
149 | | - @slowThreshold, |
150 | | - @noinspection, |
151 | | - @SuppressWarnings |
152 | | - "/> |
153 | | - <property name="enableVoidTypeHint" value="false" /> |
154 | | - </properties> |
155 | | - </rule> |
156 | | - |
157 | | - <rule ref="./vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Namespaces/UseDoesNotStartWithBackslashSniff.php" /> |
158 | | - |
159 | | - <!-- MediaWiki.WhiteSpace.SpaceyParenthesis replica for up-to-date codesniffer version --> |
160 | | - <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> |
161 | | - <properties> |
162 | | - <property name="equalsSpacing" value="1" /> |
163 | | - <property name="requiredSpacesAfterOpen" value="1" /> |
164 | | - <property name="requiredSpacesBeforeClose" value="1" /> |
165 | | - </properties> |
166 | | - </rule> |
167 | | - |
168 | | - <rule ref="PEAR.Functions.FunctionCallSignature"> |
169 | | - <properties> |
170 | | - <property name="requiredSpacesAfterOpen" value="1" /> |
171 | | - <property name="requiredSpacesBeforeClose" value="1" /> |
172 | | - </properties> |
173 | | - <exclude name="PEAR.Functions.FunctionCallSignature.Indent" /> |
174 | | - <exclude name="PEAR.Functions.FunctionCallSignature.OpeningIndent" /> |
175 | | - <exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" /> |
176 | | - <exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" /> |
177 | | - </rule> |
178 | 16 | </ruleset> |
0 commit comments