| Total Complexity | 4 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class Pretty |
||
| 14 | { |
||
| 15 | public const DEFAULT_DECIMALS = 2; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param int $number |
||
| 19 | * @param null|string $unit |
||
| 20 | * @param int|null $decimals |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | 7 | public static function bytes(int $number, ?string $unit = null, ?int $decimals = null): string |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param float $value |
||
| 31 | * @param int|null $units |
||
| 32 | * @param int|null $precision |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | 20 | public static function time(float $value, ?int $units = null, ?int $precision = null): string |
|
| 44 |