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 61c35ce commit fb014eeCopy full SHA for fb014ee
tests/PHPStan/Analyser/nsrt/bug-11293.php
@@ -48,4 +48,15 @@ public function sayHello5(string $s): void
48
49
assertType('array{string, non-falsy-string&numeric-string}', $matches);
50
}
51
+
52
+ public function sayHello6(string $s): void
53
+ {
54
+ if (1 > preg_match('/data-(\d{6})\.json$/', $s, $matches)) {
55
+ assertType('array{}', $matches);
56
57
+ return;
58
+ }
59
60
+ assertType('array{string, non-falsy-string&numeric-string}', $matches);
61
62
0 commit comments