etc/phpstan/DAO_Find_ReturnType.php
protected function resolveReturnType(Type $type, \Closure $resolver) : Type {
        if ($type instanceof UnionType) {
            $old = $type->getTypes();
            $new = [];
            foreach ($old as $subtype)
                $new[] = $resolver($subtype);
            return ($old===$new) ? $type : new UnionType($new);
        }
        return $resolver($type);
    }
protected function resolveReturnType(Type $type, \Closure $resolver) : Type {
        if ($type instanceof UnionType) {
            $old = $type->getTypes();
            $new = [];
            foreach ($old as $subtype)
                $new[] = $resolver($subtype);
            return ($old===$new) ? $type : new UnionType($new);
        }
        return $resolver($type);
    }
protected function resolveReturnType ( Type $ type , \ Closure $ resolver ) : Type { if ( $ type instanceof UnionType ) { $ old = $ type -> getTypes ( ) ; $ new = [ ] ; foreach ( $ old as $ subtype ) $ new [ ] = $ resolver ( $ subtype ) ; return ( $ old === $ new ) ? $ type : new UnionType ( $ new ) ; } return $ resolver ( $ type ) ; }
Resolve a return type using a resolver function.

@return Type
Resolve a return type using a resolver function .