@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public static function start(string $name): void |
| 29 | 29 | { |
| 30 | - if(isset(static::$processMap[$name])) { |
|
| 30 | + if (isset(static::$processMap[$name])) { |
|
| 31 | 31 | throw new ProfilerException( |
| 32 | 32 | "process '{$name}' already started", |
| 33 | 33 | ProfilerException::STATUS_PROCESS_ALREADY_STARTED, |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | static::$processMap[$name] = microtime(true); |
| 39 | 39 | |
| 40 | - if(!isset(static::$statCallsCountMap[$name])) { |
|
| 40 | + if (!isset(static::$statCallsCountMap[$name])) { |
|
| 41 | 41 | static::$statCallsCountMap[$name] = 0; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public static function stop(string $name): void |
| 53 | 53 | { |
| 54 | - if(!isset(static::$processMap[$name])) { |
|
| 54 | + if (!isset(static::$processMap[$name])) { |
|
| 55 | 55 | throw new ProfilerException( |
| 56 | 56 | "process '{$name}' not started yet", |
| 57 | 57 | ProfilerException::STATUS_PROCESS_NOT_STARTED_YET, |
@@ -60,10 +60,10 @@ discard block |
||
| 60 | 60 | ); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - if(!isset(static::$statTimeMap[$name])) { |
|
| 63 | + if (!isset(static::$statTimeMap[$name])) { |
|
| 64 | 64 | static::$statTimeMap[$name] = 0; |
| 65 | 65 | } |
| 66 | - static::$statTimeMap[$name] += microtime(true) - static::$processMap[$name]; |
|
| 66 | + static::$statTimeMap[$name] += microtime(true)-static::$processMap[$name]; |
|
| 67 | 67 | unset(static::$processMap[$name]); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -87,10 +87,10 @@ discard block |
||
| 87 | 87 | public static function getStatTime(): array |
| 88 | 88 | { |
| 89 | 89 | uasort(static::$statTimeMap, function($lhs, $rhs) { |
| 90 | - if($rhs > $lhs) { |
|
| 90 | + if ($rhs > $lhs) { |
|
| 91 | 91 | return 1; |
| 92 | 92 | } |
| 93 | - if($lhs < $rhs) { |
|
| 93 | + if ($lhs < $rhs) { |
|
| 94 | 94 | return -1; |
| 95 | 95 | } |
| 96 | 96 | return 0; |