Repository navigation
Expand file tree
/
Copy pathphpstan.neon
More file actions
188 lines (169 loc) · 5.21 KB
/
Copy pathphpstan.neon
File metadata and controls
188 lines (169 loc) · 5.21 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
parameters:
level: 8
paths:
- src
excludePaths:
- src/compatibility.php
fileExtensions:
- php
- phtml
ignoreErrors:
# $refPath is populated via @param-out by getRefTable() — PHPStan doesn't track this
-
identifier: variable.undefined
message: '#^Undefined variable: \$refPath$#'
count: 1
path: src/Database/Table/Selection.php
# Readonly lazy-loading via __get magic (Reflection::$tables, Table::$columns/$indexes/$primaryKey/$foreignKeys)
-
identifier: property.uninitializedReadonly
count: 2
path: src/Database/Reflection.php
-
identifier: property.uninitializedReadonly
count: 8
path: src/Database/Reflection/Table.php
-
identifier: unset.readOnlyProperty
count: 1
path: src/Database/Reflection.php
-
identifier: unset.readOnlyProperty
count: 4
path: src/Database/Reflection/Table.php
-
identifier: property.readOnlyAssignNotInConstructor
count: 1
path: src/Database/Reflection.php
-
identifier: property.readOnlyAssignNotInConstructor
count: 4
path: src/Database/Reflection/Table.php
# Generic conflicts from deprecated IRowContainer/IRow extending Traversable without type params
-
identifier: generics.interfaceConflict
count: 2
path: src/Database/Result.php
-
identifier: generics.interfaceConflict
count: 3
path: src/Database/Row.php
-
identifier: generics.interfaceConflict
count: 2
path: src/Database/Table/GroupedSelection.php
-
identifier: generics.interfaceConflict
count: 1
path: src/Database/Table/ActiveRow.php
-
identifier: generics.interfaceConflict
count: 2
path: src/Database/Table/Selection.php
# Iterator/ArrayAccess covariance/contravariance (PHP interface limitation): current() may return false, offset methods take int|string
-
identifier: method.childReturnType
message: '#::current\(\) should be covariant#'
count: 1
path: src/Database/Result.php
-
identifier: method.childReturnType
message: '#::current\(\) should be covariant#'
count: 1
path: src/Database/Table/Selection.php
-
identifier: method.childParameterType
message: '#\$key \(int\|string\) of method Nette\\Database\\Row::offset#'
count: 4
path: src/Database/Row.php
-
identifier: method.childParameterType
message: '#::offsetSet\(\) should be contravariant#'
count: 1
path: src/Database/Table/Selection.php
# Intentional new static() in exception hierarchy
-
identifier: new.static
message: '#^Unsafe usage of new static\(\)\.$#'
count: 1
path: src/Database/DriverException.php
# DI extension: $this->config is array|object from Nette Schema
-
identifier: foreach.nonIterable
count: 2
path: src/Bridges/DatabaseDI/DatabaseExtension.php
# PDOException::$queryString is set by PDO engine, not formally declared
-
identifier: property.notFound
message: '#PDOException::\$queryString#'
count: 1
path: src/Bridges/DatabaseTracy/ConnectionPanel.php
# Dynamic callable construction: "is_$type"($value) where $type is always valid
-
identifier: callable.nonCallable
count: 1
path: src/Database/SqlPreprocessor.php
# Defensive runtime checks unreachable per @param type
-
identifier: instanceof.alwaysTrue
message: '#Nette\\Database\\Row#'
count: 1
path: src/Database/SqlPreprocessor.php
-
identifier: booleanAnd.alwaysFalse
count: 1
path: src/Database/SqlPreprocessor.php
# getPrimary() may return string[] for composite keys, but here it is always a string
-
identifier: array.invalidKey
message: '#array<string>\|string#'
count: 1
path: src/Database/Table/ActiveRow.php
# fetchAssoc(): Arrays::associate() returns array|stdClass, but never stdClass for a string path
-
identifier: return.type
message: '#fetchAssoc\(\) should return array<mixed>\|null but returns array<mixed>\|stdClass#'
count: 1
path: src/Database/Result.php
# structure array shape is built dynamically and re-loaded from cache
-
identifier: return.type
count: 2
path: src/Database/Structure.php
# Internal SQL is dynamically assembled from trusted components, not literal-string
-
identifier: argument.type
message: '#expects literal-string, [\w-]+ given#'
count: 5
path: src/Database/Table/Selection.php
-
identifier: argument.type
message: '#expects literal-string, [\w-]+ given#'
count: 1
path: src/Database/Table/GroupedSelection.php
# parseColumnType(): regex match offsets guaranteed by the pattern
-
identifier: offsetAccess.notFound
message: '#^Offset \d might not exist on array#'
count: 4
path: src/Database/Helpers.php
# toPairs(): offset access on array|Row|ActiveRow, all of them support it
-
identifier: offsetAccess.notFound
message: '#^Offset int\|string might not exist#'
count: 3
path: src/Database/Helpers.php
# Defensive checks that are always true/false per PHPStan type narrowing
-
identifier: empty.offset
count: 1
path: src/Database/Helpers.php
# Latte-generated n:attr idiom: ($tmp = expr) === null ? '' : ...
-
identifier: identical.alwaysFalse
count: 3
path: src/Bridges/DatabaseTracy/dist/panel.phtml
-
identifier: identical.alwaysFalse
count: 1
path: src/Bridges/DatabaseTracy/dist/tab.phtml