-
Notifications
You must be signed in to change notification settings - Fork 13
/
ruleset.xml
62 lines (56 loc) · 3.18 KB
/
ruleset.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset -->
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../vendor/squizlabs/php_codesniffer/phpcs.xsd"
name="AcquiaPHPStrict"
>
<description>Acquia's strict PHP coding standards.</description>
<rule ref="AcquiaPHPMinimal"/>
<!-- Drupal sniffs -->
<rule ref="Drupal.Classes.UnusedUseStatement"/>
<rule ref="Drupal.Commenting.InlineComment"/>
<!-- SlevomatCodingStandard sniffs -->
<rule ref="SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys" />
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>
<rule ref="SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement"/>
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace"/>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion" />
<rule ref="SlevomatCodingStandard.Commenting.DeprecatedAnnotationDeclaration" />
<rule ref="SlevomatCodingStandard.Commenting.DisallowCommentAfterCode" />
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing" />
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
<properties>
<!-- Recommended by Slevomat -->
<!-- @see https://github.com/slevomat/coding-standard/blob/c72b104f89c6d7bd8b739449f9f592cda2e5072b/doc/commenting.md?plain=1#L20 -->
<property name="forbiddenAnnotations" type="array" value="@author,@created,@version,@package,@copyright,@license" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenComments">
<properties>
<property name="forbiddenCommentPatterns" type="array" value="/Class .*/" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration" />
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment" />
<rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment" />
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />
<!-- Stock configuration conflicts with PSR-12, which requires no spaces. -->
<!-- @see https://www.php-fig.org/psr/psr-12/#3-declare-statements-namespace-and-import-statements -->
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="linesCountBeforeDeclare" value="1"/>
<property name="linesCountAfterDeclare" value="1"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification"/>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint" />
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint" />
<!-- Superglobals are superbad. See linked issue for discussion.
@see https://github.com/acquia/coding-standards-php/issues/49 -->
<rule ref="SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable" />
</ruleset>