-
-
Notifications
You must be signed in to change notification settings - Fork 217
Expand file tree
/
Copy pathphpstan.neon
More file actions
132 lines (113 loc) 路 3.84 KB
/
Copy pathphpstan.neon
File metadata and controls
132 lines (113 loc) 路 3.84 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
parameters:
level: 8
paths:
- src
fileExtensions:
- php
- phtml
scanFiles:
# ext-ds 2.0 classes unknown to bundled phpstorm-stubs
- phpstan-stubs.php
ignoreErrors:
# Template variables used in required .phtml files via variable scope
-
identifier: closure.unusedUse
path: src/Tracy/BlueScreen/dist/agent.phtml
- # Tracy doesn't need generic type parameters for Fiber, ArrayObject, DOMNodeList, etc.
identifier: missingType.generics
message: '#^(Method|Class|Property|PHPDoc tag @var for variable \$\w+ contains|.+ has parameter \$\w+ with|.+ return type with) .+ (generic|class|interface) (class |interface )?\w+\\?\w*(\\?\w*)* (but )?does not specify its types:#'
paths:
- src/Tracy/BlueScreen/BlueScreen.php
- src/Tracy/BlueScreen/dist/content.phtml
- src/Tracy/BlueScreen/dist/section-exception.phtml
- src/Tracy/Dumper/Exposer.php
# Runtime validation of callable-string and Closure types
-
identifier: function.alreadyNarrowedType
path: src/Tracy/BlueScreen/BlueScreen.php
# Tracy uses dynamic properties on exceptions and panels
-
identifier: property.notFound
paths:
- src/Tracy/Bar/dist/info.panel.phtml
- src/Tracy/Bar/dist/info.tab.phtml
- src/Tracy/Bar/panels/info.panel.php
- src/Tracy/Debugger/DevelopmentStrategy.php
- src/Tracy/Helpers.php
# Private methods called from .phtml template files
-
identifier: method.unused
path: src/Tracy/BlueScreen/BlueScreen.php
-
identifier: method.private
path: src/Tracy/BlueScreen/dist
# PHPStan doesn't track reference assignments to snapshot array
-
identifier: booleanAnd.leftAlwaysTrue
path: src/Tracy/Dumper/Describer.php
-
identifier: booleanNot.alwaysFalse
path: src/Tracy/Dumper/Describer.php
# Condition inside if-block checking same variable
-
identifier: ternary.alwaysTrue
path: src/Tracy/Dumper/Renderer.php
# PHP 8.4+ adds 'trace' key to error_get_last() return
-
identifier: empty.offset
path: src/Tracy/Debugger/Debugger.php
-
identifier: offsetAccess.notFound
path: src/Tracy/Debugger/Debugger.php
# Variable is always defined when used (same function_exists() condition guards both paths)
-
identifier: variable.undefined
path: src/Tracy/Debugger/DevelopmentStrategy.php
# Deprecated property without type
-
identifier: missingType.property
path: src/Tracy/Debugger/Debugger.php
# Closure parameter used for inspection only, signature not relevant
-
identifier: missingType.callable
path: src/Tracy/Dumper/Exposer.php
# ILogger::log() return type omitted for backward compatibility
-
identifier: missingType.return
path: src/Tracy/Logger/ILogger.php
# Arrow function callback receives class names from get_declared_classes() etc.
-
identifier: argument.type
message: '#class\-string#'
path: src/Tracy/Bar/panels/info.panel.php
# getPanel() returns ?IBarPanel but panel is always registered; dynamic props correct by design
-
identifier: property.nonObject
path: src/Tracy/Debugger/DevelopmentStrategy.php
# Value::$id and $value are always non-null when used as array keys (snapshot/above maps)
-
identifier: offsetAccess.invalidOffset
paths:
- src/Tracy/Dumper/Describer.php
- src/Tracy/Dumper/Renderer.php
# Latte-compiled .phtml templates: PHPStan false positives from generated code patterns
-
identifier: identical.alwaysFalse
paths:
- src/Tracy/Bar/dist
- src/Tracy/BlueScreen/dist
-
identifier: ternary.alwaysTrue
paths:
- src/Tracy/Bar/dist
- src/Tracy/BlueScreen/dist
-
identifier: if.alwaysTrue
paths:
- src/Tracy/BlueScreen/dist
-
identifier: variable.undefined
path: src/Tracy/BlueScreen/dist/section-exception-causedBy.phtml
-
identifier: booleanNot.alwaysFalse
path: src/Tracy/BlueScreen/dist/section-exception-causedBy.phtml