Phan\Language\Element\Clazz::isSubclassOf PHP Метод

isSubclassOf() публичный Метод

public isSubclassOf ( CodeBase $code_base, Clazz $other ) : boolean
$code_base Phan\CodeBase
$other Clazz
Результат boolean
    public function isSubclassOf(CodeBase $code_base, Clazz $other) : bool
    {
        if (!$this->hasParentType()) {
            return false;
        }
        if (!$code_base->hasClassWithFQSEN($this->getParentClassFQSEN())) {
            // Let this emit an issue elsewhere for the
            // parent not existing
            return false;
        }
        // Get the parent class
        $parent = $this->getParentClass($code_base);
        if ($parent === $other) {
            return true;
        }
        return $parent->isSubclassOf($code_base, $other);
    }