@@ -116,7 +116,7 @@ |
||
116 | 116 | * @param string $key The key that the timer was started with. Default value is |
117 | 117 | * "default" throughout the class. |
118 | 118 | * @param string $format |
119 | - * @return mixed The formatted time. |
|
119 | + * @return string The formatted time. |
|
120 | 120 | * @throws \LogicException |
121 | 121 | */ |
122 | 122 | public static function read(string $key = 'default', $format = self::FORMAT_MILLISECONDS) { |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | namespace Ayesh\PHP_Timer; |
5 | 5 | |
@@ -97,11 +97,11 @@ discard block |
||
97 | 97 | foreach (self::TIMES as $unit => $value) { |
98 | 98 | if ($ms >= $value) { |
99 | 99 | $time = floor($ms / $value * 100.0) / 100.0; |
100 | - return $time . ' ' . ($time == 1 ? $unit : $unit . 's'); |
|
100 | + return $time.' '.($time == 1 ? $unit : $unit.'s'); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
104 | - return $ms . ' ms'; |
|
104 | + return $ms.' ms'; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |