src/Domain/Value/Identifier/Uri.php
protected static function encode(string $component, string $excluded): string
    {
        return preg_replace_callback(static::encodingRegex($excluded), function (array $matches) {
            return rawurlencode($matches[0]);
        }, $component);
    }
protected static function encode(string $component, string $excluded): string
    {
        return preg_replace_callback(static::encodingRegex($excluded), function (array $matches) {
            return rawurlencode($matches[0]);
        }, $component);
    }
protected static function encode ( string $ component , string $ excluded ) : string { return preg_replace_callback ( static :: encodingRegex ( $ excluded ) , function ( array $ matches ) { return rawurlencode ( $ matches [ 0 ] ) ; } , $ component ) ; }
Encodes a component

@codeCoverageIgnore

@param string $component The component
@param string $excluded  The set of excluded characters

@return string
Encodes a component