-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
65 lines (47 loc) · 2.27 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
65 lines (47 loc) · 2.27 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
<?xml version="1.0"?>
<ruleset
name="PHPStan - Rules"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/refs/heads/master/phpcs.xsd"
>
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset -->
<description>Ruleset for the PHPStan library.</description>
<!-- Version: 4.4.0 -->
<!-- Include when not specified -->
<file>./src</file>
<!-- Show the file path based on the project root. -->
<arg name="basepath" value="." />
<!-- Cache between runs -->
<arg name="cache" value="./.phpcs.cache" />
<arg name="extensions" value="php/PHP" />
<!-- Show sniff codes in all reports, and progress when running. -->
<arg value="sp" />
<!-- @see https://github.com/PHPCompatibility/PHPCompatibility#using-a-custom-ruleset -->
<config name="testVersion" value="8.2-" />
<!-- @see https://github.com/PHPCompatibility/PHPCompatibilityWP#how-to-use -->
<rule ref="PHPCompatibilityWP" />
<exclude-pattern>*/dev/*</exclude-pattern>
<exclude-pattern>*/stubs/*</exclude-pattern>
<rule ref="Universal.Classes.DisallowFinalClass">
<type>error</type>
</rule>
<rule ref="WordPress-Extra">
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
<exclude name="Generic.WhiteSpace.IncrementDecrementSpacing.SpaceAfterIncrement" />
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="WordPress.Files.FileName" />
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid" />
<exclude name="WordPress.NamingConventions.ValidVariableName" />
<exclude name="WordPress.Security.EscapeOutput" />
</rule>
<!-- Enforce PSR1 compatible namespaces. -->
<rule ref="PSR1.Classes.ClassDeclaration" />
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
<properties>
<property name="alignMultilineItems" value="!=100" />
</properties>
</rule>
<!-- Disallow long array syntax. -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
</ruleset>