getOption(self::OPTION_NESTED_CLASS_LIMIT); if ($query->getClassId() && $nestedClassLimit !== null) { $class = $this->getClass($query->getClassId()); if (count($class->getSubClasses(true)) > (int)$nestedClassLimit) { throw new NestedClassLimitExceededException($nestedClassLimit); } } return new ResourceRelationCollection(...[]); } }