mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-22 08:25:02 +02:00
ArrayToYieldDataProviderRector: improve complexity
This commit is contained in:
parent
96a668f95c
commit
3c0beaab69
@ -134,13 +134,15 @@ CODE_SAMPLE
|
||||
}
|
||||
|
||||
foreach ($statements as $statement) {
|
||||
if ($statement instanceof Return_) {
|
||||
if (! $statement->expr instanceof Array_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->isArrayOfArrays($statement->expr);
|
||||
if (! $statement instanceof Return_) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! $statement->expr instanceof Array_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->isArrayOfArrays($statement->expr);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user