| Conditions | 4 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function dbTypecast($value) |
||
| 35 | { |
||
| 36 | if ( |
||
| 37 | $this->getType() === Schema::TYPE_BINARY && |
||
| 38 | $this->getDbType() === 'varbinary' && |
||
| 39 | is_string($value) |
||
| 40 | ) { |
||
| 41 | return new Expression('CONVERT(VARBINARY(MAX), ' . ('0x' . bin2hex($value)) . ')'); |
||
| 42 | } |
||
| 43 | |||
| 44 | return parent::dbTypecast($value); |
||
| 45 | } |
||
| 47 |