protected function resolveSubQueryClosure(\Closure $callback): Query
    {
        if ($this->closureResolver === null) {
            return $this->makeCopyForSubQuery()->apply($callback);
        } else {
            return $this->closureResolver->resolveSubQueryClosure($callback);
        }
    }
protected function resolveSubQueryClosure(\Closure $callback): Query
    {
        if ($this->closureResolver === null) {
            return $this->makeCopyForSubQuery()->apply($callback);
        } else {
            return $this->closureResolver->resolveSubQueryClosure($callback);
        }
    }
protected function resolveSubQueryClosure ( \ Closure $ callback ) : Query { if ( $ this -> closureResolver === null ) { return $ this -> makeCopyForSubQuery ( ) -> apply ( $ callback ) ; } else { return $ this -> closureResolver -> resolveSubQueryClosure ( $ callback ) ; } }
Retrieves the query object from a closure given instead of a subquery.

@param \Closure $callback
@return Query Retrieved query
@throws InvalidReturnValueException
Retrieves the query object from a closure given instead of a subquery .