@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** @var CounterValuesInterface $report */ |
33 | 33 | return |
34 | 34 | sprintf( |
35 | - self::COUNTER . ': %s%s', |
|
35 | + self::COUNTER.': %s%s', |
|
36 | 36 | (string)$report->getValue(), |
37 | 37 | $eol ? PHP_EOL : '' |
38 | 38 | ); |
@@ -47,15 +47,15 @@ discard block |
||
47 | 47 | { |
48 | 48 | return |
49 | 49 | sprintf( |
50 | - self::COUNTER . '[%s]: ' . |
|
51 | - self::VALUE . ': %s, ' . |
|
52 | - self::STEP . ': %s, ' . |
|
53 | - self::BUMPED . ': %s, ' . |
|
54 | - self::PATH . ': %s, ' . |
|
55 | - self::LENGTH . ': %s, ' . |
|
56 | - self::MAX . ': %s, ' . |
|
57 | - self::MIN . ': %s, ' . |
|
58 | - self::DIFF . ': %s %s', |
|
50 | + self::COUNTER.'[%s]: '. |
|
51 | + self::VALUE.': %s, '. |
|
52 | + self::STEP.': %s, '. |
|
53 | + self::BUMPED.': %s, '. |
|
54 | + self::PATH.': %s, '. |
|
55 | + self::LENGTH.': %s, '. |
|
56 | + self::MAX.': %s, '. |
|
57 | + self::MIN.': %s, '. |
|
58 | + self::DIFF.': %s %s', |
|
59 | 59 | $report->getName(), |
60 | 60 | (string)$report->getValue(), |
61 | 61 | (string)$report->getStep(), |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | { |
78 | 78 | return |
79 | 79 | sprintf( |
80 | - self::FORWARD . '%s ' . self::BACKWARD . '%s', |
|
80 | + self::FORWARD.'%s '.self::BACKWARD.'%s', |
|
81 | 81 | $report->getBumped(), |
82 | 82 | $report->getBumpedBack() |
83 | 83 | ); |
@@ -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 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->silent = $silent ?? $this->silent; |
67 | 67 | |
68 | 68 | $this->iterationNumberGenerator = |
69 | - function (int $iterations, int $i = 1): \Generator { |
|
69 | + function(int $iterations, int $i = 1): \Generator { |
|
70 | 70 | while ($i <= $iterations) { |
71 | 71 | yield $i++; |
72 | 72 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | { |
91 | 91 | if ($iterations < self::MIN_ITERATIONS) { |
92 | 92 | throw new \RuntimeException( |
93 | - '[' . __CLASS__ . '] Number of Iterations should be greater than ' . self::MIN_ITERATIONS . '.' |
|
93 | + '['.__CLASS__.'] Number of Iterations should be greater than '.self::MIN_ITERATIONS.'.' |
|
94 | 94 | ); |
95 | 95 | } |
96 | 96 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | protected function sectionSeparator(?string $char): string |
143 | 143 | { |
144 | - return str_repeat($char ?? static::DEFAULT_SEPARATOR_CHAR, self::DEFAULT_TERMINAL_WIDTH) . PHP_EOL. PHP_EOL; |
|
144 | + return str_repeat($char ?? static::DEFAULT_SEPARATOR_CHAR, self::DEFAULT_TERMINAL_WIDTH).PHP_EOL.PHP_EOL; |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | |
318 | 318 | protected function showComment(string $comment = ''): void |
319 | 319 | { |
320 | - echo $comment . PHP_EOL; |
|
320 | + echo $comment.PHP_EOL; |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | /** |