protected function checkRequiredRoutesValidity(array $routes, array $requiredRouteKeys): void
    {
        $routeKeys = array_keys($routes);
        foreach ($requiredRouteKeys as $requiredRouteKey) {
            if (! in_array($requiredRouteKey, $routeKeys)) {
                throw new ErrorException(
                    'The required « ' . $requiredRouteKey
                    . ' » route key is missing. Use the « setRoutes() » method to declare it.'
                );
            }
        }
    }
protected function checkRequiredRoutesValidity(array $routes, array $requiredRouteKeys): void
    {
        $routeKeys = array_keys($routes);
        foreach ($requiredRouteKeys as $requiredRouteKey) {
            if (! in_array($requiredRouteKey, $routeKeys)) {
                throw new ErrorException(
                    'The required « ' . $requiredRouteKey
                    . ' » route key is missing. Use the « setRoutes() » method to declare it.'
                );
            }
        }
    }
protected function checkRequiredRoutesValidity ( array $ routes , array $ requiredRouteKeys ) : void { $ routeKeys = array_keys ( $ routes ) ; foreach ( $ requiredRouteKeys as $ requiredRouteKey ) { if ( ! in_array ( $ requiredRouteKey , $ routeKeys ) ) { throw new ErrorException ( 'The required « '  r equiredRouteKey . ' » route key is missing. Use the « setRoutes() » method to declare it.' ) ; } } }
Check required routes validity.

@param array $routes
@param array $requiredRouteKeys

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