-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implicit throw point is enough to no longer mark multi-catch as dead
- Loading branch information
1 parent
db1d37e
commit c587dd1
Showing
4 changed files
with
46 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace Bug9406; | ||
|
||
function foo(): void | ||
{ | ||
if ($_POST['foo'] === null) { | ||
throw new \InvalidArgumentException('Foo'); | ||
} | ||
} | ||
|
||
|
||
function app(): void | ||
{ | ||
try { | ||
foo(); | ||
|
||
if ($_POST['bar'] === null) { | ||
throw new \RuntimeException('Bar'); | ||
} | ||
} catch (\RuntimeException|\InvalidArgumentException $e) { | ||
|
||
} | ||
} | ||
|
||
function app2(): void | ||
{ | ||
try { | ||
foo(); | ||
|
||
if ($_POST['bar'] === null) { | ||
throw new \RuntimeException('Bar'); | ||
} | ||
} catch (\InvalidArgumentException $e) { | ||
|
||
} | ||
} |