@@ -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 | /** |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public function getString(): string |
30 | 30 | { |
31 | 31 | $profilerReport = (string)$this->report->getProfiler()->getReport(); |
32 | - $r = 'Benchmark:' . PHP_EOL; |
|
32 | + $r = 'Benchmark:'.PHP_EOL; |
|
33 | 33 | foreach ($this->report->getRelatives() as $indexName => $result) { |
34 | 34 | [$relative, $average] = $result; |
35 | 35 | $function = $this->report->getFunctionObject($indexName); |
@@ -51,18 +51,18 @@ discard block |
||
51 | 51 | ); |
52 | 52 | if ($this->report->isWithResults()) { |
53 | 53 | $result = $function->getResult(); |
54 | - $r .= $this->theme->dark('return: ' . str_replace('double', 'float', typeOf($result)) . ' "' |
|
55 | - . var_export($function->getResult(), true) . '" ') . PHP_EOL; |
|
54 | + $r .= $this->theme->dark('return: '.str_replace('double', 'float', typeOf($result)).' "' |
|
55 | + . var_export($function->getResult(), true).'" ').PHP_EOL; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | if (!empty($exceptionMessages = $this->report->getExceptionMessages())) { |
59 | - $r .= 'Exceptions:' . PHP_EOL; |
|
59 | + $r .= 'Exceptions:'.PHP_EOL; |
|
60 | 60 | foreach ($exceptionMessages as $name => $exceptionMessage) { |
61 | - $r .= brackets($name) . ': ' . $this->theme->red($exceptionMessage) . PHP_EOL; |
|
61 | + $r .= brackets($name).': '.$this->theme->red($exceptionMessage).PHP_EOL; |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | return |
65 | - $r . PHP_EOL . $profilerReport; |
|
65 | + $r.PHP_EOL.$profilerReport; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -88,6 +88,6 @@ discard block |
||
88 | 88 | private function percent(float $relative): string |
89 | 89 | { |
90 | 90 | return |
91 | - number_format($relative * 100, 1) . '%'; |
|
91 | + number_format($relative * 100, 1).'%'; |
|
92 | 92 | } |
93 | 93 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $this->functions = []; |
57 | 57 | $this->rewindable = |
58 | 58 | new Rewindable( |
59 | - function (int $iterations, int $i = 1): \Generator { |
|
59 | + function(int $iterations, int $i = 1): \Generator { |
|
60 | 60 | while ($i <= $iterations) { |
61 | 61 | yield $i++; |
62 | 62 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $result = $function(...$args); |
126 | 126 | } catch (\Throwable $e) { |
127 | 127 | $this->errorState = true; |
128 | - $result = brackets(typeOf($e)) . ': ' . $e->getMessage(); |
|
128 | + $result = brackets(typeOf($e)).': '.$e->getMessage(); |
|
129 | 129 | $this->exceptionMessages[$f->getIndexedName()] = $result; |
130 | 130 | $this->exceptions[$f->getIndexedName()] = $e; |
131 | 131 | } |
@@ -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 | ); |