Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4.25 |
Changes | 0 |
1 | <?php |
||
51 | 1 | public function convertToSQL($value) |
|
52 | { |
||
53 | 1 | if ($value === null) { |
|
54 | return null; |
||
55 | } |
||
56 | |||
57 | 1 | if ($value === true) { |
|
58 | 1 | return $this->true_value; |
|
59 | } |
||
60 | |||
61 | 1 | if ($value === false) { |
|
62 | 1 | return $this->false_value; |
|
63 | } |
||
64 | |||
65 | throw new InvalidArgumentException("unexpected value: " . print_r($value)); |
||
|
|||
66 | } |
||
85 |