original_string: private static function isValidAuthUser(?string $userinfo): bool
      {
          if ($userinfo === null) {
              return true;
          }
  
          // http://tools.ietf.org/html/rfc3986#section-3.2.1
          // userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
          $pattern = sprintf(
              '/\A(?:[%s%s:]|(?:%s))*\z/i',
              'a-z0-9\-._~',
              '!$&\'()*+,;=',
              '%[a-f0-9]{2}'
          );
  
          return !!preg_match($pattern, $userinfo);
      }
code: private static function isValidAuthUser(?string $userinfo): bool
      {
          if ($userinfo === null) {
              return true;
          }
  
          // http://tools.ietf.org/html/rfc3986#section-3.2.1
          // userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
          $pattern = sprintf(
              '/\A(?:[%s%s:]|(?:%s))*\z/i',
              'a-z0-9\-._~',
              '!$&\'()*+,;=',
              '%[a-f0-9]{2}'
          );
  
          return !!preg_match($pattern, $userinfo);
      }
code_tokens: private static function isValidAuthUser ( ? string $ userinfo ) : bool { if ( $ userinfo === null ) { return true ; } // http://tools.ietf.org/html/rfc3986#section-3.2.1 // userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) $ pattern = sprintf ( '/\A(?:[%s%s:]|(?:%s))*\z/i' , 'a-z0-9\-._~' , '!$&\'()*+,;=' , '%[a-f0-9]{2}' ) ; return ! ! preg_match ( $ pattern , $ userinfo ) ; }
docstring: Checks if authority userinfo is valid
  
  @param string|null $userinfo The userinfo
  
  @return bool
docstring_tokens: Checks if authority userinfo is valid