original_string: private static function myParse(string $scheme, ?string &$result = null, ?int &$type = null, ?int &$defaultPort = null, ?string &$error = null): bool
      {
          if ($scheme === '') {
              $error = 'Scheme "' . $scheme . '" is empty.';
  
              return false;
          }
  
          $result = strtolower($scheme);
  
          if (!isset(self::$mySchemes[$result])) {
              $error = 'Scheme "' . $scheme . '" is invalid: Scheme must be "http" or "https".';
  
              return false;
          }
  
          $schemeInfo = self::$mySchemes[$result];
          $type = $schemeInfo[0];
          $defaultPort = $schemeInfo[1];
  
          return true;
      }
code: private static function myParse(string $scheme, ?string &$result = null, ?int &$type = null, ?int &$defaultPort = null, ?string &$error = null): bool
      {
          if ($scheme === '') {
              $error = 'Scheme "' . $scheme . '" is empty.';
  
              return false;
          }
  
          $result = strtolower($scheme);
  
          if (!isset(self::$mySchemes[$result])) {
              $error = 'Scheme "' . $scheme . '" is invalid: Scheme must be "http" or "https".';
  
              return false;
          }
  
          $schemeInfo = self::$mySchemes[$result];
          $type = $schemeInfo[0];
          $defaultPort = $schemeInfo[1];
  
          return true;
      }
code_tokens: private static function myParse ( string $ scheme , ? string & $ result = null , ? int & $ type = null , ? int & $ defaultPort = null , ? string & $ error = null ) : bool { if ( $ scheme === '' ) { $ error = 'Scheme "' . $ scheme . '" is empty.' ; return false ; } $ result = strtolower ( $ scheme ) ; if ( ! isset ( self :: $ mySchemes [ $ result ] ) ) { $ error = 'Scheme "' . $ scheme . '" is invalid: Scheme must be "http" or "https".' ; return false ; } $ schemeInfo = self :: $ mySchemes [ $ result ] ; $ type = $ schemeInfo [ 0 ] ; $ defaultPort = $ schemeInfo [ 1 ] ; return true ; }
docstring: Tries to parse a scheme and returns the result or error text.
  
  @param string      $scheme      The scheme.
  @param string|null $result      The result if parsing was successful, undefined otherwise.
  @param int|null    $type        The type if parsing was successful, undefined otherwise.
  @param int|null    $defaultPort The default port if parsing was successful, undefined otherwise.
  @param string|null $error       The error text if parsing was not successful, undefined otherwise.
  
  @return bool True if parsing was successful, false otherwise.
docstring_tokens: Tries to parse a scheme and returns the result or error text .