| Total Complexity | 4 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 91.67% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class NumberNormalizer extends AbstractNormalizer |
||
| 11 | { |
||
| 12 | private ?int $scale = null; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Sets the amount of decimal places to round to. Defaults to null which performs no rounding. |
||
| 16 | */ |
||
| 17 | 1 | public function scale(?int $scale = null): self |
|
| 18 | { |
||
| 19 | 1 | $this->scale = $scale; |
|
| 20 | |||
| 21 | 1 | return $this; |
|
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return float|int |
||
| 26 | */ |
||
| 27 | 6 | protected function getNormalizedValue(string $value) |
|
| 43 | } |
||
| 44 | } |
||
| 45 |