ImportResult::getErrors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
/*
4
 * This file is part of the PHP Translation package.
5
 *
6
 * (c) PHP Translation team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Translation\Bundle\Model;
13
14
use Symfony\Component\Translation\MessageCatalogueInterface;
15
use Translation\Extractor\Model\Error;
16
17
/**
18
 * The result from the Importer.
19
 *
20
 * @author Tobias Nyholm <[email protected]>
21
 */
22
final class ImportResult
23
{
24
    /**
25
     * @var MessageCatalogueInterface[]
26
     */
27
    private $messageCatalogues;
28
29
    /**
30
     * @var Error[]
31
     */
32
    private $errors;
33
34
    /**
35
     * @param MessageCatalogueInterface[] $messageCatalogues
36
     * @param Error[]                     $errors
37
     */
38
    public function __construct(array $messageCatalogues, array $errors)
39
    {
40
        $this->messageCatalogues = $messageCatalogues;
41
        $this->errors = $errors;
42
    }
43
44
    /**
45
     * @return MessageCatalogueInterface[]
46
     */
47
    public function getMessageCatalogues(): array
48
    {
49
        return $this->messageCatalogues;
50
    }
51
52
    /**
53
     * @return Error[]
54
     */
55
    public function getErrors(): array
56
    {
57
        return $this->errors;
58
    }
59
}
60