We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e82df4d commit 9dd293cCopy full SHA for 9dd293c
1 file changed
tests/PHPStan/Rules/Comparison/data/bug-13566.php
@@ -42,6 +42,26 @@ public function test(): void
42
}
43
44
45
+class ReturnViaString
46
+{
47
+ /** @return ($exit is '1' ? never : void) */
48
+ public static function notFound(string $exit = '1'): void
49
+ {
50
+ header('HTTP/1.1 404 Not Found', true, 404);
51
+
52
+ if ($exit == '1') {
53
+ echo '404 Not Found';
54
+ exit;
55
+ }
56
57
58
+ public function test(): void
59
60
+ // send 404 header
61
+ self::notFound('0');
62
63
+}
64
65
class ReturnViaIntNonNative
66
{
67
/** @return ($exit is 1 ? never : void) */
0 commit comments