@@ -83,7 +83,7 @@ |
||
83 | 83 | * @param string $format The default format is milliseconds. See the class constants for additional |
84 | 84 | * formats. |
85 | 85 | * |
86 | - * @return mixed The formatted time, formatted by the formatter string passed for $format. |
|
86 | + * @return string The formatted time, formatted by the formatter string passed for $format. |
|
87 | 87 | * @throws \LogicException |
88 | 88 | * If the timer was not started, a \LogicException will be thrown. Use @see \Ayesh\PHP_Timer\Timer::start() |
89 | 89 | * to start a timer. |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | } |
16 | 16 | |
17 | 17 | public static function formatTime(int $miliseconds): 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 ($miliseconds >= $value) { |
33 | - $output[] = static::formatPlural((int) floor($miliseconds / $value), $string_pair[0], $string_pair[1]); |
|
33 | + $output[] = static::formatPlural((int) floor($miliseconds / $value), $string_pair[0], $string_pair[1]); |
|
34 | 34 | $miliseconds %= $value; |
35 | 35 | $granularity--; |
36 | 36 | } |