mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-07 20:00:50 +00:00
[NodeNestingScope] Decopule new package
This commit is contained in:
parent
a7f5abe2f1
commit
58337e5d0e
|
@ -112,6 +112,7 @@
|
|||
"Rector\\Renaming\\": "rules/renaming/src",
|
||||
"Rector\\Restoration\\": "rules/restoration/src",
|
||||
"Rector\\SOLID\\": "rules/solid/src",
|
||||
"Rector\\NodeNestingScope\\": "packages/node-nesting-scope/src",
|
||||
"Rector\\Sensio\\": "rules/sensio/src",
|
||||
"Rector\\Shopware\\": "rules/shopware/src",
|
||||
"Rector\\Silverstripe\\": "rules/silverstripe/src",
|
||||
|
|
8
packages/node-nesting-scope/config/config.yaml
Normal file
8
packages/node-nesting-scope/config/config.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
services:
|
||||
_defaults:
|
||||
public: true
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
|
||||
Rector\NodeNestingScope\:
|
||||
resource: '../src'
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\DeadCode\ScopeNesting;
|
||||
namespace Rector\NodeNestingScope;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\FunctionLike;
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\DeadCode\ScopeNesting;
|
||||
namespace Rector\NodeNestingScope;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Class_;
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\DeadCode\ScopeNesting;
|
||||
namespace Rector\NodeNestingScope;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\FunctionLike;
|
|
@ -13,8 +13,8 @@ use PHPStan\Type\MixedType;
|
|||
use PHPStan\Type\Type;
|
||||
use Rector\Core\PhpParser\Node\BetterNodeFinder;
|
||||
use Rector\Core\PhpParser\Printer\BetterStandardPrinter;
|
||||
use Rector\DeadCode\ScopeNesting\ParentScopeFinder;
|
||||
use Rector\NodeNameResolver\NodeNameResolver;
|
||||
use Rector\NodeNestingScope\ParentScopeFinder;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
|
||||
final class PregMatchTypeCorrector
|
||||
|
|
|
@ -9,7 +9,7 @@ use PhpParser\Node\Expr\Assign;
|
|||
use PhpParser\NodeTraverser;
|
||||
use Rector\Core\PhpParser\NodeTraverser\CallableNodeTraverser;
|
||||
use Rector\Core\PhpParser\Printer\BetterStandardPrinter;
|
||||
use Rector\DeadCode\ScopeNesting\ParentScopeFinder;
|
||||
use Rector\NodeNestingScope\ParentScopeFinder;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
|
||||
final class NextVariableUsageNodeFinder
|
||||
|
|
|
@ -16,7 +16,7 @@ use PhpParser\Node\Stmt\Expression;
|
|||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\RectorDefinition\CodeSample;
|
||||
use Rector\Core\RectorDefinition\RectorDefinition;
|
||||
use Rector\DeadCode\ScopeNesting\ScopeNestingComparator;
|
||||
use Rector\NodeNestingScope\ScopeNestingComparator;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,8 +13,8 @@ use Rector\Core\RectorDefinition\CodeSample;
|
|||
use Rector\Core\RectorDefinition\RectorDefinition;
|
||||
use Rector\DeadCode\NodeFinder\NextVariableUsageNodeFinder;
|
||||
use Rector\DeadCode\NodeFinder\PreviousVariableAssignNodeFinder;
|
||||
use Rector\DeadCode\ScopeNesting\ScopeNestingComparator;
|
||||
use Rector\DeadCode\SideEffect\SideEffectNodeDetector;
|
||||
use Rector\NodeNestingScope\ScopeNestingComparator;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,8 +12,8 @@ use Rector\Core\Context\ContextAnalyzer;
|
|||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\RectorDefinition\CodeSample;
|
||||
use Rector\Core\RectorDefinition\RectorDefinition;
|
||||
use Rector\DeadCode\ScopeNesting\FlowOfControlLocator;
|
||||
use Rector\DeadCode\ValueObject\VariableNodeUse;
|
||||
use Rector\NodeNestingScope\FlowOfControlLocator;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,7 @@ use Rector\NodeTypeResolver\NodeTypeResolver;
|
|||
final class SideEffectNodeDetector
|
||||
{
|
||||
/**
|
||||
* @var class-string[]
|
||||
* @var string[]
|
||||
*/
|
||||
private const SIDE_EFFECT_NODE_TYPES = [Encapsed::class, New_::class, Concat::class, PropertyFetch::class];
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user