@@ -54,10 +54,10 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function full(): string |
| 56 | 56 | { |
| 57 | - $name = $this->report->getName(); |
|
| 57 | + $name = $this->report->getName(); |
|
| 58 | 58 | try { |
| 59 | 59 | $str = sprintf( |
| 60 | - 'Timer[%s]: Average: %s, Last: %s, Min(%s): %s, Max(%s): %s, Count: %s' . PHP_EOL, |
|
| 60 | + 'Timer[%s]: Average: %s, Last: %s, Min(%s): %s, Max(%s): %s, Count: %s'.PHP_EOL, |
|
| 61 | 61 | $this->theme->info($name), |
| 62 | 62 | $this->theme->comment(format_time_auto($this->report->getAverageValue())), |
| 63 | 63 | format_time_auto($this->report->getLastValue()), |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } catch (\Throwable $e) { |
| 71 | 71 | $str = |
| 72 | 72 | sprintf( |
| 73 | - 'Timer[%s]: %s' . PHP_EOL, |
|
| 73 | + 'Timer[%s]: %s'.PHP_EOL, |
|
| 74 | 74 | $this->theme->red($name), |
| 75 | 75 | $this->theme->comment('Exception encountered') |
| 76 | 76 | ); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function getString(): string |
| 31 | 31 | { |
| 32 | 32 | $profilerReport = (string)$this->report->getProfiler()->getReport(); |
| 33 | - $r = 'Benchmark:' . PHP_EOL; |
|
| 33 | + $r = 'Benchmark:'.PHP_EOL; |
|
| 34 | 34 | /** @var BenchmarkRelative $result */ |
| 35 | 35 | foreach ($this->report->getRelatives() as $indexName => $result) { |
| 36 | 36 | $relative = $result->getRelative(); |
@@ -54,18 +54,18 @@ discard block |
||
| 54 | 54 | ); |
| 55 | 55 | if ($this->report->isWithResults()) { |
| 56 | 56 | $result = $function->getResult(); |
| 57 | - $r .= $this->theme->dark('return: ' . str_replace('double', 'float', typeOf($result)) . ' "' |
|
| 58 | - . var_export($function->getResult(), true) . '" ') . PHP_EOL; |
|
| 57 | + $r .= $this->theme->dark('return: '.str_replace('double', 'float', typeOf($result)).' "' |
|
| 58 | + . var_export($function->getResult(), true).'" ').PHP_EOL; |
|
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | if (!empty($exceptionMessages = $this->report->getExceptionMessages())) { |
| 62 | - $r .= 'Exceptions:' . PHP_EOL; |
|
| 62 | + $r .= 'Exceptions:'.PHP_EOL; |
|
| 63 | 63 | foreach ($exceptionMessages as $name => $exceptionMessage) { |
| 64 | - $r .= brackets($name) . ': ' . $this->theme->red($exceptionMessage) . PHP_EOL; |
|
| 64 | + $r .= brackets($name).': '.$this->theme->red($exceptionMessage).PHP_EOL; |
|
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | return |
| 68 | - $r . PHP_EOL . $profilerReport; |
|
| 68 | + $r.PHP_EOL.$profilerReport; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -91,6 +91,6 @@ discard block |
||
| 91 | 91 | private function percent(float $relative): string |
| 92 | 92 | { |
| 93 | 93 | return |
| 94 | - number_format($relative * 100, 1) . '%'; |
|
| 94 | + number_format($relative * 100, 1).'%'; |
|
| 95 | 95 | } |
| 96 | 96 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $this->errorState = false; |
| 59 | 59 | $this->rewindable = |
| 60 | 60 | new Rewindable( |
| 61 | - function (int $iterations, int $i = 1): \Generator { |
|
| 61 | + function(int $iterations, int $i = 1): \Generator { |
|
| 62 | 62 | while ($i <= $iterations) { |
| 63 | 63 | yield $i++; |
| 64 | 64 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $result = $function(...$args); |
| 128 | 128 | } catch (\Throwable $e) { |
| 129 | 129 | $this->errorState = true; |
| 130 | - $result = brackets(typeOf($e)) . ': ' . $e->getMessage(); |
|
| 130 | + $result = brackets(typeOf($e)).': '.$e->getMessage(); |
|
| 131 | 131 | $this->exceptionMessages[$f->getIndexedName()] = $result; |
| 132 | 132 | $this->exceptions[$f->getIndexedName()] = $e; |
| 133 | 133 | } |