@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | public function process(BenchmarkFunction $function): string |
50 | 50 | { |
51 | 51 | return |
52 | - $this->formatBenchmarkRelative($function) . |
|
52 | + $this->formatBenchmarkRelative($function). |
|
53 | 53 | (empty($exception = $this->formatException($function)) ? |
54 | 54 | PHP_EOL : |
55 | - static::EXCEPTIONS . PHP_EOL . $exception); |
|
55 | + static::EXCEPTIONS.PHP_EOL.$exception); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -153,8 +153,7 @@ discard block |
||
153 | 153 | $str = static::getExporter()->export($executionReturn); |
154 | 154 | return |
155 | 155 | 'array' === $type ? |
156 | - $str : |
|
157 | - sprintf( |
|
156 | + $str : sprintf( |
|
158 | 157 | '%s(%s)', |
159 | 158 | $type, |
160 | 159 | $str |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | { |
35 | 35 | return |
36 | 36 | sprintf( |
37 | - self::ELAPSED . ': %s %s', |
|
37 | + self::ELAPSED.': %s %s', |
|
38 | 38 | $this->refineElapsed($report->getElapsed()), |
39 | 39 | $eol ? PHP_EOL : '' |
40 | 40 | ); |
@@ -68,13 +68,13 @@ discard block |
||
68 | 68 | { |
69 | 69 | $r = $report; |
70 | 70 | return sprintf( |
71 | - self::TIMER . '%s: ' . |
|
72 | - self::AVERAGE . ': %s, ' . |
|
73 | - self::LAST . ': %s, ' . |
|
74 | - self::MIN . '(%s): %s, ' . |
|
75 | - self::MAX . '(%s): %s, ' . |
|
76 | - self::COUNT . ': %s, ' . |
|
77 | - self::ELAPSED . ': %s%s', |
|
71 | + self::TIMER.'%s: '. |
|
72 | + self::AVERAGE.': %s, '. |
|
73 | + self::LAST.': %s, '. |
|
74 | + self::MIN.'(%s): %s, '. |
|
75 | + self::MAX.'(%s): %s, '. |
|
76 | + self::COUNT.': %s, '. |
|
77 | + self::ELAPSED.': %s%s', |
|
78 | 78 | $this->refineName($r->getName()), |
79 | 79 | $this->refineSeconds($r->getAverageValue()), |
80 | 80 | $this->refineSeconds($r->getLastValue()), |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | if (DEFAULT_NAME === $name) { |
94 | 94 | return ''; |
95 | 95 | } |
96 | - return '[' . $name . ']'; |
|
96 | + return '['.$name.']'; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | protected function refineSeconds(?float $seconds): string |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | protected function build(BenchmarkReport $report): string |
46 | 46 | { |
47 | 47 | $this->report = $report; |
48 | - $str = 'Results:' . PHP_EOL; |
|
48 | + $str = 'Results:'.PHP_EOL; |
|
49 | 49 | $this->computeVariables(); |
50 | 50 | if ($this->benchmarkedAny) { |
51 | - $str .= self::BENCHMARK . PHP_EOL; |
|
51 | + $str .= self::BENCHMARK.PHP_EOL; |
|
52 | 52 | } |
53 | 53 | /** @var BenchmarkFunction $function */ |
54 | 54 | foreach ($report->getFunctions() as $name => $function) { |
@@ -120,8 +120,7 @@ discard block |
||
120 | 120 | '%s%s%s', |
121 | 121 | $aRAE, |
122 | 122 | $this->benchmarkedMoreThanOne && $this->report->isShowReturns() ? |
123 | - ':' . PHP_EOL . BenchmarkFunctionFormatter::returnToString($this->lastReturn) : |
|
124 | - $dLM, |
|
123 | + ':'.PHP_EOL.BenchmarkFunctionFormatter::returnToString($this->lastReturn) : $dLM, |
|
125 | 124 | PHP_EOL |
126 | 125 | ); |
127 | 126 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | protected function wrongReportType(string $expected, ReportInterface $report): void |
21 | 21 | { |
22 | 22 | throw new \RuntimeException( |
23 | - 'Instance of [' . $expected . '] expected, [' . typeOf($report) . '] given.' |
|
23 | + 'Instance of ['.$expected.'] expected, ['.typeOf($report).'] given.' |
|
24 | 24 | ); |
25 | 25 | } |
26 | 26 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $this->iterations = $this->refineIterations($iterations); |
57 | 57 | |
58 | 58 | $this->iterationNumberGenerator = |
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 | } |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | { |
81 | 81 | if ($iterations < self::MIN_ITERATIONS) { |
82 | 82 | throw new \RuntimeException( |
83 | - __CLASS__ . |
|
84 | - ': Number of Iterations should be greater then ' . |
|
83 | + __CLASS__. |
|
84 | + ': Number of Iterations should be greater then '. |
|
85 | 85 | self::MIN_ITERATIONS |
86 | 86 | ); |
87 | 87 | } |