Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
23 | public function __construct(string $value) |
||
24 | { |
||
25 | if (!in_array($value, $this->supportedLanguages)) { |
||
26 | throw new \InvalidArgumentException( |
||
27 | 'Given language '.$value.' is not supported, only nl en fr are allowed.' |
||
28 | ); |
||
29 | } |
||
30 | |||
31 | $this->value = $value; |
||
32 | } |
||
52 |