public function siblings() { if (!$this->nodes) { throw new \InvalidArgumentException('The current node list is empty.'); } return $this->createSubCrawler($this->sibling($this->getNode(0)->parentNode->firstChild)); }
/** * @param Crawler $block */ public function climbToHighestParent(Crawler &$block) { while ($block->siblings()->getNode(0) == null) { $block = $block->parents()->first(); } }