original_string: public function populateCollection(RouteCollection $routes): RouteCollection
      {
          foreach ($this->items as $route) {
              if ($route instanceof self) {
                  $route->populateCollection($routes);
              } else {
                  $routes->add(...$route);
              }
          }
  
          return $routes;
      }
code: public function populateCollection(RouteCollection $routes): RouteCollection
      {
          foreach ($this->items as $route) {
              if ($route instanceof self) {
                  $route->populateCollection($routes);
              } else {
                  $routes->add(...$route);
              }
          }
  
          return $routes;
      }
code_tokens: public function populateCollection ( RouteCollection $ routes ) : RouteCollection { foreach ( $ this -> items as $ route ) { if ( $ route instanceof self ) { $ route -> populateCollection ( $ routes ) ; } else { $ routes -> add ( ... $ route ) ; } } return $ routes ; }
docstring: Linearizes back a set of nested routes into a collection.
docstring_tokens: Linearizes back a set of nested routes into a collection .