public function isRegistered($name)
    {
        return
            array_key_exists($name, $this->services)
            || (
                isset($this->serviceProviders[$name])
                && $this->serviceProviders[$name] instanceof ServiceProviderInterface
            );
    }