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