Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | protected function fixValue() |
||
27 | { |
||
28 | parent::fixValue(); |
||
29 | |||
30 | $this->value = filter_var($this->value, FILTER_VALIDATE_BOOLEAN, ['options' => [], |
||
31 | 'flags' => FILTER_NULL_ON_FAILURE]); |
||
32 | if (null === $this->value) { |
||
33 | throw new \InvalidArgumentException('the value passed to ' . get_class($this) . 'was not a booliean'); |
||
34 | } |
||
35 | $this->value = $this->value ? 'true' : 'false'; |
||
36 | } |
||
37 | |||
45 |