-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan-rules.neon
More file actions
152 lines (148 loc) · 4.87 KB
/
Copy pathphpstan-rules.neon
File metadata and controls
152 lines (148 loc) · 4.87 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
rules:
- Framework\Analysis\Database\ModelAttributeRule
- Framework\Analysis\Database\ModelUniqueFieldRule
- Framework\Analysis\Database\ModelEnumRule
- Framework\Analysis\Database\QueryArgumentRule
- Framework\Analysis\Enum\EnumHasNoneCaseRule
- Framework\Analysis\Enum\EnumInternalMethodsRule
- Framework\Analysis\Route\RouteMethodNameRule
- Framework\Analysis\Route\RouteParamTypeRule
- Framework\Analysis\Route\RouteReturnTypeRule
- Framework\Analysis\Route\RouteDuplicateRule
- Framework\Analysis\Signal\ListenerReturnVoidRule
- Framework\Analysis\Log\ActionSectionRule
- Framework\Analysis\Log\SectionDuplicateRule
services:
-
class: Framework\Analysis\Route\RoutePathCollector
tags:
- phpstan.collector
-
class: Framework\Analysis\Log\SectionNameCollector
tags:
- phpstan.collector
-
class: Framework\Analysis\General\DisallowClassCompareRule
arguments:
enabled: %framework.disallowClassCompare%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\DisallowDebugPrintRule
arguments:
enabled: %framework.disallowDebugPrint%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\DisallowEmptyArrayRule
arguments:
enabled: %framework.disallowEmptyArray%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\DisallowEnumNameValueRule
arguments:
enabled: %framework.disallowEnumNameValue%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\DisallowIntFloatWideningRule
arguments:
enabled: %framework.disallowIntFloatWidening%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\DisallowNativeDateRule
arguments:
enabled: %framework.disallowNativeDate%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\EnumSwitchExhaustiveRule
arguments:
enabled: %framework.enumSwitchExhaustive%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\MethodReturnNotNeededRule
arguments:
enabled: %framework.methodReturnNotNeeded%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\PreferListTypeRule
arguments:
enabled: %framework.preferListType%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\PreferMatchOverSwitchRule
arguments:
enabled: %framework.preferMatchOverSwitch%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\PrivateMethodReturnUnusedRule
arguments:
enabled: %framework.privateMethodReturnUnused%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\RequireNamedBoolArgRule
arguments:
enabled: %framework.requireNamedBoolArg%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\RequireOptionalCommentRule
arguments:
enabled: %framework.requireOptionalComment%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\General\RequireReturnTypeRule
arguments:
enabled: %framework.requireReturnType%
tags:
- phpstan.rules.rule
-
class: Framework\Analysis\Log\ActionAttributeRule
arguments:
requiredLanguages: %framework.actionLogLanguages%
tags:
- phpstan.rules.rule
parameters:
framework:
disallowClassCompare: false
disallowDebugPrint: false
disallowEmptyArray: false
disallowEnumNameValue: false
disallowIntFloatWidening: false
disallowNativeDate: false
enumSwitchExhaustive: false
methodReturnNotNeeded: false
preferListType: false
preferMatchOverSwitch: false
privateMethodReturnUnused: false
requireNamedBoolArg: false
requireOptionalComment: false
requireReturnType: false
actionLogLanguages: ['en', 'es']
parametersSchema:
framework: structure([
disallowClassCompare: bool()
disallowDebugPrint: bool()
disallowEnumNameValue: bool()
disallowEmptyArray: bool()
disallowIntFloatWidening: bool()
disallowNativeDate: bool()
enumSwitchExhaustive: bool()
methodReturnNotNeeded: bool()
preferListType: bool()
preferMatchOverSwitch: bool()
privateMethodReturnUnused: bool()
requireNamedBoolArg: bool()
requireOptionalComment: bool()
requireReturnType: bool()
actionLogLanguages: listOf(string())
])