src/Domain/Value/Identifier/Uri.php
protected static function isValidUserInfo(string $userInfo): bool
    {
        // http://tools.ietf.org/html/rfc3986#section-3.2.1
        // userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
        $pattern = sprintf(
            '/\A(?:[%s%s:]|(?:%s))*\z/',
            static::UNRESERVED_SET,
            static::SUB_DELIMS_SET,
            static::PCT_ENCODED_SET
        );

        return !!preg_match($pattern, $userInfo);
    }
protected static function isValidUserInfo(string $userInfo): bool
    {
        // http://tools.ietf.org/html/rfc3986#section-3.2.1
        // userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
        $pattern = sprintf(
            '/\A(?:[%s%s:]|(?:%s))*\z/',
            static::UNRESERVED_SET,
            static::SUB_DELIMS_SET,
            static::PCT_ENCODED_SET
        );

        return !!preg_match($pattern, $userInfo);
    }
protected static function isValidUserInfo ( string $ userInfo ) : bool { // http://tools.ietf.org/html/rfc3986#section-3.2.1 // userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) $ pattern = sprintf ( '/\A(?:[%s%s:]|(?:%s))*\z/' , static :: UNRESERVED_SET , static :: SUB_DELIMS_SET , static :: PCT_ENCODED_SET ) ; return ! ! preg_match ( $ pattern , $ userInfo ) ; }
Checks if user info is valid

@param string $userInfo The user info

@return bool
Checks if user info is valid