@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * Formats the given time the processor into the given format. |
| 66 | - * @param $value |
|
| 67 | - * @param $format |
|
| 66 | + * @param double $value |
|
| 67 | + * @param string $format |
|
| 68 | 68 | * @return string |
| 69 | 69 | */ |
| 70 | 70 | private static function formatTime($value, $format): string { |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * @param string $key The key that the timer was started with. Default value is |
| 97 | 97 | * "default" throughout the class. |
| 98 | 98 | * @param string $format |
| 99 | - * @return mixed The formatted time. |
|
| 99 | + * @return string The formatted time. |
|
| 100 | 100 | * @throws \LogicException |
| 101 | 101 | */ |
| 102 | 102 | public static function read(string $key = 'default', $format = self::FORMAT_MILLISECONDS) { |
@@ -38,8 +38,7 @@ |
||
| 38 | 38 | public static function start(string $key = 'default'): void { |
| 39 | 39 | if (isset(self::$timers[$key])) { |
| 40 | 40 | self::$timers[$key]->start(); |
| 41 | - } |
|
| 42 | - else { |
|
| 41 | + } else { |
|
| 43 | 42 | self::$timers[$key] = new Stopwatch(); |
| 44 | 43 | } |
| 45 | 44 | } |