Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class Int8Type implements TypeCastInterface |
||
10 | { |
||
11 | 17 | public function __construct(private string $value) |
|
13 | 17 | } |
|
14 | |||
15 | 17 | #[\Override] |
|
16 | public function isPossible(): bool |
||
17 | { |
||
18 | 17 | if (str_starts_with($this->value, '*int8')){ |
|
19 | 4 | $this->value = preg_replace('/^(\*int8\s*)/', '', $this->value) ?? ''; |
|
20 | 4 | return true; |
|
21 | } |
||
22 | 17 | return false; |
|
23 | } |
||
24 | |||
25 | 4 | #[\Override] |
|
29 | } |
||
30 | } |
||
31 |