@@ -20,7 +20,7 @@ |
||
20 | 20 | protected function wrongFormattableType(string $expected, Formattable $formattable): void |
21 | 21 | { |
22 | 22 | throw new \RuntimeException( |
23 | - 'Instance of [' . $expected . '] expected, [' . typeOf($formattable) . '] given.' |
|
23 | + 'Instance of ['.$expected.'] expected, ['.typeOf($formattable).'] given.' |
|
24 | 24 | ); |
25 | 25 | } |
26 | 26 | } |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | protected function build(BenchmarkReport $report): string |
56 | 56 | { |
57 | 57 | $this->report = $report; |
58 | - $str = static::RESULTS . PHP_EOL; |
|
58 | + $str = static::RESULTS.PHP_EOL; |
|
59 | 59 | $this->computeVariables(); |
60 | 60 | if ($this->benchmarkedAny) { |
61 | - $str .= static::BENCHMARK . PHP_EOL; |
|
61 | + $str .= static::BENCHMARK.PHP_EOL; |
|
62 | 62 | } |
63 | 63 | if ($this->anyExceptions) { |
64 | - $exceptions = static::EXCEPTIONS . PHP_EOL; |
|
64 | + $exceptions = static::EXCEPTIONS.PHP_EOL; |
|
65 | 65 | } else { |
66 | 66 | $exceptions = ''; |
67 | 67 | } |
@@ -154,8 +154,7 @@ discard block |
||
154 | 154 | '%s%s%s', |
155 | 155 | $aRAE, |
156 | 156 | $this->benchmarkedMoreThanOne && $this->report->isShowReturns() ? |
157 | - ':' . PHP_EOL . Factory::getBenchmarkFunctionFormatter()->returnToString($this->lastReturn) : |
|
158 | - $dLM, |
|
157 | + ':'.PHP_EOL.Factory::getBenchmarkFunctionFormatter()->returnToString($this->lastReturn) : $dLM, |
|
159 | 158 | PHP_EOL |
160 | 159 | ); |
161 | 160 | } |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | { |
38 | 38 | if ($function instanceof BenchmarkFunction) { |
39 | 39 | return |
40 | - $this->formatBenchmarkRelative($function) . |
|
40 | + $this->formatBenchmarkRelative($function). |
|
41 | 41 | (empty($exception = $this->formatException($function)) ? |
42 | 42 | PHP_EOL : |
43 | - /*static::EXCEPTIONS .*/ $exception . PHP_EOL); |
|
43 | + /*static::EXCEPTIONS .*/ $exception.PHP_EOL); |
|
44 | 44 | } |
45 | 45 | $this->wrongFormattableType(BenchmarkFunction::class, $function); |
46 | 46 | // @codeCoverageIgnoreStart |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | { |
136 | 136 | return |
137 | 137 | str_pad( |
138 | - $prefix . Pretty::percent($relative), |
|
138 | + $prefix.Pretty::percent($relative), |
|
139 | 139 | 9, |
140 | 140 | ' ', |
141 | 141 | STR_PAD_LEFT |
@@ -149,8 +149,7 @@ discard block |
||
149 | 149 | $str = static::getExporter()->export($executionReturn); |
150 | 150 | return |
151 | 151 | 'array' === $type ? |
152 | - $str : |
|
153 | - sprintf( |
|
152 | + $str : sprintf( |
|
154 | 153 | '%s(%s)', |
155 | 154 | $type, |
156 | 155 | $str |
@@ -38,17 +38,17 @@ discard block |
||
38 | 38 | $this->progressBar->setFormat(static::DEFAULT_PROGRESSBAR_FORMAT); |
39 | 39 | |
40 | 40 | $progressStart = |
41 | - function (): void { |
|
41 | + function(): void { |
|
42 | 42 | $this->progressBar->start(); |
43 | 43 | }; |
44 | 44 | |
45 | 45 | $progressAdvance = |
46 | - function (): void { |
|
46 | + function(): void { |
|
47 | 47 | $this->progressBar->advance(); |
48 | 48 | }; |
49 | 49 | |
50 | 50 | $progressFinish = |
51 | - function (): void { |
|
51 | + function(): void { |
|
52 | 52 | $this->progressBar->finish(); |
53 | 53 | $this->progressBar->clear(); |
54 | 54 | }; |
@@ -96,15 +96,15 @@ discard block |
||
96 | 96 | |
97 | 97 | protected function showComment(string $comment = ''): void |
98 | 98 | { |
99 | - $this->output->writeln('<comment>' . $comment . '</>'); |
|
99 | + $this->output->writeln('<comment>'.$comment.'</>'); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | protected function sectionSeparator(?string $char): string |
103 | 103 | { |
104 | 104 | return |
105 | - ' ' . str_repeat( |
|
105 | + ' '.str_repeat( |
|
106 | 106 | $char ?? static::DEFAULT_SEPARATOR_CHAR, |
107 | 107 | $this->terminalWidth - 2 |
108 | - ) . ' ' . PHP_EOL . PHP_EOL; |
|
108 | + ).' '.PHP_EOL.PHP_EOL; |
|
109 | 109 | } |
110 | 110 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $this->silent = $silent ?? $this->silent; |
69 | 69 | |
70 | 70 | $this->iterationNumberGenerator = |
71 | - static function (int $iterations, int $i = 1): \Generator { |
|
71 | + static function(int $iterations, int $i = 1): \Generator { |
|
72 | 72 | while ($i <= $iterations) { |
73 | 73 | yield $i++; |
74 | 74 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | { |
94 | 94 | if ($iterations < self::MIN_ITERATIONS) { |
95 | 95 | throw new \RuntimeException( |
96 | - '[' . __CLASS__ . '] Number of Iterations should be greater than ' . self::MIN_ITERATIONS . '.' |
|
96 | + '['.__CLASS__.'] Number of Iterations should be greater than '.self::MIN_ITERATIONS.'.' |
|
97 | 97 | ); |
98 | 98 | } |
99 | 99 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | protected function sectionSeparator(?string $char): string |
154 | 154 | { |
155 | - return str_repeat($char ?? static::DEFAULT_SEPARATOR_CHAR, self::DEFAULT_TERMINAL_WIDTH) . PHP_EOL . PHP_EOL; |
|
155 | + return str_repeat($char ?? static::DEFAULT_SEPARATOR_CHAR, self::DEFAULT_TERMINAL_WIDTH).PHP_EOL.PHP_EOL; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | $this->getTimer()->elapsed(), |
263 | 263 | PHP_EOL, |
264 | 264 | (string)$this->memoryUsageReport |
265 | - ) . |
|
265 | + ). |
|
266 | 266 | ($eol ? PHP_EOL : ''); |
267 | 267 | } |
268 | 268 | |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | |
331 | 331 | protected function showComment(string $comment = ''): void |
332 | 332 | { |
333 | - echo $comment . PHP_EOL; |
|
333 | + echo $comment.PHP_EOL; |
|
334 | 334 | } |
335 | 335 | |
336 | 336 | /** |