forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
132 lines (131 loc) · 5.52 KB
/
phpcs.xml
File metadata and controls
132 lines (131 loc) · 5.52 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?xml version="1.0"?>
<ruleset name="PHPStan">
<config name="php_version" value="80200"/>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="encoding" value="utf-8"/>
<arg name="tab-width" value="4"/>
<arg name="cache" value="tmp/cache/phpcs"/>
<arg value="sp"/>
<file>bin</file>
<file>src</file>
<file>tests</file>
<file>compiler/src</file>
<file>compiler/tests</file>
<file>apigen/src</file>
<file>changelog-generator/src</file>
<file>changelog-generator/run.php</file>
<file>issue-bot/src</file>
<file>issue-bot/console.php</file>
<rule ref="./build-cs/phpcs.xml"/>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification"/>
<properties>
<property name="enableIntersectionTypeHint" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
<exclude-pattern>src/Rules/Whitespace/FileWhitespaceRule.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation">
<severity>10</severity>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
<properties>
<property name="enableUnionTypeHint" value="true"/>
<property name="enableIntersectionTypeHint" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.UselessAnnotation">
<severity>10</severity>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingAnyTypeHint"/>
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.UselessAnnotation"/>
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.LessSpecificNativeTypeHint"/>
<properties>
<property name="enableIntersectionTypeHint" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure.UnusedInheritedVariable">
<exclude-pattern>src/Command/CommandHelper.php</exclude-pattern>
<exclude-pattern>src/Testing/PHPStanTestCase.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException">
<exclude-pattern>tests</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="compiler/src" value="PHPStan\Compiler"/>
<element key="compiler/tests" value="PHPStan\Compiler"/>
<element key="src" value="PHPStan"/>
<element key="tests/PHPStan" value="PHPStan"/>
<element key="tests/e2e" value="PHPStan\Tests"/>
<element key="apigen/src" value="PHPStan\ApiGen"/>
<element key="changelog-generator/src" value="PHPStan\ChangelogGenerator"/>
<element key="issue-bot/src" value="PHPStan\IssueBot"/>
</property>
</properties>
</rule>
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse">
<properties>
<property name="onlySingleLine" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration">
<properties>
<property name="onlySingleLine" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse">
<properties>
<property name="enable" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration"/>
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration">
<properties>
<property name="enable" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch">
<properties>
<property name="enable" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.DNFTypeHintFormat">
<properties>
<property name="enable" value="true"/>
<property name="withSpacesAroundOperators" value="no"/>
<property name="withSpacesInsideParentheses" value="no"/>
<property name="nullPosition" value="last"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion">
<properties>
<property name="enable" value="true"/>
</properties>
<exclude-pattern>src/Type/TypeResult.php</exclude-pattern>
</rule>
<exclude-pattern>compiler/tests/*/data/</exclude-pattern>
<exclude-pattern>tests/*/Fixture/</exclude-pattern>
<exclude-pattern>tests/*/cache/</exclude-pattern>
<exclude-pattern>tests/vendor/*</exclude-pattern>
<exclude-pattern>tests/*/data/</exclude-pattern>
<exclude-pattern>tests/*/traits/</exclude-pattern>
<exclude-pattern>tests/PHPStan/Analyser/nsrt/</exclude-pattern>
<exclude-pattern>tests/e2e/anon-class/</exclude-pattern>
<exclude-pattern>tests/e2e/magic-setter/</exclude-pattern>
<exclude-pattern>tests/e2e/resultCache_1.php</exclude-pattern>
<exclude-pattern>tests/e2e/resultCache_2.php</exclude-pattern>
<exclude-pattern>tests/e2e/resultCache_3.php</exclude-pattern>
<exclude-pattern>tests/notAutoloaded/</exclude-pattern>
<exclude-pattern>tests/tmp/</exclude-pattern>
</ruleset>