Skip to content

Commit c129775

Browse files
committed
run rector
1 parent a6e4053 commit c129775

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rules/CodeQuality/Rector/Class_/YieldDataProviderRector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)