| Total Complexity | 6 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | final class ColumnSchema extends AbstractColumnSchema |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Prepares default value and converts it according to {@see phpType}. |
||
| 19 | * |
||
| 20 | * @param mixed $value default value |
||
| 21 | * |
||
| 22 | * @return mixed converted value |
||
| 23 | 85 | */ |
|
| 24 | public function defaultPhpTypecast($value) |
||
| 25 | 85 | { |
|
| 26 | if ($value !== null) { |
||
| 27 | 62 | /** convert from MSSQL column_default format, e.g. ('1') -> 1, ('string') -> string */ |
|
| 28 | $value = substr(substr($value, 2), 0, -2); |
||
| 29 | } |
||
| 30 | 85 | ||
| 31 | return $this->phpTypecast($value); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function dbTypecast($value) |
||
| 45 | } |
||
| 46 | } |
||
| 47 |