original_string: protected function setRouteProperties(Route $route, array $data)
      {
          $methods = get_class_methods(Route::class);
          $methods = array_diff($methods, ["allows", "path"]);
          foreach($data as $method => $args) {
              if (in_array($method, $methods)) {
                  $route->$method($args);
              }
          }
          return $route;
      }
code: protected function setRouteProperties(Route $route, array $data)
      {
          $methods = get_class_methods(Route::class);
          $methods = array_diff($methods, ["allows", "path"]);
          foreach($data as $method => $args) {
              if (in_array($method, $methods)) {
                  $route->$method($args);
              }
          }
          return $route;
      }
code_tokens: protected function setRouteProperties ( Route $ route , array $ data ) { $ methods = get_class_methods ( Route :: class ) ; $ methods = array_diff ( $ methods , [ "allows" , "path" ] ) ; foreach ( $ data as $ method => $ args ) { if ( in_array ( $ method , $ methods ) ) { $ route -> $ method ( $ args ) ; } } return $ route ; }
docstring: Parses data array to set route properties
  
  @param Route $route
  @param array $data
  
  @return Route
docstring_tokens: Parses data array to set route properties