protected function checkRoutesValidity(array $routes): void
    {
        $requiredRouteKeys = ['index'];
        $optionalRouteKeys = ['create', 'edit', 'destroy'];
        $allowedRouteKeys = array_merge($requiredRouteKeys, $optionalRouteKeys);
        $this->checkRequiredRoutesValidity($routes, $requiredRouteKeys);
        $this->checkAllowedRoutesValidity($routes, $allowedRouteKeys);
        $this->checkRoutesStructureValidity($routes);
    }
protected function checkRoutesValidity(array $routes): void
    {
        $requiredRouteKeys = ['index'];
        $optionalRouteKeys = ['create', 'edit', 'destroy'];
        $allowedRouteKeys = array_merge($requiredRouteKeys, $optionalRouteKeys);
        $this->checkRequiredRoutesValidity($routes, $requiredRouteKeys);
        $this->checkAllowedRoutesValidity($routes, $allowedRouteKeys);
        $this->checkRoutesStructureValidity($routes);
    }
protected function checkRoutesValidity ( array $ routes ) : void { $ requiredRouteKeys = [ 'index' ] ; $ optionalRouteKeys = [ 'create' , 'edit' , 'destroy' ] ; $ allowedRouteKeys = array_merge ( $ requiredRouteKeys , $ optionalRouteKeys ) ; $ this -> checkRequiredRoutesValidity ( $ routes , $ requiredRouteKeys ) ; $ this -> checkAllowedRoutesValidity ( $ routes , $ allowedRouteKeys ) ; $ this -> checkRoutesStructureValidity ( $ routes ) ; }
Check routes validity.

@param array $routes

@return void
@throws \ErrorException
Check routes validity .