-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodingStyle] Skip jump change variable name on CatchExceptionNameMat…
…chingTypeRector (#3931) Co-authored-by: GitHub Action <[email protected]>
- Loading branch information
1 parent
88f17e9
commit 4793a0d
Showing
2 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
..._/CatchExceptionNameMatchingTypeRector/Fixture/skip_change_variable_next_jump_try.php.inc
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,20 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector\Fixture; | ||
|
||
class SkipChangevariableNextJumpTry | ||
{ | ||
public function run() | ||
{ | ||
if (rand(0, 1)) { | ||
try { | ||
} catch (SomeException $typoException) { | ||
} | ||
} | ||
|
||
if (isset($typoException)) { | ||
$this->verify($typoException); | ||
$this->verify2($typoException); | ||
} | ||
} | ||
} |
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