original_string: private function getRegexp(array $patterns): string
      {
          $regexps = [];
          foreach ($patterns as $pattern) {
              // Escape namespace
              $regex = preg_quote(ltrim($pattern, '\\'));
  
              // Wildcards * and **
              $regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']);
  
              // If this class does not end by a slash, anchor the end
              if ('\\' !== substr($regex, -1)) {
                  $regex .= '$';
              }
  
              $regexps[] = '^'.$regex;
          }
  
          return sprintf('{%s}', implode('|', $regexps));
      }
code: private function getRegexp(array $patterns): string
      {
          $regexps = [];
          foreach ($patterns as $pattern) {
              // Escape namespace
              $regex = preg_quote(ltrim($pattern, '\\'));
  
              // Wildcards * and **
              $regex = strtr($regex, ['\\*\\*' => '.*?', '\\*' => '[^\\\\]*?']);
  
              // If this class does not end by a slash, anchor the end
              if ('\\' !== substr($regex, -1)) {
                  $regex .= '$';
              }
  
              $regexps[] = '^'.$regex;
          }
  
          return sprintf('{%s}', implode('|', $regexps));
      }
code_tokens: private function getRegexp ( array $ patterns ) : string { $ regexps = [ ] ; foreach ( $ patterns as $ pattern ) { // Escape namespace $ regex = preg_quote ( ltrim ( $ pattern , '\\' ) ) ; // Wildcards * and ** $ regex = strtr ( $ regex , [ '\\*\\*' => '.*?' , '\\*' => '[^\\\\]*?' ] ) ; // If this class does not end by a slash, anchor the end if ( '\\' !== substr ( $ regex , - 1 ) ) { $ regex .= '$' ; } $ regexps [ ] = '^' . $ regex ; } return sprintf ( '{%s}' , implode ( '|' , $ regexps ) ) ; }
docstring: Builds a regexp to check if a class is auto-mapped.
docstring_tokens: Builds a regexp to check if a class is auto - mapped .