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