@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | } |
16 | 16 | |
17 | 17 | public static function formatTime(int $milliseconds): string { |
18 | - $units = [ // Do not reorder the array order. |
|
18 | + $units = [// Do not reorder the array order. |
|
19 | 19 | 31536000000 => ['1 year', '@count years'], |
20 | 20 | 2592000000 => ['1 month', '@count months'], |
21 | 21 | 604800000 => ['1 week', '@count weeks'], |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $output = []; |
31 | 31 | foreach ($units as $value => $string_pair) { |
32 | 32 | if ($milliseconds >= $value) { |
33 | - $output[] = static::formatPlural((int) floor($milliseconds / $value), $string_pair[0], $string_pair[1]); |
|
33 | + $output[] = static::formatPlural((int) floor($milliseconds / $value), $string_pair[0], $string_pair[1]); |
|
34 | 34 | $milliseconds %= $value; |
35 | 35 | $granularity--; |
36 | 36 | } |
@@ -109,10 +109,10 @@ |
||
109 | 109 | */ |
110 | 110 | private static function formatTime(float $value, string $format): string { |
111 | 111 | return match ($format) { |
112 | - static::FORMAT_MILLISECONDS => (string)round($value * 1000, 2), |
|
113 | - static::FORMAT_SECONDS => (string)round($value, 3), |
|
112 | + static::FORMAT_MILLISECONDS => (string) round($value * 1000, 2), |
|
113 | + static::FORMAT_SECONDS => (string) round($value, 3), |
|
114 | 114 | static::FORMAT_HUMAN => static::secondsToTimeString($value), |
115 | - default => (string)($value * 1000), |
|
115 | + default => (string) ($value * 1000), |
|
116 | 116 | }; |
117 | 117 | } |
118 | 118 |