-
-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathphpstan.neon
More file actions
149 lines (128 loc) · 4.01 KB
/
phpstan.neon
File metadata and controls
149 lines (128 loc) · 4.01 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
parameters:
level: 8
paths:
- src
excludePaths:
- src/compatibility.php
- src/compatibility-intf.php
fileExtensions:
- php
- phtml
ignoreErrors:
# $refPath is populated via @param-out by getRefTable() — PHPStan doesn't track this
-
identifier: variable.undefined
path: src/Database/Table/Selection.php
# Readonly lazy-loading via __get magic
-
identifier: property.uninitializedReadonly
paths:
- src/Database/Reflection.php
- src/Database/Reflection/Table.php
-
identifier: unset.readOnlyProperty
paths:
- src/Database/Reflection.php
- src/Database/Reflection/Table.php
-
identifier: property.readOnlyAssignNotInConstructor
paths:
- src/Database/Reflection.php
- src/Database/Reflection/Table.php
# Deprecated interfaces without generic types
-
identifier: missingType.generics
paths:
- src/Database/IRow.php
- src/Database/IRowContainer.php
# Generic conflicts from deprecated IRowContainer/IRow extending Traversable without type params
-
identifier: generics.interfaceConflict
paths:
- src/Database/ResultSet.php
- src/Database/Row.php
- src/Database/Table/GroupedSelection.php
- src/Database/Table/ActiveRow.php
- src/Database/Table/Selection.php
# Iterator/ArrayAccess covariance/contravariance (PHP interface limitation)
-
identifier: method.childReturnType
paths:
- src/Database/ResultSet.php
- src/Database/Table/Selection.php
-
identifier: method.childParameterType
paths:
- src/Database/Row.php
- src/Database/Table/Selection.php
# Intentional new static() in exception hierarchy
-
identifier: new.static
path: src/Database/DriverException.php
# Closure variables consumed by require'd phtml template
-
identifier: closure.unusedUse
path: src/Bridges/DatabaseTracy/ConnectionPanel.php
# Defensive instanceof check in elseif branch for readability
-
identifier: instanceof.alwaysTrue
path: src/Bridges/DatabaseTracy/ConnectionPanel.php
# Lazy-loading side effect via __get magic
-
identifier: expr.resultUnused
path: src/Database/Reflection.php
# DI extension: $this->config is array|object from Nette Schema
-
identifier: foreach.nonIterable
path: src/Bridges/DatabaseDI/DatabaseExtension.php
# PDOException::$queryString is set by PDO engine, not formally declared
-
identifier: property.notFound
path: src/Bridges/DatabaseTracy/ConnectionPanel.php
# Dynamic callable construction: "is_$type"($value) where $type is always valid
-
identifier: callable.nonCallable
path: src/Database/SqlPreprocessor.php
# Defensive runtime checks unreachable per @param type
-
identifier: instanceof.alwaysTrue
path: src/Database/SqlPreprocessor.php
-
identifier: booleanAnd.alwaysFalse
path: src/Database/SqlPreprocessor.php
# getPrimary() returns string for single-column PK (composite PK not supported here)
-
identifier: argument.type
path: src/Database/Table/ActiveRow.php
-
identifier: array.invalidKey
path: src/Database/Table/ActiveRow.php
# Return type mismatches from generic covariance and internal caching
-
identifier: return.type
paths:
- src/Database/ResultSet.php
- src/Database/Structure.php
# Internal SQL is dynamically assembled from trusted components, not literal-string
-
message: '#expects literal-string, .+ given#'
paths:
- src/Database/Table/Selection.php
- src/Database/Table/GroupedSelection.php
# Array offset access on Row/ActiveRow objects and nullable arrays
-
identifier: offsetAccess.notFound
path: src/Database/Helpers.php
# Defensive checks that are always true/false per PHPStan type narrowing
-
identifier: empty.offset
path: src/Database/Helpers.php
-
identifier: isset.offset
path: src/Database/Helpers.php
# Latte-generated n:attr idiom: ($tmp = expr) === null ? '' : ...
-
identifier: identical.alwaysFalse
paths:
- src/Bridges/DatabaseTracy/dist/panel.phtml
- src/Bridges/DatabaseTracy/dist/tab.phtml