original_string: protected function addMiddlewareGroups($middlewareGroups)
      {
          if (is_array($middlewareGroups) && (count($middlewareGroups) > 0)) {
              foreach ($middlewareGroups as $key => $groupMiddleware) {
                  foreach ($groupMiddleware as $middleware) {
                      $this->pushMiddlewareToGroup($key, $middleware);
                  }
              }
          }
      }
code: protected function addMiddlewareGroups($middlewareGroups)
      {
          if (is_array($middlewareGroups) && (count($middlewareGroups) > 0)) {
              foreach ($middlewareGroups as $key => $groupMiddleware) {
                  foreach ($groupMiddleware as $middleware) {
                      $this->pushMiddlewareToGroup($key, $middleware);
                  }
              }
          }
      }
code_tokens: protected function addMiddlewareGroups ( $ middlewareGroups ) { if ( is_array ( $ middlewareGroups ) && ( count ( $ middlewareGroups ) > 0 ) ) { foreach ( $ middlewareGroups as $ key => $ groupMiddleware ) { foreach ( $ groupMiddleware as $ middleware ) { $ this -> pushMiddlewareToGroup ( $ key , $ middleware ) ; } } } }
docstring: Add middleware groups to the router.
  
  @param array $middlewareGroups
docstring_tokens: Add middleware groups to the router .