Total Complexity | 5 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
8 | final class DecimalNumber implements MappingStrategy, DefaultAttributesProvider |
||
9 | { |
||
10 | 3 | public static function hydrate(&$value, array $attributes = []): void |
|
11 | { |
||
12 | 3 | $value = self::formatDecimalNumber((string) $value, $attributes); |
|
13 | 3 | } |
|
14 | |||
15 | 2 | public static function extract(&$value, array $attributes = []): void |
|
16 | { |
||
17 | 2 | $value = self::formatDecimalNumber((string) $value, $attributes); |
|
18 | 2 | } |
|
19 | |||
20 | 4 | public static function getDefaultAttributes(): array |
|
25 | ]; |
||
26 | } |
||
27 | |||
28 | 5 | private static function formatDecimalNumber(string $number, array $attributes): string |
|
37 | } |
||
38 | } |
||
39 |