File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
rules/CodeQuality/Rector/Class_ Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -135,21 +135,25 @@ private function collectReturnArrayNodesFromClassMethod(ClassMethod $classMethod
135135 if ($ statement instanceof Expression) {
136136 $ statement = $ statement ->expr ;
137137 }
138+
138139 if ($ statement instanceof Return_) {
139140 $ returnedExpr = $ statement ->expr ;
140141 if (! $ returnedExpr instanceof Array_) {
141142 return null ;
142143 }
144+
143145 return $ returnedExpr ;
144146 }
145147
146148 if ($ statement instanceof YieldFrom) {
147149 if (! $ statement ->expr instanceof Array_) {
148150 return null ;
149151 }
152+
150153 if ($ yieldedFromExpr instanceof Array_) {
151154 return null ;
152155 }
156+
153157 $ yieldedFromExpr = $ statement ->expr ;
154158 } elseif (
155159 ! $ statement instanceof Assign
You can’t perform that action at this time.
0 commit comments