private static function checkDuplicated(Route $route)
    {
        foreach (self::$register as $registeredRoute) {
            if ($registeredRoute->getName() == $route->getName()) {
                return true;
            }
        }

        return false;
    }
private static function checkDuplicated(Route $route)
    {
        foreach (self::$register as $registeredRoute) {
            if ($registeredRoute->getName() == $route->getName()) {
                return true;
            }
        }

        return false;
    }
private static function checkDuplicated ( Route $ route ) { foreach ( self :: $ register as $ registeredRoute ) { if ( $ registeredRoute -> getName ( ) == $ route -> getName ( ) ) { return true ; } } return false ; }
Check if route is duplicated.

@param Route $route

@return bool
Check if route is duplicated .