Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
30 | public function value(array $data, $owner = null): bool |
||
31 | { |
||
32 | $value = $this->my($data); |
||
33 | if (in_array($value, $this->truths, true)) { |
||
34 | return true; |
||
35 | } |
||
36 | if (in_array($value, $this->falsehoods, true)) { |
||
37 | return false; |
||
38 | } |
||
39 | throw BooleanMappingFailure::unrecognised( |
||
40 | $value, |
||
41 | $this, |
||
42 | $this->truths, |
||
43 | $this->falsehoods |
||
44 | ); |
||
47 |