mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
move SwapFuncCallArgumentsRector to Argument
This commit is contained in:
parent
7d9c389748
commit
980778d69b
@ -71,7 +71,6 @@
|
||||
"Rector\\PHPUnit\\": "packages/PHPUnit/src",
|
||||
"Rector\\PSR4\\": "packages/PSR4/src",
|
||||
"Rector\\PhpSpecToPHPUnit\\": "packages/PhpSpecToPHPUnit/src",
|
||||
"Rector\\Php\\": "packages/Php/src",
|
||||
"Rector\\Php52\\": "packages/Php52/src",
|
||||
"Rector\\Php53\\": "packages/Php53/src",
|
||||
"Rector\\Php54\\": "packages/Php54/src",
|
||||
@ -129,7 +128,6 @@
|
||||
"Rector\\PHPUnit\\Tests\\": "packages/PHPUnit/tests",
|
||||
"Rector\\PSR4\\Tests\\": "packages/PSR4/tests",
|
||||
"Rector\\PhpSpecToPHPUnit\\Tests\\": "packages/PhpSpecToPHPUnit/tests",
|
||||
"Rector\\Php\\Tests\\": "packages/Php/tests",
|
||||
"Rector\\Php52\\Tests\\": "packages/Php52/tests",
|
||||
"Rector\\Php53\\Tests\\": "packages/Php53/tests",
|
||||
"Rector\\Php54\\Tests\\": "packages/Php54/tests",
|
||||
|
@ -7,7 +7,7 @@ services:
|
||||
Rector\MysqlToMysqli\Rector\FuncCall\MysqlPConnectToMysqliConnectRector: ~
|
||||
|
||||
# first swap arguments, then rename
|
||||
Rector\Php\Rector\FuncCall\SwapFuncCallArgumentsRector:
|
||||
Rector\Rector\Argument\SwapFuncCallArgumentsRector:
|
||||
mysql_real_escape_string: [1, 0]
|
||||
mysql_select_db: [1, 0]
|
||||
mysql_set_charset: [1, 0]
|
||||
|
@ -4647,7 +4647,7 @@ String asserts must be passed directly to assert()
|
||||
|
||||
### `SwapFuncCallArgumentsRector`
|
||||
|
||||
- class: `Rector\Php\Rector\FuncCall\SwapFuncCallArgumentsRector`
|
||||
- class: `Rector\Rector\Argument\SwapFuncCallArgumentsRector`
|
||||
|
||||
Swap arguments in function calls
|
||||
|
||||
|
@ -12,11 +12,11 @@ use PhpParser\Node\Stmt\Foreach_;
|
||||
use PhpParser\Node\Stmt\If_;
|
||||
use PhpParser\Node\Stmt\Return_;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\PhpParser\Node\Manipulator\ForeachManipulator;
|
||||
use Rector\Rector\AbstractRector;
|
||||
use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
|
||||
/**
|
||||
* @see \Rector\CodeQuality\Tests\Rector\Foreach_\SimplifyForeachToCoalescingRector\SimplifyForeachToCoalescingRectorTest
|
||||
|
@ -8,11 +8,11 @@ use PhpParser\Node\Expr\BinaryOp\Coalesce;
|
||||
use PhpParser\Node\Stmt\If_;
|
||||
use PhpParser\Node\Stmt\Return_;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\PhpParser\Node\Manipulator\IfManipulator;
|
||||
use Rector\Rector\AbstractRector;
|
||||
use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
|
||||
/**
|
||||
* @see \Rector\CodeQuality\Tests\Rector\If_\ConsecutiveNullCompareReturnsToNullCoalesceQueueRector\ConsecutiveNullCompareReturnsToNullCoalesceQueueRectorTest
|
||||
|
@ -47,13 +47,13 @@ use Rector\Exception\ShouldNotHappenException;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\NodeTypeResolver\PHPStan\Type\TypeFactory;
|
||||
use Rector\Php\PhpVersionProvider;
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\PHPStan\Type\AliasedObjectType;
|
||||
use Rector\PHPStan\Type\FullyQualifiedObjectType;
|
||||
use Rector\PHPStan\Type\ParentStaticType;
|
||||
use Rector\PHPStan\Type\SelfObjectType;
|
||||
use Rector\PHPStan\Type\ShortenedObjectType;
|
||||
use Rector\TypeDeclaration\PHPStan\Type\ObjectTypeSpecifier;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
|
@ -1,8 +0,0 @@
|
||||
services:
|
||||
_defaults:
|
||||
public: true
|
||||
autowire: true
|
||||
|
||||
Rector\Php\:
|
||||
resource: '../src'
|
||||
exclude: '../src/{Rector/**/*Rector.php,ValueObject/*}'
|
@ -8,10 +8,10 @@ use PhpParser\Node\Expr\BinaryOp\Identical;
|
||||
use PhpParser\Node\Expr\BinaryOp\NotIdentical;
|
||||
use PhpParser\Node\Expr\Isset_;
|
||||
use PhpParser\Node\Expr\Ternary;
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\Rector\AbstractRector;
|
||||
use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
|
||||
/**
|
||||
* @see \Rector\Php70\Tests\Rector\Ternary\TernaryToNullCoalescingRector\TernaryToNullCoalescingRectorTest
|
||||
|
@ -8,10 +8,10 @@ use PhpParser\Node\Expr\BinaryOp\Greater;
|
||||
use PhpParser\Node\Expr\BinaryOp\Smaller;
|
||||
use PhpParser\Node\Expr\BinaryOp\Spaceship;
|
||||
use PhpParser\Node\Expr\Ternary;
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\Rector\AbstractRector;
|
||||
use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
|
||||
/**
|
||||
* @see https://wiki.php.net/rfc/combined-comparison-operator
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
namespace Rector\Php71\Tests\Rector\BinaryOp\IsIterableRector;
|
||||
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\Php71\Rector\BinaryOp\IsIterableRector;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
|
||||
final class PolyfillRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
|
@ -18,10 +18,10 @@ use PhpParser\Node\Stmt\Return_;
|
||||
use PHPStan\Type\ArrayType;
|
||||
use PHPStan\Type\MixedType;
|
||||
use Rector\Bridge\Contract\AnalyzedApplicationContainerInterface;
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\Rector\AbstractRector;
|
||||
use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher;
|
||||
|
||||
/**
|
||||
|
@ -6,11 +6,11 @@ use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\Closure;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\Rector\AbstractRector;
|
||||
use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
use Rector\TypeDeclaration\TypeInferer\ReturnTypeInferer;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
|
||||
/**
|
||||
* @see \Rector\TypeDeclaration\Tests\Rector\Closure\AddClosureReturnTypeRector\AddClosureReturnTypeRectorTest
|
||||
|
@ -11,9 +11,9 @@ use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use PHPStan\Type\Type;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
|
||||
/**
|
||||
* @see \Rector\TypeDeclaration\Tests\Rector\FunctionLike\ParamTypeDeclarationRector\ParamTypeDeclarationRectorTest
|
||||
|
@ -10,11 +10,11 @@ use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\Type;
|
||||
use Rector\Exception\ShouldNotHappenException;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Php\ValueObject\PhpVersionFeature;
|
||||
use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
use Rector\TypeDeclaration\TypeInferer\ReturnTypeInferer;
|
||||
use Rector\TypeDeclaration\TypeInferer\ReturnTypeInferer\ReturnTypeDeclarationReturnTypeInferer;
|
||||
use Rector\ValueObject\PhpVersionFeature;
|
||||
|
||||
/**
|
||||
* @sponsor Thanks https://spaceflow.io/ for sponsoring this rule - visit them on https://github.com/SpaceFlow-app
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Php\Rector\FuncCall;
|
||||
namespace Rector\Rector\Argument;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
@ -9,7 +9,7 @@ use Rector\RectorDefinition\CodeSample;
|
||||
use Rector\RectorDefinition\RectorDefinition;
|
||||
|
||||
/**
|
||||
* @see \Rector\Php\Tests\Rector\FuncCall\SwapFuncCallArgumentsRector\SwapFuncCallArgumentsRectorTest
|
||||
* @see \Rector\Tests\Rector\Argument\SwapFuncCallArgumentsRector\SwapFuncCallArgumentsRectorTest
|
||||
*/
|
||||
final class SwapFuncCallArgumentsRector extends AbstractRector
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Php\ValueObject;
|
||||
namespace Rector\ValueObject;
|
||||
|
||||
final class PhpVersionFeature
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Php\Tests\Rector\FuncCall\SwapFuncCallArgumentsRector\Fixture;
|
||||
namespace Rector\Tests\Rector\Argument\SwapFuncCallArgumentsRector\Fixture;
|
||||
|
||||
final class SomeClass
|
||||
{
|
||||
@ -14,7 +14,7 @@ final class SomeClass
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Php\Tests\Rector\FuncCall\SwapFuncCallArgumentsRector\Fixture;
|
||||
namespace Rector\Tests\Rector\Argument\SwapFuncCallArgumentsRector\Fixture;
|
||||
|
||||
final class SomeClass
|
||||
{
|
@ -1,8 +1,8 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Php\Tests\Rector\FuncCall\SwapFuncCallArgumentsRector;
|
||||
namespace Rector\Tests\Rector\Argument\SwapFuncCallArgumentsRector;
|
||||
|
||||
use Rector\Php\Rector\FuncCall\SwapFuncCallArgumentsRector;
|
||||
use Rector\Rector\Argument\SwapFuncCallArgumentsRector;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class SwapFuncCallArgumentsRectorTest extends AbstractRectorTestCase
|
Loading…
x
Reference in New Issue
Block a user