*/ class RecursiveReportIterator extends ArrayIterator implements RecursiveIterator { /** * @return bool */ public function hasChildren(): bool { return $this->current()->hasChildren(); } /** * @return self|RecursiveIterator */ public function getChildren() { return new static($this->current()->getChildren()); } }