@@ -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 | /** |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | return |
49 | 49 | new BenchmarkReport($reportable); |
50 | 50 | } |
51 | - throw new \RuntimeException('Attempt to create unimplemented report for: ' . typeOf($reportable)); |
|
51 | + throw new \RuntimeException('Attempt to create unimplemented report for: '.typeOf($reportable)); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | return |
74 | 74 | new BenchmarkReportFormatter($report); |
75 | 75 | } |
76 | - throw new \RuntimeException('Attempt to create unimplemented formatter for: ' . typeOf($report)); |
|
76 | + throw new \RuntimeException('Attempt to create unimplemented formatter for: '.typeOf($report)); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | public static function getThemeObject(): Theme |
@@ -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 | ); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $this->iterations = $iterations; |
46 | 46 | $this->rewindable = |
47 | 47 | new Rewindable( |
48 | - function (int $iterations, int $i = 1): \Generator { |
|
48 | + function(int $iterations, int $i = 1): \Generator { |
|
49 | 49 | while ($i <= $iterations) { |
50 | 50 | yield $i++; |
51 | 51 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $result = $function(...$args); |
114 | 114 | } catch (\Throwable $e) { |
115 | 115 | $this->errorState = true; |
116 | - $result = brackets(typeOf($e)) . ': ' . $e->getMessage(); |
|
116 | + $result = brackets(typeOf($e)).': '.$e->getMessage(); |
|
117 | 117 | $this->exceptionMessages[$f->getIndexedName()] = $result; |
118 | 118 | } |
119 | 119 | $f->setResult($result); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function getString($colored = true): string |
26 | 26 | { |
27 | 27 | $profilerReport = (string)$this->report->getProfiler()->getReport(); |
28 | - $r = 'Benchmark:' . PHP_EOL; |
|
28 | + $r = 'Benchmark:'.PHP_EOL; |
|
29 | 29 | foreach ($this->report->getRelatives() as $indexName => $result) { |
30 | 30 | [$relative, $average] = $result; |
31 | 31 | $function = $this->report->getFunctionObject($indexName); |
@@ -47,18 +47,18 @@ discard block |
||
47 | 47 | ); |
48 | 48 | if ($this->report->isWithResults()) { |
49 | 49 | $result = $function->getResult(); |
50 | - $r .= $this->theme->dark('return: '. str_replace('double', 'float', typeOf($result)) . ' "' |
|
51 | - . var_export($function->getResult(), true) . '" ') . PHP_EOL; |
|
50 | + $r .= $this->theme->dark('return: '.str_replace('double', 'float', typeOf($result)).' "' |
|
51 | + . var_export($function->getResult(), true).'" ').PHP_EOL; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | if (!empty($exceptionMessages = $this->report->getExceptionMessages())) { |
55 | - $r .= 'Exceptions:' . PHP_EOL; |
|
55 | + $r .= 'Exceptions:'.PHP_EOL; |
|
56 | 56 | foreach ($exceptionMessages as $name => $exceptionMessage) { |
57 | - $r .= brackets($name) . ': ' . $this->theme->red($exceptionMessage) . PHP_EOL; |
|
57 | + $r .= brackets($name).': '.$this->theme->red($exceptionMessage).PHP_EOL; |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | return |
61 | - $r . PHP_EOL . $profilerReport; |
|
61 | + $r.PHP_EOL.$profilerReport; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -83,6 +83,6 @@ discard block |
||
83 | 83 | private function percent(float $relative): string |
84 | 84 | { |
85 | 85 | return |
86 | - number_format($relative * 100, 1) . '%'; |
|
86 | + number_format($relative * 100, 1).'%'; |
|
87 | 87 | } |
88 | 88 | } |