We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6db4e7 commit 61e0eeaCopy full SHA for 61e0eea
tests/PHPStan/Analyser/nsrt/bug-12393.php
@@ -143,3 +143,23 @@ public function getMixed()
143
}
144
145
146
+
147
+// https://3v4l.org/LK6Rh
148
+class CallableString {
149
+ private string $foo;
150
151
+ public function doFoo(callable $foo): void {
152
+ $this->foo = $foo; // PHPStorm wrongly reports an error on this line
153
+ assertType('callable-string|non-empty-string', $this->foo);
154
+ }
155
+}
156
157
+// https://3v4l.org/WJ8NW
158
+class CallableArray {
159
+ private array $foo;
160
161
162
+ $this->foo = $foo;
163
+ assertType('array', $this->foo); // could be non-empty-array
164
165
0 commit comments