Apply "SlevomatCodingStandard.ControlStructures.EarlyExit"

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Henrique Moody 2019-02-09 12:27:11 +01:00
commit d72d247ddc
No known key found for this signature in database
GPG key ID: 221E9281655813A6
3 changed files with 12 additions and 3 deletions

View file

@ -232,9 +232,15 @@ class NestedValidationException extends ValidationException implements IteratorA
{
while (count($ids) > 0) {
$id = array_shift($ids);
if (isset($templates[$id]) && is_array($templates[$id])) {
$templates = $templates[$id];
if (!isset($templates[$id])) {
continue;
}
if (!is_array($templates[$id])) {
continue;
}
$templates = $templates[$id];
}
return $templates;