@@ -88,7 +88,7 @@ |
||
| 88 | 88 | public function getEnumeratedName(): string |
| 89 | 89 | { |
| 90 | 90 | return |
| 91 | - brackets((string)$this->index, BRACKETS_ANGLE) . ' ' . $this->name; |
|
| 91 | + brackets((string)$this->index, BRACKETS_ANGLE).' '.$this->name; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | return |
| 51 | 51 | new BenchmarkReport($reportable); |
| 52 | 52 | } |
| 53 | - throw new \RuntimeException('Attempt to create unimplemented report for: ' . typeOf($reportable)); |
|
| 53 | + throw new \RuntimeException('Attempt to create unimplemented report for: '.typeOf($reportable)); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | return |
| 76 | 76 | new BenchmarkReportFormatter($report); |
| 77 | 77 | } |
| 78 | - throw new \RuntimeException('Attempt to create unimplemented formatter for: ' . typeOf($report)); |
|
| 78 | + throw new \RuntimeException('Attempt to create unimplemented formatter for: '.typeOf($report)); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $this->verbose = false; |
| 58 | 58 | $this->rewindable = |
| 59 | 59 | new Rewindable( |
| 60 | - function (int $iterations, int $i = 1): \Generator { |
|
| 60 | + function(int $iterations, int $i = 1): \Generator { |
|
| 61 | 61 | while ($i <= $iterations) { |
| 62 | 62 | yield $i++; |
| 63 | 63 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | try { |
| 126 | 126 | $result = $function(...$args); |
| 127 | 127 | } catch (\Throwable $e) { |
| 128 | - $this->exceptionMessages[$f->getIndexedName()] = $result = brackets(typeOf($e)) . ': ' . $e->getMessage(); |
|
| 128 | + $this->exceptionMessages[$f->getIndexedName()] = $result = brackets(typeOf($e)).': '.$e->getMessage(); |
|
| 129 | 129 | $this->exceptions[$f->getIndexedName()] = $e; |
| 130 | 130 | $f->setException($e); |
| 131 | 131 | } |
@@ -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->themed->dark('return: ' . str_replace('double', 'float', typeOf($result)) . ' "' |
|
| 58 | - . var_export($function->getResult(), true) . '" ') . PHP_EOL; |
|
| 57 | + $r .= $this->themed->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->themed->red($exceptionMessage) . PHP_EOL; |
|
| 64 | + $r .= brackets($name).': '.$this->themed->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 | } |
@@ -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->themed->info($name), |
| 62 | 62 | $this->themed->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->themed->red($name), |
| 75 | 75 | $this->themed->comment('Exception encountered') |
| 76 | 76 | ); |