StateEnum   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

3 Methods

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