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