ConstantListTranslatedEnum   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yokai\EnumBundle;
6
7
use Symfony\Contracts\Translation\TranslatorInterface;
8
9
/**
10
 * @author Yann Eugoné <[email protected]>
11
 */
12
class ConstantListTranslatedEnum extends ConfigurableTranslatedEnum
13
{
14
    /**
15
     * @inheritDoc
16
     */
17
    public function __construct(
18
        ConstantExtractor $extractor,
19
        string $constantsPattern,
20
        TranslatorInterface $translator,
21
        string $transPattern,
22
        string $name
23
    ) {
24
        parent::__construct($translator, $transPattern, $name, $extractor->extract($constantsPattern));
25
    }
26
}
27