forked from rectorphp/rector-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Performance] [TypeDeclaration] No need check parent method when meth…
…od is private on AddVoidReturnTypeWhereNoReturnRector (rectorphp#5690) * [TypeDeclaration] No need check parent method when method is private on AddVoidReturnTypeWhereNoReturnRector * [TypeDeclaration] No need check parent method when method is private on AddVoidReturnTypeWhereNoReturnRector
- Loading branch information
1 parent
3ebaa06
commit 77b1a08
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...r/ClassMethod/AddVoidReturnTypeWhereNoReturnRector/Fixture/void_on_private_method.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,29 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector\Fixture; | ||
|
||
final class VoidOnPrivateMethod | ||
{ | ||
private function getValues() | ||
{ | ||
$value = 1000; | ||
return; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector\Fixture; | ||
|
||
final class VoidOnPrivateMethod | ||
{ | ||
private function getValues(): void | ||
{ | ||
$value = 1000; | ||
return; | ||
} | ||
} | ||
|
||
?> |
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