Use early return
This commit is contained in:
parent
34b6ce9259
commit
5f891435f1
@ -105,13 +105,14 @@ class DefaultRegion implements Region
|
|||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
foreach ($collection->identifiers as $key) {
|
foreach ($collection->identifiers as $key) {
|
||||||
$entry = $this->cache->fetch($this->getCacheEntryKey($key));
|
$entryKey = $this->getCacheEntryKey($key);
|
||||||
if ($entry === false) {
|
$entryValue = $this->cache->fetch($entryKey);
|
||||||
$result = null;
|
|
||||||
break;
|
if ($entryValue === false) {
|
||||||
} else {
|
return null;
|
||||||
$result[] = $entry;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$result[] = $entryValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
Loading…
Reference in New Issue
Block a user