| Conditions | 5 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | public function normalizeDefaultValue(string|null $value): int|ExpressionInterface|null |
||
| 39 | { |
||
| 40 | if ($value === null || $this->isComputed() || preg_match("/^\(?NULL\b/i", $value) === 1) { |
||
| 41 | return null; |
||
| 42 | } |
||
| 43 | |||
| 44 | if (preg_match("/^[Bb]?'([01]+)'/", $value, $matches) === 1) { |
||
| 45 | /** @var int */ |
||
| 46 | return bindec($matches[1]); |
||
|
|
|||
| 47 | } |
||
| 48 | |||
| 49 | return new Expression($value); |
||
| 50 | } |
||
| 52 |