Skip to content

Commit

Permalink
refactor: moving the other validation to the top too
Browse files Browse the repository at this point in the history
  • Loading branch information
gabfr committed Jan 28, 2020
1 parent 6506d3b commit 66b89cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Node/BaseNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ public function walk($input)
return $input;
}

$result = [];

if (!$this->hasChildren()) {
return $input;
}

$result = [];

foreach ($this->getChildren() as $field => $config) {
if (!array_key_exists($field, $input)) {
if ($config->isRequired()) {
Expand Down

0 comments on commit 66b89cc

Please sign in to comment.