-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DeadCode] Ensure no stmts check on RemovePhpVersionIdCheckRector (#2260
) * [DeadCode] Ensure no stmts check on RemovePhpVersionIdCheckRector * [DeadCode] Ensure no stmts check on RemovePhpVersionIdCheckRector * Fixed 🎉 * more fixture
- Loading branch information
1 parent
2dd8c6b
commit fb8260c
Showing
3 changed files
with
104 additions
and
37 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...s-tests/DeadCode/Rector/ConstFetch/RemovePhpVersionIdCheckRector/Fixture/no_stmts.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,27 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ConstFetch\RemovePhpVersionIdCheckRector\Fixture; | ||
|
||
class NoStmts | ||
{ | ||
public function run() | ||
{ | ||
if (PHP_VERSION_ID > 80000) { | ||
} | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ConstFetch\RemovePhpVersionIdCheckRector\Fixture; | ||
|
||
class NoStmts | ||
{ | ||
public function run() | ||
{ | ||
} | ||
} | ||
|
||
?> |
31 changes: 31 additions & 0 deletions
31
...-tests/DeadCode/Rector/ConstFetch/RemovePhpVersionIdCheckRector/Fixture/no_stmts2.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,31 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ConstFetch\RemovePhpVersionIdCheckRector\Fixture; | ||
|
||
class NoStmts2 | ||
{ | ||
public function run() | ||
{ | ||
if (80000 > PHP_VERSION_ID) { | ||
|
||
} | ||
|
||
echo 'do something'; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\ConstFetch\RemovePhpVersionIdCheckRector\Fixture; | ||
|
||
class NoStmts2 | ||
{ | ||
public function run() | ||
{ | ||
echo 'do something'; | ||
} | ||
} | ||
|
||
?> |
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