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 2f3b833 commit d29251dCopy full SHA for d29251d
tests/PHPStan/Rules/DeadCode/UnreachableStatementRuleTest.php
@@ -361,4 +361,10 @@ public function testBug13311(): void
361
$this->analyse([__DIR__ . '/data/bug-13311.php'], []);
362
}
363
364
+ public function testBug13331(): void
365
+ {
366
+ $this->treatPhpDocTypesAsCertain = false;
367
+ $this->analyse([__DIR__ . '/data/bug-13331.php'], []);
368
+ }
369
+
370
tests/PHPStan/Rules/DeadCode/data/bug-13331.php
@@ -0,0 +1,12 @@
1
+<?php declare(strict_types = 1);
2
3
+namespace Bug13331;
4
5
+$signalHandler = function () {
6
+ exit();
7
+};
8
9
+pcntl_async_signals(true);
10
+pcntl_signal(SIGINT, $signalHandler);
11
+pcntl_signal(SIGQUIT, $signalHandler);
12
+pcntl_signal(SIGTERM, $signalHandler);
0 commit comments