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;
    }
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;
    }
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 ; }
Parses data array to set route properties

@param Route $route
@param array $data

@return Route
Parses data array to set route properties