src/Domain/Value/Identifier/Uri.php
protected static function normalizeUserInfo(?string $userInfo): ?string
    {
        if ($userInfo === null) {
            return null;
        }

        if (!static::isValidUserInfo($userInfo)) {
            $message = sprintf('Invalid user info: %s', $userInfo);
            throw new DomainException($message);
        }

        return static::encodeUserInfo(static::decode($userInfo, static::UNRESERVED_SET));
    }
protected static function normalizeUserInfo(?string $userInfo): ?string
    {
        if ($userInfo === null) {
            return null;
        }

        if (!static::isValidUserInfo($userInfo)) {
            $message = sprintf('Invalid user info: %s', $userInfo);
            throw new DomainException($message);
        }

        return static::encodeUserInfo(static::decode($userInfo, static::UNRESERVED_SET));
    }
protected static function normalizeUserInfo ( ? string $ userInfo ) : ? string { if ( $ userInfo === null ) { return null ; } if ( ! static :: isValidUserInfo ( $ userInfo ) ) { $ message = sprintf ( 'Invalid user info: %s' , $ userInfo ) ; throw new DomainException ( $ message ) ; } return static :: encodeUserInfo ( static :: decode ( $ userInfo , static :: UNRESERVED_SET ) ) ; }
Validates and normalizes the user info

@param string|null $userInfo The user info

@return string|null

@throws DomainException When the user info is invalid
Validates and normalizes the user info