src/Domain/Value/Identifier/Uri.php
protected static function normalizeScheme(?string $scheme): string
    {
        if (!static::isValidScheme($scheme)) {
            $message = sprintf('Invalid URI scheme: %s', VarPrinter::toString($scheme));
            throw new DomainException($message);
        }

        return strtolower($scheme);
    }
protected static function normalizeScheme(?string $scheme): string
    {
        if (!static::isValidScheme($scheme)) {
            $message = sprintf('Invalid URI scheme: %s', VarPrinter::toString($scheme));
            throw new DomainException($message);
        }

        return strtolower($scheme);
    }
protected static function normalizeScheme ( ? string $ scheme ) : string { if ( ! static :: isValidScheme ( $ scheme ) ) { $ message = sprintf ( 'Invalid URI scheme: %s' , VarPrinter :: toString ( $ scheme ) ) ; throw new DomainException ( $ message ) ; } return strtolower ( $ scheme ) ; }
Validates and normalizes the scheme

@param string|null $scheme The scheme

@return string

@throws DomainException When the scheme is invalid
Validates and normalizes the scheme