aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/DiffOperation.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/translation/Symfony/Component/Translation/Catalogue/DiffOperation.php')
-rw-r--r--vendor/symfony/translation/Symfony/Component/Translation/Catalogue/DiffOperation.php49
1 files changed, 0 insertions, 49 deletions
diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/DiffOperation.php b/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/DiffOperation.php
deleted file mode 100644
index 1672d121..00000000
--- a/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/DiffOperation.php
+++ /dev/null
@@ -1,49 +0,0 @@
1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Translation\Catalogue;
13
14/**
15 * Diff operation between two catalogues.
16 *
17 * @author Jean-François Simon <contact@jfsimon.fr>
18 */
19class DiffOperation extends AbstractOperation
20{
21 /**
22 * {@inheritdoc}
23 */
24 protected function processDomain($domain)
25 {
26 $this->messages[$domain] = array(
27 'all' => array(),
28 'new' => array(),
29 'obsolete' => array(),
30 );
31
32 foreach ($this->source->all($domain) as $id => $message) {
33 if ($this->target->has($id, $domain)) {
34 $this->messages[$domain]['all'][$id] = $message;
35 $this->result->add(array($id => $message), $domain);
36 } else {
37 $this->messages[$domain]['obsolete'][$id] = $message;
38 }
39 }
40
41 foreach ($this->target->all($domain) as $id => $message) {
42 if (!$this->source->has($id, $domain)) {
43 $this->messages[$domain]['all'][$id] = $message;
44 $this->messages[$domain]['new'][$id] = $message;
45 $this->result->add(array($id => $message), $domain);
46 }
47 }
48 }
49}