src/Router/Router.php
public function addRoutes(array $routes = []): self
    {
        foreach ($routes as $key => $routesDetails) {
            if ($routesDetails instanceof Route) {
                $this->addRoute($routesDetails);
            } else {
                $this->addRoute(
                    new Route(
                        $routesDetails[0],
                        $routesDetails[1],
                        (isset($routesDetails[2]) ? $routesDetails[2] : null),
                        (isset($routesDetails[3]) ? $routesDetails[3] : null)
                    )
                );
            }
        } // endforeach

        return $this;
    }
public function addRoutes(array $routes = []): self
    {
        foreach ($routes as $key => $routesDetails) {
            if ($routesDetails instanceof Route) {
                $this->addRoute($routesDetails);
            } else {
                $this->addRoute(
                    new Route(
                        $routesDetails[0],
                        $routesDetails[1],
                        (isset($routesDetails[2]) ? $routesDetails[2] : null),
                        (isset($routesDetails[3]) ? $routesDetails[3] : null)
                    )
                );
            }
        } // endforeach

        return $this;
    }
@param array $routes

@throws RouterException

@return Router