Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
24 | public function dbTypecast($value) |
||
25 | { |
||
26 | if ($value === null) { |
||
27 | return $value; |
||
28 | } |
||
29 | |||
30 | if ($value instanceof ExpressionInterface) { |
||
31 | return $value; |
||
32 | } |
||
33 | |||
34 | if ($this->dbType === Schema::TYPE_JSON) { |
||
35 | return new JsonExpression($value, $this->type); |
||
36 | } |
||
37 | |||
38 | return $this->typecast($value); |
||
39 | } |
||
57 |