-
-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! fixup! [PHP 8.1] Add ReturnNeverTypeRector
- Loading branch information
1 parent
8df1f7b
commit dba460f
Showing
3 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...s-tests/TypeDeclaration/Rector/ClassMethod/ReturnNeverTypeRector/Fixture/die_some.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\ReturnNeverTypeRector\Fixture; | ||
|
||
final class DieSome | ||
{ | ||
public function run() | ||
{ | ||
echo 100; | ||
die; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector\Fixture; | ||
|
||
final class DieSome | ||
{ | ||
public function run(): never | ||
{ | ||
echo 100; | ||
die; | ||
} | ||
} | ||
|
||
?> |
29 changes: 29 additions & 0 deletions
29
...-tests/TypeDeclaration/Rector/ClassMethod/ReturnNeverTypeRector/Fixture/exit_some.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\ReturnNeverTypeRector\Fixture; | ||
|
||
final class ExitSome | ||
{ | ||
public function run() | ||
{ | ||
echo 100; | ||
exit; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector\Fixture; | ||
|
||
final class ExitSome | ||
{ | ||
public function run(): never | ||
{ | ||
echo 100; | ||
exit; | ||
} | ||
} | ||
|
||
?> |
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