public static function assertValid(string $value): void
    {
        if (! self::isValid($value)) {
            throw new InvalidArgumentException(
                sprintf(
                    '"%s" is not valid header value',
                    $value
                )
            );
        }
    }
public static function assertValid(string $value): void
    {
        if (! self::isValid($value)) {
            throw new InvalidArgumentException(
                sprintf(
                    '"%s" is not valid header value',
                    $value
                )
            );
        }
    }
public static function assertValid ( string $ value ) : void { if ( ! self :: isValid ( $ value ) ) { throw new InvalidArgumentException ( sprintf ( '"%s" is not valid header value' , $ value ) ) ; } }
Assert a header value is valid.

@param string $value

@throws InvalidArgumentException for invalid values

@return void
Assert a header value is valid .