lib/Elastica/Query/SpanFirst.php
protected function _setQuery(string $type, $args): self
    {
        if (!\is_array($args) && !($args instanceof AbstractSpanQuery)) {
            throw new InvalidException('Invalid parameter. Has to be array or instance of Elastica\Query\AbstractSpanQuery');
        }

        return $this->setParam($type, $args);
    }
protected function _setQuery(string $type, $args): self
    {
        if (!\is_array($args) && !($args instanceof AbstractSpanQuery)) {
            throw new InvalidException('Invalid parameter. Has to be array or instance of Elastica\Query\AbstractSpanQuery');
        }

        return $this->setParam($type, $args);
    }
protected function _setQuery ( string $ type , $ args ) : self { if ( ! \ is_array ( $ args ) && ! ( $ args instanceof AbstractSpanQuery ) ) { throw new InvalidException ( 'Invalid parameter. Has to be array or instance of Elastica\Query\AbstractSpanQuery' ) ; } return $ this -> setParam ( $ type , $ args ) ; }
Sets a query to the current object.

@param string              $type Query type
@param AbstractQuery|array $args Query

@throws InvalidException If not valid query

@return $this
Sets a query to the current object .