| Total Complexity | 4 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class Int16Type implements TypeCastInterface |
||
| 10 | { |
||
| 11 | 17 | public function __construct(private string $value) |
|
| 12 | { |
||
| 13 | } |
||
| 14 | |||
| 15 | 17 | public function isPossible(): bool |
|
| 16 | { |
||
| 17 | 17 | if (str_starts_with($this->value, '*int16')){ |
|
| 18 | 2 | $this->value = preg_replace('/^(\*int16\s*)/', '', $this->value); |
|
| 19 | 2 | return true; |
|
| 20 | } |
||
| 21 | 17 | return false; |
|
| 22 | } |
||
| 23 | |||
| 24 | 2 | public function getCastedValue(): int|float |
|
| 27 | } |
||
| 28 | } |
||
| 29 |