File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
rules/CodeQuality/Rector/ClassMethod Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -128,15 +128,12 @@ public function refactor(Node $node): ?Node
128128 $ assign = $ stmt ->expr ;
129129
130130 $ instanceArg = $ this ->assignedMocksCollector ->matchCreateMockArgAssignedToVariable ($ assign );
131- if ($ instanceArg instanceof Arg && $ assign ->var instanceof Variable) {
132- if ($ this ->isName ($ assign ->var , $ variableName )) {
133- // 1. remove assign
134- unset($ node ->stmts [$ key ]);
135- $ hasChanged = true ;
136-
137- $ variablesToMethodCalls [$ variableName ] = $ assign ->expr ;
138- continue ;
139- }
131+ if ($ instanceArg instanceof Arg && $ assign ->var instanceof Variable && $ this ->isName ($ assign ->var , $ variableName )) {
132+ // 1. remove assign
133+ unset($ node ->stmts [$ key ]);
134+ $ hasChanged = true ;
135+ $ variablesToMethodCalls [$ variableName ] = $ assign ->expr ;
136+ continue ;
140137 }
141138 }
142139
You can’t perform that action at this time.
0 commit comments