File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
rules/DeadCode/Rector/ClassMethod Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 44
55namespace Rector \DeadCode \Rector \ClassMethod ;
66
7+ use PhpParser \Node \Expr \Variable ;
78use PhpParser \Node ;
89use PhpParser \Node \Arg ;
910use PhpParser \Node \Expr \StaticCall ;
@@ -102,14 +103,14 @@ public function refactor(Node $node): ?int
102103
103104 // match passed names in the same order
104105 $ paramNames = [];
105- foreach ($ constructorParams as $ param ) {
106- $ paramNames [] = $ this ->getName ($ param ->var );
106+ foreach ($ constructorParams as $ constructorParam ) {
107+ $ paramNames [] = $ this ->getName ($ constructorParam ->var );
107108 }
108109
109110 $ argNames = [];
110111 foreach ($ parentCallArgs as $ parentCallArg ) {
111112 $ argValue = $ parentCallArg ->value ;
112- if (! $ argValue instanceof Node \ Expr \ Variable) {
113+ if (! $ argValue instanceof Variable) {
113114 return null ;
114115 }
115116
Original file line number Diff line number Diff line change 55namespace Rector \Comments \NodeTraverser ;
66
77use PhpParser \NodeTraverser ;
8- use Rector \Comments \NodeVisitor \CommentRemovingNodeVisitor ;
98
109final class CommentRemovingNodeTraverser extends NodeTraverser
1110{
12- public function __construct (CommentRemovingNodeVisitor $ commentRemovingNodeVisitor )
13- {
14- parent ::__construct ($ commentRemovingNodeVisitor );
15- }
1611}
You can’t perform that action at this time.
0 commit comments