-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
66 lines (66 loc) · 4.04 KB
/
phpcs.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
63
64
65
66
<?xml version="1.0" ?>
<ruleset name="PCCD" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>PSR12 with some rules disabled, and with a few enabled rules from SlevomatCodingStandard.</description>
<arg name="extensions" value="php" />
<exclude-pattern>*.generated.php</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/third_party/*</exclude-pattern>
<exclude-pattern>*/tmp/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<rule ref="PSR12">
<exclude name="Generic.Files.LineLength" />
<exclude name="PSR12.Files.FileHeader" />
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
<exclude name="PSR1.Classes.ClassDeclaration.MultipleClasses" />
</rule>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="eval" value="null" />
<element key="extract" value="null" />
<element key="sprintf" value="null" />
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys" />
<rule ref="SlevomatCodingStandard.Arrays.ArrayAccess" />
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation" />
<rule ref="SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed" />
<rule ref="SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement" />
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace" />
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma" />
<rule ref="SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing" />
<rule ref="SlevomatCodingStandard.Attributes.AttributesOrder" />
<rule ref="SlevomatCodingStandard.Attributes.DisallowAttributesJoining" />
<rule ref="SlevomatCodingStandard.Attributes.DisallowMultipleAttributesPerLine" />
<rule ref="SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment" />
<rule ref="SlevomatCodingStandard.Commenting.DisallowCommentAfterCode" />
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison" />
<rule ref="SlevomatCodingStandard.ControlStructures.RequireMultiLineCondition" />
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" />
<rule ref="SlevomatCodingStandard.Exceptions.DeadCatch" />
<rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch" />
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall" />
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse" />
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration" />
<rule ref="SlevomatCodingStandard.Functions.NamedArgumentSpacing" />
<rule ref="SlevomatCodingStandard.Functions.StaticClosure" />
<rule ref="SlevomatCodingStandard.Functions.StrictCall" />
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure" />
<rule ref="SlevomatCodingStandard.Functions.UnusedParameter" />
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue" />
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" />
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses" />
<rule ref="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator" />
<rule ref="SlevomatCodingStandard.PHP.RequireExplicitAssertion" />
<rule ref="SlevomatCodingStandard.PHP.ShortList" />
<rule ref="SlevomatCodingStandard.PHP.TypeCast" />
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses" />
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon" />
<rule ref="SlevomatCodingStandard.Strings.DisallowVariableParsing" />
<rule ref="SlevomatCodingStandard.Variables.DisallowVariableVariable" />
<rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable" />
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable" />
<rule ref="SlevomatCodingStandard.Variables.UselessVariable" />
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces" />
</ruleset>