-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
99 lines (88 loc) · 3.98 KB
/
phpcs.xml
File metadata and controls
99 lines (88 loc) · 3.98 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0"?>
<ruleset name="PHP Coding Standards">
<description>Generally-applicable sniffs</description>
<!-- Show sniffs, progress -->
<arg value="sp"/>
<arg name="extensions" value="php"/>
<arg name="tab-width" value="4"/>
<config name="encoding" value="utf-8"/>
<rule ref="PSR12"/>
<!-- Deprecated WP features -->
<config name="minimum_supported_wp_version" value="6.0"/>
<rule ref="WordPress.WP.DeprecatedFunctions"/>
<rule ref="WordPress.WP.DeprecatedClasses"/>
<rule ref="WordPress.WP.DeprecatedParameters"/>
<rule ref="WordPress.WP.DeprecatedParameterValues"/>
<!-- Add rule for textdomain -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="config-email-smtp"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces">
<properties>
<property name="ignoreSpacesInComment" value="true"/>
</properties>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
<rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Squiz.PHP.DiscouragedFunctions"/>
<!-- Functional -->
<rule ref="SlevomatCodingStandard.TypeHints">
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification"/>
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint"/>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="declareOnFirstLine" value="false"/>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.ClassStructure">
<exclude name="SlevomatCodingStandard.Classes.ClassStructure.IncorrectGroupOrder"/>
</rule>
<rule ref="SlevomatCodingStandard.Classes.UselessLateStaticBinding"/>
<rule ref="SlevomatCodingStandard.Classes.MethodSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
<properties>
<property name="linesCountAfterOpeningBrace" value="0"/>
<property name="linesCountBeforeClosingBrace" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
<rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses"/>
<rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
<!-- Clean code -->
<rule ref="SlevomatCodingStandard.PHP">
<exclude name="SlevomatCodingStandard.PHP.DisallowReference"/>
<exclude name="SlevomatCodingStandard.PHP.RequireExplicitAssertion"/>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"/>
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
<rule ref="SlevomatCodingStandard.Functions.UnusedParameter"/>
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue"/>
<!-- Formatting -->
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment"/>
<rule ref="Squiz.Strings.ConcatenationSpacing">
<properties>
<property name="spacing" value="1"/>
<property name="ignoreNewlines" value="true"/>
</properties>
</rule>
<!-- exclude vendor dirs -->
<exclude-pattern>*/vendor/*</exclude-pattern>
</ruleset>