use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\MessageCatalogueInterface;
+use Symfony\Component\Translation\Exception\InvalidArgumentException;
+use Symfony\Component\Translation\Exception\LogicException;
/**
* Base catalogues binary operation class.
* @param MessageCatalogueInterface $source The source catalogue
* @param MessageCatalogueInterface $target The target catalogue
*
- * @throws \LogicException
+ * @throws LogicException
*/
public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target)
{
if ($source->getLocale() !== $target->getLocale()) {
- throw new \LogicException('Operated catalogues must belong to the same locale.');
+ throw new LogicException('Operated catalogues must belong to the same locale.');
}
$this->source = $source;
public function getMessages($domain)
{
if (!in_array($domain, $this->getDomains())) {
- throw new \InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
+ throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
}
if (!isset($this->messages[$domain]['all'])) {
public function getNewMessages($domain)
{
if (!in_array($domain, $this->getDomains())) {
- throw new \InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
+ throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
}
if (!isset($this->messages[$domain]['new'])) {
public function getObsoleteMessages($domain)
{
if (!in_array($domain, $this->getDomains())) {
- throw new \InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
+ throw new InvalidArgumentException(sprintf('Invalid domain: %s.', $domain));
}
if (!isset($this->messages[$domain]['obsolete'])) {