File tree Expand file tree Collapse file tree
CodeQuality/Rector/ClassMethod
Symfony43/Rector/StmtsAwareInterface Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,13 +101,11 @@ public function refactor(Node $node): ?Node
101101 }
102102 }
103103
104- if ($ setDataPosition === null ) {
105- if ($ jsonResponseVariable instanceof Variable) {
106- $ setDataExpr = $ this ->matchSetDataMethodCallExpr ($ stmt , $ jsonResponseVariable );
107- if ($ setDataExpr instanceof Expr) {
108- $ setDataPosition = $ key ;
109- continue ;
110- }
104+ if ($ setDataPosition === null && $ jsonResponseVariable instanceof Variable) {
105+ $ setDataExpr = $ this ->matchSetDataMethodCallExpr ($ stmt , $ jsonResponseVariable );
106+ if ($ setDataExpr instanceof Expr) {
107+ $ setDataPosition = $ key ;
108+ continue ;
111109 }
112110 }
113111
Original file line number Diff line number Diff line change 1212use PhpParser \Node \Name \FullyQualified ;
1313use PhpParser \Node \Stmt \Expression ;
1414use PHPStan \Type \ObjectType ;
15- use Rector \Contract \PhpParser \Node \StmtsAwareInterface ;
1615use Rector \PhpParser \Enum \NodeGroup ;
1716use Rector \Rector \AbstractRector ;
1817use Symplify \RuleDocGenerator \ValueObject \CodeSample \CodeSample ;
@@ -92,7 +91,10 @@ public function refactor(Node $node): ?Node
9291 return $ node ;
9392 }
9493
95- private function resolveFileSystemLoaderNew (StmtsAwareInterface $ stmtsAware ): ?New_
94+ /**
95+ * @param StmtsAware $stmtsAware
96+ */
97+ private function resolveFileSystemLoaderNew (Node $ stmtsAware ): ?New_
9698 {
9799 foreach ((array ) $ stmtsAware ->stmts as $ stmt ) {
98100 if (! $ stmt instanceof Expression) {
You can’t perform that action at this time.
0 commit comments