original_string: public function reverse($resource, array $params = [])
      {
          // search in all routes
          if($key = array_search($resource, $this->routes)) {
              $route = $this->routes[$key];
              $route->params = $params;
              return $route;
          }
      }
code: public function reverse($resource, array $params = [])
      {
          // search in all routes
          if($key = array_search($resource, $this->routes)) {
              $route = $this->routes[$key];
              $route->params = $params;
              return $route;
          }
      }
code_tokens: public function reverse ( $ resource , array $ params = [ ] ) { // search in all routes if ( $ key = array_search ( $ resource , $ this -> routes ) ) { $ route = $ this -> routes [ $ key ] ; $ route -> params = $ params ; return $ route ; } }
docstring: Reverse finding by resource
  
  @param $resource
  @param array $params
  @return Route
docstring_tokens: Reverse finding by resource