Skip to content

Commit 8680f45

Browse files
committed
Apply Early Return
1 parent 10e901a commit 8680f45

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)