@@ -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 | /** |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | { |
53 | 53 | try { |
54 | 54 | $str = sprintf( |
55 | - 'Timer:[%s] Average: %s, Last: %s, Min(%s): %s, Max(%s): %s, Count: %s' . PHP_EOL, |
|
55 | + 'Timer:[%s] Average: %s, Last: %s, Min(%s): %s, Max(%s): %s, Count: %s'.PHP_EOL, |
|
56 | 56 | $this->theme->info($name), |
57 | 57 | $this->theme->comment(format_time_auto($this->report->getAverageValue())), |
58 | 58 | format_time_auto($this->report->getLastValue()), |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | } catch (\Throwable $e) { |
66 | 66 | $str = |
67 | 67 | sprintf( |
68 | - 'Timer:[%s] %s' . PHP_EOL, |
|
68 | + 'Timer:[%s] %s'.PHP_EOL, |
|
69 | 69 | $this->theme->info($name), |
70 | 70 | $this->theme->red('Exception encountered') |
71 | 71 | ); |
@@ -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 | } |
@@ -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 | } |
133 | 133 | $f->setResult($result); |