Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.0312 |
Changes | 0 |
1 | <?php |
||
19 | 44 | public function dbTypecast($value) |
|
20 | { |
||
21 | 44 | if ($value === null) { |
|
22 | 5 | return $value; |
|
23 | } |
||
24 | |||
25 | 44 | if ($value instanceof ExpressionInterface) { |
|
26 | 6 | return $value; |
|
27 | } |
||
28 | |||
29 | 42 | if ($this->getDbType() === Schema::TYPE_JSON) { |
|
30 | return new JsonExpression($value, $this->getType()); |
||
31 | } |
||
32 | |||
33 | 42 | return $this->typecast($value); |
|
34 | } |
||
52 |