Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class EntityList |
||
16 | { |
||
17 | /** |
||
18 | * @var string[] |
||
19 | */ |
||
20 | private $entityTypes = []; |
||
21 | |||
22 | |||
23 | /** |
||
24 | * EntityList constructor. |
||
25 | * |
||
26 | * @param string[] $entityTypes |
||
27 | */ |
||
28 | public function __construct( |
||
29 | $entityTypes = [] |
||
30 | ) { |
||
31 | $this->entityTypes = $entityTypes; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Retrieve list of entities |
||
36 | * |
||
37 | * @return ValidatorInterface[] |
||
38 | */ |
||
39 | public function getList(): array |
||
40 | { |
||
41 | return $this->entityTypes; |
||
|
|||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param string $code |
||
46 | * |
||
47 | * @return ValidatorInterface |
||
48 | */ |
||
49 | public function getEntityByCode(string $code): ValidatorInterface |
||
52 | } |
||
53 | } |