protected static function resolveFacadeInstance($name)
    {
        if (is_object($name)) {
            return $name;
        }

        if (isset(self::$resolvedInstance[$name])) {
            return self::$resolvedInstance[$name];
        }

        return self::$resolvedInstance[$name] = static::$di->getShared($name);
    }