Completed
Push — final-forms ( 80b973...cafa21 )
by Kamil
35:41 queued 17:05
created

getDefinedLocalesCodes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
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 Sylius\Component\Resource\Provider;
13
14
/**
15
 * @author Kamil Kokot <[email protected]>
16
 */
17
final class ImmutableTranslationLocaleProvider implements TranslationLocaleProviderInterface
18
{
19
    /**
20
     * @var array
21
     */
22
    private $definedLocalesCodes;
23
24
    /**
25
     * @var string
26
     */
27
    private $defaultLocaleCode;
28
29
    /**
30
     * @param array $definedLocalesCodes
31
     * @param string $defaultLocaleCode
32
     */
33
    public function __construct(array $definedLocalesCodes, $defaultLocaleCode)
34
    {
35
        $this->definedLocalesCodes = $definedLocalesCodes;
36
        $this->defaultLocaleCode = $defaultLocaleCode;
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function getDefinedLocalesCodes()
43
    {
44
        return $this->definedLocalesCodes;
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function getDefaultLocaleCode()
51
    {
52
        return $this->defaultLocaleCode;
53
    }
54
}
55