private function guardProviderNames($child, $parent = null)
    {
        if (null !== $child && $child->getProviderName() !== $this->destinationProvider) {
            throw new \InvalidArgumentException(
                \sprintf('provider name %s is not equal to %s', $child->getProviderName(), $this->destinationProvider)
            );
        }
        if (null !== $parent && $parent->getProviderName() !== $this->sourceProvider) {
            throw new \InvalidArgumentException(
                \sprintf('provider name %s is not equal to %s', $parent->getProviderName(), $this->sourceProvider)
            );
        }
    }