StateEnum::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php declare(strict_types=1);
2
3
namespace Yokai\EnumBundle\Tests\Fixtures;
4
5
use Symfony\Contracts\Translation\TranslatorInterface;
6
use Yokai\EnumBundle\AbstractTranslatedEnum;
7
8
/**
9
 * @author Yann Eugoné <[email protected]>
10
 */
11
class StateEnum extends AbstractTranslatedEnum
12
{
13
    /**
14
     * @inheritDoc
15
     */
16
    public function __construct(TranslatorInterface $translator)
17
    {
18
        parent::__construct($translator, 'choice.state.%s');
19
    }
20
21
    protected function getValues(): array
22
    {
23
        return ['new', 'validated', 'disabled'];
24
    }
25
26
    public function getName(): string
27
    {
28
        return 'state';
29
    }
30
}
31