File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,15 @@ public function testBug13813(): void
1919 {
2020 $ oldReporting = error_reporting ();
2121
22- error_reporting (E_ALL );
23- $ analyzerResult = $ this ->runAnalyse ([
24- __DIR__ . '/data/bug-13813.php ' ,
25- __DIR__ . '/Bug13813Rule.php ' ,
26- ]);
22+ try {
23+ error_reporting (E_ALL );
24+ $ analyzerResult = $ this ->runAnalyse ([
25+ __DIR__ . '/data/bug-13813.php ' ,
26+ __DIR__ . '/Bug13813Rule.php ' ,
27+ ]);
28+ } finally {
29+ error_reporting ($ oldReporting );
30+ }
2731 $ this ->assertCount (2 , $ analyzerResult ->getAllPhpErrors ());
2832 $ this ->assertCount (2 , $ analyzerResult ->getFilteredPhpErrors ());
2933
@@ -46,8 +50,6 @@ public function testBug13813(): void
4650 $ analyzerResult ->getAllPhpErrors ()[1 ]->getMessage (),
4751 );
4852 }
49-
50- error_reporting ($ oldReporting );
5153 }
5254
5355 /**
You can’t perform that action at this time.
0 commit comments