QuackCompiler\Types\Type::getDeepestSubtype PHP Method

getDeepestSubtype() public method

public getDeepestSubtype ( )
    public function getDeepestSubtype()
    {
        if ($this->hasSubtype()) {
            switch ($this->code) {
                case NativeQuackType::T_LIST:
                    return $this->subtype->getDeepestSubtype();
                case NativeQuackType::T_MAP:
                    return [$this->subtype['key']->getDeepestSubtype(), $this->subtype['value']->getDeepestSubtype()];
            }
        }
        return $this;
    }