Skip to content

Commit

Permalink
[Translation] removed unneeded methods
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Nov 11, 2011
1 parent 45b218e commit 6b0e7c8
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/Symfony/Component/Translation/MessageCatalogue.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,26 +190,16 @@ public function addFallbackCatalogue(MessageCatalogueInterface $catalogue)
if ($c->getLocale() === $catalogue->getLocale()) {
throw new \LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale()));
}
} while ($c = $c->getParent());
} while ($c = $c->parent);

$catalogue->setParent($this);
$catalogue->parent = $this;

This comment has been minimized.

Copy link
@stof

stof Nov 11, 2011

Member

this will not work if someone uses a different implementation of the interface

$this->fallbackCatalogue = $catalogue;

foreach ($catalogue->getResources() as $resource) {
$this->addResource($resource);
}
}

public function getParent()
{
return $this->parent;
}

public function setParent(self $parent)
{
$this->parent = $parent;
}

/**
* {@inheritdoc}
*
Expand Down

0 comments on commit 6b0e7c8

Please sign in to comment.