| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function __construct(array $enumValues, string $errorMessage = null, $strictType = false) |
||
| 20 | { |
||
| 21 | $this->enumValues = $enumValues; |
||
| 22 | $this->strictType = $strictType; |
||
| 23 | |||
| 24 | $this->setErrorMessage( |
||
| 25 | $errorMessage ?? 'Invalid option for enum. Allowed options are: ' . implode(', ', $this->enumValues) |
||
| 26 | ); |
||
| 27 | } |
||
| 28 | |||
| 38 |