original_string: private function generateRouteName(Route $route): string
      {
          $methods = implode('_', $route->getMethods()).'_';
  
          $routeName = $methods.$route->getPath();
          $routeName = str_replace(['/', ':', '|', '-'], '_', $routeName);
          $routeName = preg_replace('/[^a-z0-9A-Z_.]+/', '', $routeName);
  
          // Collapse consecutive underscores down into a single underscore.
          $routeName = preg_replace('/_+/', '_', $routeName);
  
          return $routeName;
      }
code: private function generateRouteName(Route $route): string
      {
          $methods = implode('_', $route->getMethods()).'_';
  
          $routeName = $methods.$route->getPath();
          $routeName = str_replace(['/', ':', '|', '-'], '_', $routeName);
          $routeName = preg_replace('/[^a-z0-9A-Z_.]+/', '', $routeName);
  
          // Collapse consecutive underscores down into a single underscore.
          $routeName = preg_replace('/_+/', '_', $routeName);
  
          return $routeName;
      }
code_tokens: private function generateRouteName ( Route $ route ) : string { $ methods = implode ( '_' , $ route -> getMethods ( ) ) . '_' ; $ routeName = $ methods . $ route -> getPath ( ) ; $ routeName = str_replace ( [ '/' , ':' , '|' , '-' ] , '_' , $ routeName ) ; $ routeName = preg_replace ( '/[^a-z0-9A-Z_.]+/' , '' , $ routeName ) ; // Collapse consecutive underscores down into a single underscore. $ routeName = preg_replace ( '/_+/' , '_' , $ routeName ) ; return $ routeName ; }
docstring: Generates a route name based on details of this route.
docstring_tokens: Generates a route name based on details of this route .