Skip to content

Commit f88848d

Browse files
committed
Change namespace from DeadCode to Transform
1 parent e1f46f3 commit f88848d

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
@@ -3,14 +3,14 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6-
use Rector\DeadCode\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector;
76
use Rector\DeadCode\ValueObject\WrapFuncCallWithPhpVersionIdChecker;
87
use Rector\Php85\Rector\ArrayDimFetch\ArrayFirstLastRector;
98
use Rector\Removing\Rector\FuncCall\RemoveFuncCallArgRector;
109
use Rector\Removing\ValueObject\RemoveFuncCallArg;
1110
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
1211
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
1312
use Rector\Renaming\ValueObject\MethodCallRename;
13+
use Rector\Transform\Rector\FuncCall\WrapFuncCallWithPhpVersionIdCheckerRector;
1414

1515
return static function (RectorConfig $rectorConfig): void {
1616
$rectorConfig->rules([ArrayFirstLastRector::class]);

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)