public function isSelfOrAncestorOf($other) { return $this->getLeft() <= $other->getLeft() && $this->getRight() > $other->getLeft() && $this->inSameScope($other); }