original_string: public function redirect($default = 'home')
      {
          $redirect = $this->getController()->plugin('redirect');
          $route = $this->getSession()->route;
          if (null === $route) {
              return $redirect->toRoute($default);
          }
          return $redirect->toRoute($route->getMatchedRouteName(), 
              $route->getParams());
      }
code: public function redirect($default = 'home')
      {
          $redirect = $this->getController()->plugin('redirect');
          $route = $this->getSession()->route;
          if (null === $route) {
              return $redirect->toRoute($default);
          }
          return $redirect->toRoute($route->getMatchedRouteName(), 
              $route->getParams());
      }
code_tokens: public function redirect ( $ default = 'home' ) { $ redirect = $ this -> getController ( ) -> plugin ( 'redirect' ) ; $ route = $ this -> getSession ( ) -> route ; if ( null === $ route ) { return $ redirect -> toRoute ( $ default ) ; } return $ redirect -> toRoute ( $ route -> getMatchedRouteName ( ) , $ route -> getParams ( ) ) ; }
docstring: Redirect to last route
  
  @param string $default
  Default route to use if previous route not found
docstring_tokens: Redirect to last route