public function categoryDescendsFrom(int $newParent, int $categoryId) : bool { return \in_array($categoryId, $this->getCategoryParents($newParent)); }