Pinq\Analysis\PhpTypeSystem::getAncestorTypes PHP Метод

getAncestorTypes() защищенный Метод

protected getAncestorTypes ( Pinq\Analysis\IType $type )
$type Pinq\Analysis\IType
    protected function getAncestorTypes(IType $type)
    {
        $ancestorTypes = [$type->getIdentifier() => $type];
        if (!$type->hasParentType()) {
            return $ancestorTypes;
        }
        if ($type instanceof ICompositeType) {
            foreach ($type->getComposedTypes() as $composedType) {
                $ancestorTypes += $this->getAncestorTypes($composedType);
            }
        } else {
            $parentType = $type->getParentType();
            $ancestorTypes[$parentType->getIdentifier()] = $parentType;
            $ancestorTypes += $this->getAncestorTypes($parentType);
        }
        return $ancestorTypes;
    }