Skip to content

Commit 5b2dd6a

Browse files
committed
Change namespace from DeadCode to Transform
1 parent 6071179 commit 5b2dd6a

12 files changed

Lines changed: 50 additions & 51 deletions

File tree

config/set/php85.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use PhpParser\Node\Expr\Cast\Int_;
88
use PhpParser\Node\Expr\Cast\String_;
99
use Rector\Config\RectorConfig;
10-
use Rector\DeadCode\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector;
1110
use Rector\DeadCode\ValueObject\WrapFuncCallWithPhpVersionIdChecker;
1211
use Rector\Php85\Rector\ArrayDimFetch\ArrayFirstLastRector;
1312
use Rector\Php85\Rector\ClassMethod\NullDebugInfoReturnRector;
@@ -21,6 +20,7 @@
2120
use Rector\Renaming\ValueObject\MethodCallRename;
2221
use Rector\Renaming\ValueObject\RenameCast;
2322
use Rector\Renaming\ValueObject\RenameClassAndConstFetch;
23+
use Rector\Transform\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector;
2424

2525
return static function (RectorConfig $rectorConfig): void {
2626
$rectorConfig->rules(

rules-tests/DeadCode/Rector/FuncCall/WrapFuncCallWithPhpVersionIdCheckerRector/Fixture/different_function.php.inc

Lines changed: 0 additions & 8 deletions
This file was deleted.

rules-tests/DeadCode/Rector/FuncCall/WrapFuncCallWithPhpVersionIdCheckerRector/Fixture/skip_func_call_in_assignment.php.inc

Lines changed: 0 additions & 7 deletions
This file was deleted.

rules-tests/DeadCode/Rector/FuncCall/WrapFuncCallWithPhpVersionIdCheckerRector/Fixture/skip_func_call_in_condition.php.inc

Lines changed: 0 additions & 9 deletions
This file was deleted.

rules-tests/DeadCode/Rector/FuncCall/WrapFuncCallWithPhpVersionIdCheckerRector/Fixture/wrapped_function.php.inc

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Rector\Tests\Transform\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector\Fixture;
4+
5+
different_function();
6+
different_function(1, 2);
7+
8+
?>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Rector\Tests\Transform\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector\Fixture;
4+
5+
$foo = no_op_function();
6+
7+
?>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
namespace Rector\Tests\Transform\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector\Fixture;
4+
5+
if (no_op_function()) {
6+
7+
}
8+
9+
?>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Rector\Tests\Transform\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector\Fixture;
4+
5+
no_op_function();
6+
no_op_function(1, 2);
7+
8+
?>
9+
-----
10+
<?php
11+
12+
namespace Rector\Tests\Transform\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector\Fixture;
13+
14+
if (PHP_VERSION_ID < 80500) {
15+
no_op_function();
16+
}
17+
if (PHP_VERSION_ID < 80500) {
18+
no_op_function(1, 2);
19+
}
20+
21+
?>

rules-tests/DeadCode/Rector/FuncCall/WrapFuncCallWithPhpVersionIdCheckerRector/WrapFuncCallWithPhpVersionIdCheckerRectorTest.php renamed to rules-tests/Transform/Rector/FuncCall/WrapFuncCallWithPhpVersionIdCheckerRector/WrapFuncCallWithPhpVersionIdCheckerRectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Rector\Tests\DeadCode\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector;
3+
namespace Rector\Tests\Transform\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector;
44

55
use Iterator;
66
use PHPUnit\Framework\Attributes\DataProvider;

0 commit comments

Comments
 (0)