private function filterPair($value)
    {
        if (null === $value || is_scalar($value)) {
            return $value;
        }

        if ($value instanceof UriComponentInterface) {
            return $value->getContent();
        }

        if (method_exists($value, '__toString')) {
            return (string) $value;
        }

        throw new TypeError('The submitted value is invalid.');
    }
private function filterPair($value)
    {
        if (null === $value || is_scalar($value)) {
            return $value;
        }

        if ($value instanceof UriComponentInterface) {
            return $value->getContent();
        }

        if (method_exists($value, '__toString')) {
            return (string) $value;
        }

        throw new TypeError('The submitted value is invalid.');
    }
private function filterPair ( $ value ) { if ( null === $ value || is_scalar ( $ value ) ) { return $ value ; } if ( $ value instanceof UriComponentInterface ) { return $ value -> getContent ( ) ; } if ( method_exists ( $ value , '__toString' ) ) { return ( string ) $ value ; } throw new TypeError ( 'The submitted value is invalid.' ) ; }
Validate the given pair.

To be valid the pair must be the null value, a scalar or a collection of scalar and null values.

@throws TypeError if the value type is invalid
Validate the given pair .