Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function __construct($options = null) |
||
34 | { |
||
35 | $this->strict = true; |
||
36 | |||
37 | if (isset($options['entity'])) { |
||
38 | /** @var AbstractEnumType $entity */ |
||
39 | $entity = $options['entity']; |
||
40 | |||
41 | if (\is_subclass_of($entity, AbstractEnumType::class)) { |
||
|
|||
42 | $this->choices = $entity::getValues(); |
||
43 | } |
||
44 | } |
||
45 | |||
46 | parent::__construct($options); |
||
47 | } |
||
48 | |||
57 |