File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
tests/PHPStan/Rules/DeadCode Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,12 @@ public function testBug13311(): void
361361 $ this ->analyse ([__DIR__ . '/data/bug-13311.php ' ], []);
362362 }
363363
364+ public function testBug13307 (): void
365+ {
366+ $ this ->treatPhpDocTypesAsCertain = false ;
367+ $ this ->analyse ([__DIR__ . '/data/bug-13307.php ' ], []);
368+ }
369+
364370 public function testBug13331 (): void
365371 {
366372 $ this ->treatPhpDocTypesAsCertain = false ;
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Bug13307 ;
4+
5+ function dd (): never {
6+ exit (1 );
7+ }
8+
9+ class HelloWorld
10+ {
11+ public function testMethod (): string
12+ {
13+ var_dump ("dd " );
14+
15+ return "test " ;
16+ }
17+
18+ public function testMethod2 (): string
19+ {
20+ var_dump ("DD " );
21+
22+ return "test " ;
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments