1<?xml version="1.0"?>
2<ruleset
3        name="croct/math"
4        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5        xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
6>
7    <description>The coding standard for antlr/antlr4-php-runtime.</description>
8
9    <config name="installed_paths" value="../../slevomat/coding-standard/SlevomatCodingStandard"/>
10
11    <arg name="basepath" value="."/>
12    <arg name="extensions" value="php"/>
13    <arg name="colors" />
14
15    <!-- show progress of the run and show sniff names -->
16    <arg value="ps"/>
17
18    <!-- Force array element indentation with 4 spaces -->
19    <rule ref="Generic.Arrays.ArrayIndent"/>
20    <!-- Disallow `array(...)` -->
21    <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
22    <!-- Disallow duplicate classes -->
23    <rule ref="Generic.Classes.DuplicateClassName"/>
24    <!-- Disallow empty statements -->
25    <rule ref="Generic.CodeAnalysis.EmptyStatement">
26        <!-- But allow empty catch -->
27        <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
28    </rule>
29    <!-- Disallow final methods in final classes -->
30    <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
31    <!-- Disallow useless empty method overrides -->
32    <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
33    <!-- Disallow inline HTML in PHP code -->
34    <rule ref="Generic.Files.InlineHTML"/>
35    <!-- Warn about lines longer than 120 chars -->
36    <rule ref="Generic.Files.LineLength">
37        <properties>
38            <property name="lineLimit" value="120" />
39        </properties>
40    </rule>
41    <!-- Align corresponding assignment statement tokens -->
42    <rule ref="Generic.Formatting.MultipleStatementAlignment">
43        <properties>
44            <property name="maxPadding" value="1" />
45            <property name="error" value="true"/>
46        </properties>
47    </rule>
48    <!-- Force whitespace after a type cast -->
49    <rule ref="Generic.Formatting.SpaceAfterCast"/>
50    <!-- Disallow PHP 4 constructors -->
51    <rule ref="Generic.NamingConventions.ConstructorName"/>
52    <!-- Disallow backtick operator -->
53    <rule ref="Generic.PHP.BacktickOperator"/>
54    <!-- Disallow any content before opening tag -->
55    <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/>
56    <!-- Disallow deprecated functions -->
57    <rule ref="Generic.PHP.DeprecatedFunctions"/>
58    <!-- Disallow alias functions, i.e. `sizeof()`, `delete()` -->
59    <rule ref="Generic.PHP.ForbiddenFunctions">
60        <properties>
61            <property name="forbiddenFunctions" type="array">
62                <element key="chop" value="rtrim"/>
63                <element key="close" value="closedir"/>
64                <element key="compact" value="null"/>
65                <element key="delete" value="unset"/>
66                <element key="doubleval" value="floatval"/>
67                <element key="extract" value="null"/>
68                <element key="fputs" value="fwrite"/>
69                <element key="ini_alter" value="ini_set"/>
70                <element key="is_double" value="is_float"/>
71                <element key="is_integer" value="is_int"/>
72                <element key="is_long" value="is_int"/>
73                <element key="is_null" value="null"/>
74                <element key="is_real" value="is_float"/>
75                <element key="is_writeable" value="is_writable"/>
76                <element key="join" value="implode"/>
77                <element key="key_exists" value="array_key_exists"/>
78                <element key="pos" value="current"/>
79                <element key="settype" value="null"/>
80                <element key="show_source" value="highlight_file"/>
81                <element key="sizeof" value="count"/>
82                <element key="strchr" value="strstr"/>
83            </property>
84        </properties>
85    </rule>
86    <!-- Force PHP 7 param and return types to be lowercased -->
87    <rule ref="Generic.PHP.LowerCaseType"/>
88    <!-- Disallow `php_sapi_name()` function -->
89    <rule ref="Generic.PHP.SAPIUsage"/>
90    <!-- Disallow useless inline string concatenation -->
91    <rule ref="Generic.Strings.UnnecessaryStringConcat">
92        <!-- But multiline is useful for readability -->
93        <properties>
94            <property name="allowMultiline" value="true"/>
95        </properties>
96    </rule>
97
98    <!-- PEAR sniffs -->
99
100    <!-- Disallow comments starting with # -->
101    <rule ref="PEAR.Commenting.InlineComment"/>
102
103    <!-- PSR-2 sniffs -->
104
105    <!-- PSR-2 coding standard (base) -->
106    <rule ref="PSR2">
107        <!-- Checked by SlevomatCodingStandard.Namespaces.UseSpacing -->
108        <exclude name="PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse"/>
109        <!-- Checked by SlevomatCodingStandard.Namespaces.NamespaceSpacing -->
110        <exclude name="PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"/>
111        <!-- Checked by Croct.NamingConvention.CamelCapsMethodNameSniff -->
112        <exclude name="PSR1.Methods.CamelCapsMethodName"/>
113    </rule>
114    <!-- Disallow `else if` in favor of `elseif` -->
115    <rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed">
116        <type>error</type>
117    </rule>
118
119    <!-- SlevomatCodingStandard sniffs -->
120
121    <!-- Disallow implicit array creation -->
122    <rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation" />
123    <!-- Require comma after last element in multi-line array -->
124    <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
125    <!-- Require presence of constant visibility -->
126    <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility">
127        <properties>
128            <property name="fixable" value="true"/>
129        </properties>
130    </rule>
131    <!-- Disallow empty lines around type declarations -->
132    <rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
133        <properties>
134            <property name="linesCountAfterOpeningBrace" value="0"/>
135            <property name="linesCountBeforeClosingBrace" value="0"/>
136        </properties>
137    </rule>
138    <!-- Require usage of ::class instead of `__CLASS__`, `get_class()`,
139         `get_class($this)`, `get_called_class()` and `get_parent_class()`-->
140    <rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
141    <!-- Disallow uses of multiple traits separated by comma -->
142    <rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration"/>
143    <!-- Require no spaces before trait use, between trait uses and one space after trait uses -->
144    <rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing">
145        <properties>
146            <property name="linesCountAfterLastUse" value="1"/>
147            <property name="linesCountAfterLastUseWhenLastInClass" value="0"/>
148            <property name="linesCountBeforeFirstUse" value="0"/>
149            <property name="linesCountBetweenUses" value="0"/>
150        </properties>
151    </rule>
152    <!-- Disallow suffix "Abstract" for abstract classes -->
153    <rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
154    <!-- Disallow suffix "Interface" for interfaces -->
155    <rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/>
156    <!-- Require specific order of phpDoc annotations with empty newline between specific groups -->
157    <rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">
158        <properties>
159            <property name="linesCountBeforeFirstContent" value="0"/>
160            <property name="linesCountAfterLastContent" value="0"/>
161            <property name="linesCountBetweenDescriptionAndAnnotations" value="1"/>
162            <property name="linesCountBetweenAnnotationsGroups" value="1"/>
163            <property name="annotationsGroups" type="array">
164                <element value="
165                    @internal,
166                    @deprecated,
167                "/>
168                <element value="
169                    @ORM\,
170                    @ODM\,
171                "/>
172                <element value="
173                    @testdox,
174                    @requires,
175                    @covers,
176                    @coversNothing,
177                    @coversDefaultClass,
178                    @dataProvider,
179                    @doesNotPerformAssertions,
180                    @expectedException,
181                    @expectedExceptionCode,
182                    @expectedExceptionMessage,
183                    @expectedExceptionMessageRegExp,
184                "/>
185                <element value="@param"/>
186                <element value="@return"/>
187                <element value="@throws"/>
188                <element value="
189                    @method,
190                "/>
191                <element value="
192                    @link,
193                    @see,
194                    @uses,
195                "/>
196                <element value="
197                    @author,
198                    @since,
199                "/>
200            </property>
201        </properties>
202    </rule>
203    <!-- Disallow empty comments -->
204    <rule ref="SlevomatCodingStandard.Commenting.EmptyComment"/>
205    <!-- Disallow useless annotations - Git and LICENCE file provide more accurate information -->
206    <rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
207        <properties>
208            <property name="forbiddenAnnotations" type="array">
209                <element value="@api"/>
210                <element value="@category"/>
211                <element value="@copyright"/>
212                <element value="@created"/>
213                <element value="@license"/>
214                <element value="@package"/>
215                <element value="@subpackage"/>
216                <element value="@version"/>
217                <element value="@test"/>
218            </property>
219        </properties>
220    </rule>
221    <!-- Disallow useless comments -->
222    <rule ref="SlevomatCodingStandard.Commenting.ForbiddenComments">
223        <properties>
224            <property name="forbiddenCommentPatterns" type="array">
225                <element value="~^(?:(?!private|protected|static)\S+ )?(?:con|de)structor\.\z~i"/>
226                <element value="~^Created by \S+\.\z~i"/>
227                <element value="~^\S+ [gs]etter\.\z~i"/>
228            </property>
229        </properties>
230    </rule>
231    <!-- Report invalid format of inline phpDocs with `@var` -->
232    <rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration"/>
233    <!-- Require comments with single line written as one-liners -->
234    <rule ref="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment"/>
235    <!-- Require short ternary operator `?:` when possible -->
236    <rule ref="SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator" />
237    <!-- Disallow assignments in conditions -->
238    <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
239    <!-- Disallow use of `empty()` -->
240    <rule ref="SlevomatCodingStandard.ControlStructures.DisallowEmpty" />
241    <!-- Disallow fancy yoda conditions -->
242    <rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
243    <!-- Require language constructs without parentheses -->
244    <rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses"/>
245    <!-- Require new instances with parentheses -->
246    <rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses"/>
247    <!-- Require usage of null coalesce operator when possible -->
248    <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
249    <!-- Require short ternary operator `?:` when possible -->
250    <rule ref="SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator" />
251    <!-- Report useless conditions where both branches return true or false -->
252    <rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn"/>
253    <!-- Report useless ternary operator where both branches return true or false -->
254    <rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator"/>
255    <!-- Disallow useless unreachable catch blocks -->
256    <rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
257    <!-- Force \Throwable in catch statement instead of \Exception -->
258    <rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly"/>
259    <!-- Require closures not referencing `$this` be static -->
260    <rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
261    <!-- Disallow unused variables passed to closures via `use` -->
262    <rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
263    <!-- Require use statements to be alphabetically sorted -->
264    <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
265        <properties>
266            <property name="caseSensitive" value="false"/>
267        </properties>
268    </rule>
269    <!-- Disallow fancy group uses -->
270    <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
271    <!-- Disallow using references to global constants -->
272    <rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants" />
273    <!-- Disallow using references to global functions -->
274    <rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions" />
275    <!-- Disallow multiple use statements on same line -->
276    <rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
277    <!-- Require newlines around namespace declaration -->
278    <rule ref="SlevomatCodingStandard.Namespaces.NamespaceSpacing"/>
279    <!-- Requires only one namespace in a file -->
280    <rule ref="SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile"/>
281    <!-- Disallow unused use statements -->
282    <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
283        <properties>
284            <property name="searchAnnotations" value="true"/>
285        </properties>
286    </rule>
287    <!-- Disallow superfluous leading backslash in use statements -->
288    <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
289    <!-- Disallow useless uses of the same namespace -->
290    <rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
291    <!-- Require empty newlines before and after uses -->
292    <rule ref="SlevomatCodingStandard.Namespaces.UseSpacing">
293        <properties>
294            <property name="linesCountAfterLastUse" value="1"/>
295            <property name="linesCountBeforeFirstUse" value="1"/>
296            <property name="linesCountBetweenUseTypes" value="0"/>
297        </properties>
298    </rule>
299    <!-- Disallow useless alias for classes, constants and functions -->
300    <rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/>
301    <!-- Disallow weak comparisons -->
302    <rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
303    <!-- Require the usage of assignment operators, eg `+=`, `.=` when possible -->
304    <rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
305    <!-- Disallow space after the `...` operator -->
306    <rule ref="SlevomatCodingStandard.Operators.SpreadOperatorSpacing">
307        <properties>
308            <property name="spacesCountAfterOperator" value="0"/>
309        </properties>
310    </rule>
311    <!-- Disallow argument unpacking for functions specialized by PHP VM -->
312    <rule ref="SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking"/>
313    <!-- Disallow `list(...)` syntax -->
314    <rule ref="SlevomatCodingStandard.PHP.ShortList"/>
315    <!-- Disallow use of longhand cast operators -->
316    <rule ref="SlevomatCodingStandard.PHP.TypeCast"/>
317    <!-- Forbid useless parentheses -->
318    <rule ref="SlevomatCodingStandard.PHP.UselessParentheses"/>
319    <!-- Disallow useless semicolon `;` -->
320    <rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
321    <!-- Require presence of `declare(strict_types=1)` -->
322    <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
323        <properties>
324            <property
325                    name="newlinesCountBetweenOpenTagAndDeclare"
326                    value="2"
327            />
328            <property
329                    name="spacesCountAroundEqualsSign"
330                    value="0"
331            />
332            <property
333                    name="newlinesCountAfterDeclare"
334                    value="2"
335            />
336        </properties>
337    </rule>
338    <!-- Force generic type hint syntax -->
339    <rule ref="SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax" />
340    <!-- Look for duplicate assignments to a variable -->
341    <rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable" />
342    <!-- Look for unused variables -->
343    <rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable" />
344    <!-- Require use of short versions of scalar types (i.e. int instead of integer) -->
345    <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
346    <!-- Require the `null` type hint to be in the last position of annotations -->
347    <rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition"/>
348    <!-- Require `?` when default value is `null` -->
349    <rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
350    <!-- Require one space between typehint and variable, require no space between nullability sign and typehint -->
351    <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
352    <!-- Require space around colon in return types -->
353    <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
354        <properties>
355            <property name="spacesCountBeforeColon" value="1"/>
356        </properties>
357    </rule>
358    <!-- Require types to be written as natively if possible;
359         require iterable types to specify phpDoc with their content;
360         forbid useless/duplicated information in phpDoc -->
361    <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
362        <properties>
363            <property name="enableEachParameterAndReturnInspection" value="true"/>
364            <property name="allAnnotationsAreUseful" value="true" />
365        </properties>
366        <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint" />
367        <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint" />
368    </rule>
369    <!-- Disallow useless `@var` for constants -->
370    <rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
371    <!-- Disallow useless variables -->
372    <rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
373
374    <!-- Squiz sniffs -->
375
376    <!-- Disallow spaces around square brackets -->
377    <rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
378    <!-- Force array declaration structure -->
379    <rule ref="Squiz.Arrays.ArrayDeclaration">
380        <!-- Disable alignment of braces -->
381        <exclude name="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned"/>
382        <!-- Disable arrow alignment -->
383        <exclude name="Squiz.Arrays.ArrayDeclaration.DoubleArrowNotAligned"/>
384        <!-- Uses indentation of only single space -->
385        <exclude name="Squiz.Arrays.ArrayDeclaration.KeyNotAligned"/>
386        <!-- Checked by SlevomatCodingStandard.Arrays.TrailingArrayComma.MissingTrailingComma -->
387        <exclude name="Squiz.Arrays.ArrayDeclaration.NoCommaAfterLast"/>
388        <!-- Allow multiple values on a single line -->
389        <exclude name="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed"/>
390        <!-- Disable alignment of values with opening brace -->
391        <exclude name="Squiz.Arrays.ArrayDeclaration.ValueNotAligned"/>
392        <!-- Allow multi-line array contains a single value; -->
393        <exclude name="Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed"/>
394    </rule>
395    <!-- Disallow class being in a file with different name -->
396    <rule ref="Squiz.Classes.ClassFileName"/>
397    <!-- Force `self::` for self-reference, force lower-case self, forbid spaces around `::` -->
398    <rule ref="Squiz.Classes.SelfMemberReference"/>
399    <!-- Force phpDoc alignment -->
400    <rule ref="Squiz.Commenting.DocCommentAlignment">
401        <!-- Allow extra spaces after star, i.e. for indented annotations -->
402        <exclude name="Squiz.Commenting.DocCommentAlignment.SpaceAfterStar"/>
403    </rule>
404    <!-- Force rules for function phpDoc -->
405    <rule ref="Squiz.Commenting.FunctionComment">
406        <!-- Allow `@throws` without description -->
407        <exclude name="Squiz.Commenting.FunctionComment.EmptyThrows"/>
408        <!-- Does not work properly with PHP 7 / short-named types -->
409        <exclude name="Squiz.Commenting.FunctionComment.IncorrectParamVarName"/>
410        <!-- Does not support collections, i.e. `string[]` -->
411        <exclude name="Squiz.Commenting.FunctionComment.IncorrectTypeHint"/>
412        <!-- Forces incorrect types -->
413        <exclude name="Squiz.Commenting.FunctionComment.InvalidReturn"/>
414        <!-- Breaks with compound return types, i.e. `string|null` -->
415        <exclude name="Squiz.Commenting.FunctionComment.InvalidReturnNotVoid"/>
416        <!-- Breaks when all params are not documented -->
417        <exclude name="Squiz.Commenting.FunctionComment.InvalidTypeHint"/>
418        <!-- Doc comment is not required for every method -->
419        <exclude name="Squiz.Commenting.FunctionComment.Missing"/>
420        <!-- Do not require comments for `@param` -->
421        <exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
422        <!-- Do not require `@param` for all parameters -->
423        <exclude name="Squiz.Commenting.FunctionComment.MissingParamTag"/>
424        <!-- Do not require `@return` for void methods -->
425        <exclude name="Squiz.Commenting.FunctionComment.MissingReturn"/>
426        <!-- Comments don't have to be sentences -->
427        <exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
428        <!-- Comments don't have to be sentences -->
429        <exclude name="Squiz.Commenting.FunctionComment.ParamCommentNotCapital"/>
430        <!-- Breaks when all params are not documented -->
431        <exclude name="Squiz.Commenting.FunctionComment.ParamNameNoMatch"/>
432        <!-- Doesn't respect inheritance -->
433        <exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing"/>
434        <!-- Doesn't work with self as typehint -->
435        <exclude name="Squiz.Commenting.FunctionComment.TypeHintMissing"/>
436        <!-- Doesn't work with self as typehint -->
437        <exclude name="Squiz.Commenting.FunctionComment.TypeHintMissing"/>
438    </rule>
439    <!-- Disallow `AND` and `OR`, require `&&` and `||` -->
440    <rule ref="Squiz.Operators.ValidLogicalOperators"/>
441    <!-- Disallow `global` -->
442    <rule ref="Squiz.PHP.GlobalKeyword"/>
443    <!-- Disallow functions inside functions -->
444    <rule ref="Squiz.PHP.InnerFunctions"/>
445    <!-- Require PHP function calls in lowercase -->
446    <rule ref="Squiz.PHP.LowercasePHPFunctions"/>
447    <!-- Disallow dead code -->
448    <rule ref="Squiz.PHP.NonExecutableCode"/>
449    <!-- Disallow `$this` inside static function -->
450    <rule ref="Squiz.Scope.StaticThisUsage"/>
451    <!-- Force whitespace before and after concatenation -->
452    <rule ref="Squiz.Strings.ConcatenationSpacing">
453        <properties>
454            <property name="spacing" value="1"/>
455            <property name="ignoreNewlines" value="true"/>
456        </properties>
457    </rule>
458    <!-- Disallow strings in `"` unless necessary -->
459    <rule ref="Squiz.Strings.DoubleQuoteUsage"/>
460    <rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
461        <message>Variable "%s" not allowed in double quoted string; use sprintf() or concatenation instead</message>
462    </rule>
463    <!-- Disallow braces around string in `echo` -->
464    <rule ref="Squiz.Strings.EchoedStrings"/>
465    <!-- Disallow spaces in type casts -->
466    <rule ref="Squiz.WhiteSpace.CastSpacing"/>
467    <!-- Disallow blank line after function opening brace -->
468    <rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace"/>
469    <!-- Require space after language constructs -->
470    <rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
471    <!-- Require space around logical operators -->
472    <rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
473    <!-- Disallow spaces around `->` operator -->
474    <rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing">
475        <properties>
476            <property name="ignoreNewlines" value="true"/>
477        </properties>
478    </rule>
479    <!-- Disallow spaces before semicolon `;` -->
480    <rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
481    <!-- Disallow superfluous whitespaces -->
482    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
483        <properties>
484            <!-- Turned on by PSR2, turning back off -->
485            <property name="ignoreBlankLines" value="false"/>
486        </properties>
487    </rule>
488    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
489        <!-- Turned off by PSR2, turning back on -->
490        <severity>5</severity>
491    </rule>
492
493    <rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming.SuperfluousPrefix">
494        <exclude-pattern>src/Atn/Transitions/AbstractPredicateTransition.php</exclude-pattern>
495    </rule>
496
497    <file>src</file>
498</ruleset>
499