src/Viserio/Component/Translation/MessageCatalogue.php
public function addFallbackCatalogue(MessageCatalogueContract $catalogue): void
    {
        // detect circular references
        $circular = $this;

        do {
            if ($circular->getLocale() === $catalogue->getLocale()) {
                throw new LogicException(\sprintf(
                    'Circular reference detected when adding a fallback catalogue for locale [%s].',
                    $catalogue->getLocale()
                ));
            }
        } while ($circular = $circular->parent);

        $catalogue->setParent($this);

        $this->fallbackCatalogue = $catalogue;
    }
public function addFallbackCatalogue(MessageCatalogueContract $catalogue): void
    {
        // detect circular references
        $circular = $this;

        do {
            if ($circular->getLocale() === $catalogue->getLocale()) {
                throw new LogicException(\sprintf(
                    'Circular reference detected when adding a fallback catalogue for locale [%s].',
                    $catalogue->getLocale()
                ));
            }
        } while ($circular = $circular->parent);

        $catalogue->setParent($this);

        $this->fallbackCatalogue = $catalogue;
    }
{@inheritdoc}