| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class ToInteger extends AbstractCollectionStrategy implements |
||
| 17 | StrategyInterface |
||
| 18 | { |
||
| 19 | public function extract(mixed $value, object|null $object = null): mixed |
||
| 20 | { |
||
| 21 | if ($value === null) { |
||
| 22 | // @codeCoverageIgnoreStart |
||
| 23 | return $value; |
||
| 24 | // @codeCoverageIgnoreEnd |
||
| 25 | } |
||
| 26 | |||
| 27 | return intval($value); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param mixed[]|null $data |
||
| 32 | * |
||
| 33 | * @codeCoverageIgnore |
||
| 34 | */ |
||
| 35 | public function hydrate(mixed $value, array|null $data): mixed |
||
| 42 | } |
||
| 43 | } |
||
| 44 |