We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29e8c1e commit 985bb44Copy full SHA for 985bb44
src/Timer.php
@@ -1,5 +1,5 @@
1
<?php
2
-declare(strict_types=1);
+declare(strict_types = 1);
3
4
namespace Ayesh\PHP_Timer;
5
@@ -49,8 +49,7 @@ public static function start(string $key = 'default') {
49
self::$timers[$key][0] = true;
50
self::$timers[$key][1] = self::getCurrentTime();
51
}
52
- }
53
- else {
+ } else {
54
self::$timers[$key] = [
55
true,
56
self::getCurrentTime(),
@@ -143,8 +142,7 @@ public static function stop($key = 'default') {
143
142
$ct = self::getCurrentTime();
144
self::$timers[$key][0] = false;
145
self::$timers[$key][2] += $ct - self::$timers[$key][1];
146
147
148
throw new \LogicException('Stopping timer when the given key timer was not initialized.');
149
150
0 commit comments