Completed
Pull Request — master (#30)
by
unknown
11:11
created

ConfigurableTranslatedEnum::getValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Yokai\EnumBundle\Enum;
4
5
use Symfony\Contracts\Translation\TranslatorInterface;
6
7
/**
8
 * @author Yann Eugoné <[email protected]>
9
 */
10
class ConfigurableTranslatedEnum extends AbstractTranslatedEnum
11
{
12
    /**
13
     * @var string
14
     */
15
    private $name;
16
17
    /**
18
     * @var array
19
     */
20
    private $values;
21
22
    /**
23
     * @param TranslatorInterface $translator
24
     * @param string              $transPattern
25
     * @param string              $name
26
     * @param array               $values
27
     */
28
    public function __construct(TranslatorInterface $translator, $transPattern, $name, array $values)
29
    {
30
        parent::__construct($translator, $transPattern);
31
32
        $this->name = $name;
33
        $this->values = $values;
34
    }
35
36
    /**
37
     * @inheritdoc
38
     */
39
    public function getName()
40
    {
41
        return $this->name;
42
    }
43
44
    /**
45
     * @inheritdoc
46
     */
47
    public function getValues()
48
    {
49
        return $this->values;
50
    }
51
}
52