[NodeNestingScope] Decopule new package

This commit is contained in:
TomasVotruba 2020-04-14 10:49:58 +02:00
parent a7f5abe2f1
commit 58337e5d0e
11 changed files with 18 additions and 9 deletions

View File

@ -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",

View File

@ -0,0 +1,8 @@
services:
_defaults:
public: true
autowire: true
autoconfigure: true
Rector\NodeNestingScope\:
resource: '../src'

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\DeadCode\ScopeNesting;
namespace Rector\NodeNestingScope;
use PhpParser\Node;
use PhpParser\Node\FunctionLike;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\DeadCode\ScopeNesting;
namespace Rector\NodeNestingScope;
use PhpParser\Node;
use PhpParser\Node\Stmt\Class_;

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Rector\DeadCode\ScopeNesting;
namespace Rector\NodeNestingScope;
use PhpParser\Node;
use PhpParser\Node\FunctionLike;

View File

@ -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

View File

@ -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

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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];