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

LegacyTranslationLoader   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 17
ccs 0
cts 8
cp 0
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A loadMessages() 0 4 1
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