Skip to content

Commit 0e936a1

Browse files
authored
Merge pull request #216 from carusogabriel/early-return
Apply Early Return
2 parents d3d1fec + 8680f45 commit 0e936a1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Node.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ public function getFullStart() : int {
4848
foreach($this::CHILD_NAMES as $name) {
4949
if (($child = $this->$name) !== null) {
5050
if (\is_array($child)) {
51-
if (isset($child[0])) {
52-
$child = $child[0];
53-
} else {
51+
if(!isset($child[0])) {
5452
continue;
5553
}
54+
$child = $child[0];
5655
}
5756
if ($child instanceof Node) {
5857
return $child->getFullStart();

0 commit comments

Comments
 (0)