src/Utils/UriValidator.php
public function validateQuery($query)
    {
        if (!is_string($query) && !method_exists($query, '__toString')) {
            throw new InvalidArgumentException(
                'Query must be a string'
            );
        }

        if (strpos($query, '#') !== false) {
            throw new InvalidArgumentException(
                'Query must not contain a URI fragment'
            );
        }
    }
public function validateQuery($query)
    {
        if (!is_string($query) && !method_exists($query, '__toString')) {
            throw new InvalidArgumentException(
                'Query must be a string'
            );
        }

        if (strpos($query, '#') !== false) {
            throw new InvalidArgumentException(
                'Query must not contain a URI fragment'
            );
        }
    }
public function validateQuery ( $ query ) { if ( ! is_string ( $ query ) && ! method_exists ( $ query , '__toString' ) ) { throw new InvalidArgumentException ( 'Query must be a string' ) ; } if ( strpos ( $ query , '#' ) !== false ) { throw new InvalidArgumentException ( 'Query must not contain a URI fragment' ) ; } }
Validate query.

Path must NOT contain URI fragment. It can be object,
but then the class must implement __toString method.

@param  string|object $query The query path

@return void

@throws InvalidArgumentException If the query is invalid.
Validate query .