Completed
Push — master ( 05b9c2...01632c )
by Tobias
06:56
created

LegacyTranslationLoader::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Translation\SymfonyStorage;
4
5
use Symfony\Component\Translation\MessageCatalogue;
6
use Symfony\Component\Translation\Reader\TranslationReader;
7
8
/**
9
 * This loader is just a legacy wrapper for Symfony TranslationReader
10
 * and provider a BC layer for Symfony 4.
11
 *
12
 * @author Victor Bocharsky <[email protected]>
13
 */
14
class LegacyTranslationLoader implements TranslationLoader
15
{
16
    /**
17
     * @var TranslationReader
18
     */
19
    private $reader;
20
21
    public function __construct(TranslationReader $reader)
22
    {
23
        $this->reader = $reader;
24
    }
25
26
    public function loadMessages($directory, MessageCatalogue $catalogue)
27
    {
28
        $this->reader->read($directory, $catalogue);
29
    }
30
}
31