mirror of https://github.com/rectorphp/rector.git
cleanup
This commit is contained in:
parent
3a6eee57f3
commit
ebe7698bae
|
@ -17,7 +17,7 @@
|
|||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.2",
|
||||
"tracy/tracy": "^2.4",
|
||||
"symplify/easy-coding-standard": "^2.1",
|
||||
"symplify/easy-coding-standard": "@dev",
|
||||
"phpstan/phpstan": "^0.7"
|
||||
},
|
||||
"autoload": {
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
includes:
|
||||
|
||||
checkers:
|
||||
|
|
|
@ -4,8 +4,6 @@ namespace Rector\DependencyInjection\CompilerPass;
|
|||
|
||||
use PhpParser\NodeTraverser;
|
||||
use PhpParser\NodeVisitor;
|
||||
use Rector\Contract\Dispatcher\ReconstructorInterface;
|
||||
use Rector\Dispatcher\NodeDispatcher;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
|
|
@ -101,28 +101,4 @@ final class InjectAnnotationToConstructorNodeVisitor extends NodeVisitorAbstract
|
|||
|
||||
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when leaving a node.
|
||||
*
|
||||
* Return value semantics:
|
||||
* * null
|
||||
* => $node stays as-is
|
||||
* * NodeTraverser::REMOVE_NODE
|
||||
* => $node is removed from the parent array
|
||||
* * NodeTraverser::STOP_TRAVERSAL
|
||||
* => Traversal is aborted. $node stays as-is
|
||||
* * array (of Nodes)
|
||||
* => The return value is merged into the parent array (at the position of the $node)
|
||||
* * otherwise
|
||||
* => $node is set to the return value
|
||||
*
|
||||
* @param Node $node Node
|
||||
*
|
||||
* @return null|int|Node|Node[] Replacement node (or special return value)
|
||||
*/
|
||||
public function leaveNode(Node $node)
|
||||
{
|
||||
// TODO: Implement leaveNode() method.
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ use PhpParser\Node\Expr\Variable;
|
|||
use PhpParser\Node\Scalar\String_;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\NodeTraverser;
|
||||
use PhpParser\NodeVisitorAbstract;
|
||||
use Rector\Analyzer\ClassAnalyzer;
|
||||
use Rector\Builder\ConstructorMethodBuilder;
|
||||
|
@ -228,6 +229,11 @@ final class NamedServicesToConstructorNodeVisitor extends NodeVisitorAbstract
|
|||
*/
|
||||
public function enterNode(Node $node)
|
||||
{
|
||||
return $this->isCandidate($node);
|
||||
if ($this->isCandidate($node)) {
|
||||
$this->reconstruct($node);
|
||||
return;
|
||||
}
|
||||
|
||||
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue