protected function checkRoutesStructureValidity(array $routes): void
    {
        $requiredRouteParams = ['alias', 'parameters'];
        foreach ($routes as $routeKey => $route) {
            foreach ($requiredRouteParams as $requiredRouteParam) {
                if (! in_array($requiredRouteParam, array_keys($route))) {
                    throw new ErrorException(
                        'The « ' . $requiredRouteParam . ' » key is missing from the « ' . $routeKey
                        . ' » route definition. Each route key must contain an array with a (string) '
                        . '« alias » key and a (array) « parameters » value. Check the following example : '
                        . '["index" => ["alias" => "news.index","parameters" => []]. '
                        . 'Fix your routes declaration in the « setRoutes() » method.'
                    );
                }
            }
        }
    }
protected function checkRoutesStructureValidity(array $routes): void
    {
        $requiredRouteParams = ['alias', 'parameters'];
        foreach ($routes as $routeKey => $route) {
            foreach ($requiredRouteParams as $requiredRouteParam) {
                if (! in_array($requiredRouteParam, array_keys($route))) {
                    throw new ErrorException(
                        'The « ' . $requiredRouteParam . ' » key is missing from the « ' . $routeKey
                        . ' » route definition. Each route key must contain an array with a (string) '
                        . '« alias » key and a (array) « parameters » value. Check the following example : '
                        . '["index" => ["alias" => "news.index","parameters" => []]. '
                        . 'Fix your routes declaration in the « setRoutes() » method.'
                    );
                }
            }
        }
    }
protected function checkRoutesStructureValidity ( array $ routes ) : void { $ requiredRouteParams = [ 'alias' , 'parameters' ] ; foreach ( $ routes as $ routeKey => $ route ) { foreach ( $ requiredRouteParams as $ requiredRouteParam ) { if ( ! in_array ( $ requiredRouteParam , array_keys ( $ route ) ) ) { throw new ErrorException ( 'The « '  r equiredRouteParam   » key is missing from the « ' .  r u teKey . ' » route definition. Each route key must contain an array with a (string) ' . '« alias » key and a (array) « parameters » value. Check the following example : ' . '["index" => ["alias" => "news.index","parameters" => []]. ' . 'Fix your routes declaration in the « setRoutes() » method.' ) ; } } } }
Check routes structure validity.

@param array $routes

@return void
@throws \ErrorException
Check routes structure validity .