original_string: private static function isValidUriScheme(?string $scheme): bool
      {
          // http://tools.ietf.org/html/rfc3986#section-3
          // The scheme and path components are required, though the path may be
          // empty (no characters)
          if ($scheme === null || $scheme === '') {
              return false;
          }
  
          // http://tools.ietf.org/html/rfc3986#section-3.1
          // scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
          $pattern = '/\A[a-z][a-z0-9+.\-]*\z/i';
  
          return !!preg_match($pattern, $scheme);
      }
code: private static function isValidUriScheme(?string $scheme): bool
      {
          // http://tools.ietf.org/html/rfc3986#section-3
          // The scheme and path components are required, though the path may be
          // empty (no characters)
          if ($scheme === null || $scheme === '') {
              return false;
          }
  
          // http://tools.ietf.org/html/rfc3986#section-3.1
          // scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
          $pattern = '/\A[a-z][a-z0-9+.\-]*\z/i';
  
          return !!preg_match($pattern, $scheme);
      }
code_tokens: private static function isValidUriScheme ( ? string $ scheme ) : bool { // http://tools.ietf.org/html/rfc3986#section-3 // The scheme and path components are required, though the path may be // empty (no characters) if ( $ scheme === null || $ scheme === '' ) { return false ; } // http://tools.ietf.org/html/rfc3986#section-3.1 // scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) $ pattern = '/\A[a-z][a-z0-9+.\-]*\z/i' ; return ! ! preg_match ( $ pattern , $ scheme ) ; }
docstring: Checks if a URI scheme is valid
  
  @param string|null $scheme The URI scheme
  
  @return bool
docstring_tokens: Checks if a URI scheme is valid