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