protected function validateValue(?string $value = null): void
    {
        if ($value !== null && \preg_match('/[^\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/', $value)) {
            throw new InvalidArgumentException(
                \sprintf(
                    'The cookie value [%s] contains invalid characters.',
                    $value
                )
            );
        }
    }
protected function validateValue(?string $value = null): void
    {
        if ($value !== null && \preg_match('/[^\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/', $value)) {
            throw new InvalidArgumentException(
                \sprintf(
                    'The cookie value [%s] contains invalid characters.',
                    $value
                )
            );
        }
    }
protected function validateValue ( ? string $ value = null ) : void { if ( $ value !== null && \ preg_match ( '/[^\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/' , $ value ) ) { throw new InvalidArgumentException ( \ sprintf ( 'The cookie value [%s] contains invalid characters.' , $ value ) ) ; } }
Validates a value.

@param null|string $value

@throws \Viserio\Component\Contract\Cookie\Exception\InvalidArgumentException

@see http://tools.ietf.org/html/rfc6265#section-4.1.1

@return void
Validates a value .