ConstantListTranslatedEnum::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 5
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