-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
implicitThrows
to only look for explicit throw points in too-wi…
…de `@throws` rules when set to `false`
- Loading branch information
1 parent
4b974a4
commit a0e688c
Showing
5 changed files
with
63 additions
and
4 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
22 changes: 22 additions & 0 deletions
22
tests/PHPStan/Rules/Exceptions/data/too-wide-throws-explicit.php
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,22 @@ | ||
<?php | ||
|
||
namespace TooWideThrowsExplicit; | ||
|
||
class Foo | ||
{ | ||
|
||
/** | ||
* @throws \Exception | ||
*/ | ||
public function doFoo(): void | ||
{ | ||
$a = 1 + 1; | ||
$this->doBar(); | ||
} | ||
|
||
public function doBar(): void | ||
{ | ||
|
||
} | ||
|
||
} |