protected function getRoutes(): array
    {
        uasort($this->routes, function (RouteInterface $left, RouteInterface $right) {
            if ($left instanceof GroupRoute || $right instanceof GroupRoute) {
                return 1;
            }

            return 0;
        });

        return $this->routes;
    }
protected function getRoutes(): array
    {
        uasort($this->routes, function (RouteInterface $left, RouteInterface $right) {
            if ($left instanceof GroupRoute || $right instanceof GroupRoute) {
                return 1;
            }

            return 0;
        });

        return $this->routes;
    }
protected function getRoutes ( ) : array { uasort ( $ this -> routes , function ( RouteInterface $ left , RouteInterface $ right ) { if ( $ left instanceof GroupRoute || $ right instanceof GroupRoute ) { return 1 ; } return 0 ; } ) ; return $ this -> routes ; }
Get routes.

Sort children that group routes will be matched first, nested routes before flat routes.

@return RouteInterface[]
Get routes .