private function generateQueryOptions(array $options = [])
    {
        if (isset($options['query'])) {
            $result = $options['query'] + $this->getDefaultOptions();
        } else {
            $result['query'] = $options + $this->getDefaultOptions();
        }

        return $result;
    }
private function generateQueryOptions(array $options = [])
    {
        if (isset($options['query'])) {
            $result = $options['query'] + $this->getDefaultOptions();
        } else {
            $result['query'] = $options + $this->getDefaultOptions();
        }

        return $result;
    }
private function generateQueryOptions ( array $ options = [ ] ) { if ( isset ( $ options [ 'query' ] ) ) { $ result = $ options [ 'query' ] + $ this -> getDefaultOptions ( ) ; } else { $ result [ 'query' ] = $ options + $ this -> getDefaultOptions ( ) ; } return $ result ; }
Generate query options

Setting default option to given options array if it does have 'query' key,
otherwise creating 'query' key with default options

@param array $options

@return array
Generate query options