| Total Complexity | 7 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 15 | ||
| Bugs | 2 | Features | 0 |
| 1 | <?php |
||
| 9 | trait SanitizesNumbers |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param int|string|float|null $number |
||
| 13 | * |
||
| 14 | * @return string |
||
| 15 | */ |
||
| 16 | 137 | protected function sanitize(int|string|float|null $number): string |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Determine whether the passed floating point number is precise. |
||
| 40 | * |
||
| 41 | * @param float $number |
||
| 42 | * |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | 59 | protected function isPrecise(float $number): bool |
|
| 64 |