/** * @return LeafInterface */ public function getNextSibling() { $idx = $this->getIndex(); if ($idx === null || $idx >= count($this->parent) - 1) { return null; } return $this->parent->getChildAt($idx + 1); }