Provider/ProviderRegistry.php
public function addProvider(ProviderInterface $provider)
    {
        if (array_key_exists($provider->getName(), $this->providers)) {
            throw new \InvalidArgumentException(sprintf('Provider "%s" is already registered.', $provider->getName()));
        }
        if (!in_array($provider->getSitemap(), $this->sitemaps)) {
            $this->sitemaps[] = $provider->getSitemap();
        }
        $this->providers[$provider->getName()] = $provider;
    }
public function addProvider(ProviderInterface $provider)
    {
        if (array_key_exists($provider->getName(), $this->providers)) {
            throw new \InvalidArgumentException(sprintf('Provider "%s" is already registered.', $provider->getName()));
        }
        if (!in_array($provider->getSitemap(), $this->sitemaps)) {
            $this->sitemaps[] = $provider->getSitemap();
        }
        $this->providers[$provider->getName()] = $provider;
    }
{@inheritdoc}