@@ -81,7 +81,7 @@ |
||
| 81 | 81 | return |
| 82 | 82 | static::getBenchmarkFunctionFormatter(); |
| 83 | 83 | } |
| 84 | - throw new \RuntimeException('Formatter [' . typeOf($formatter) . '] is not accepted.'); |
|
| 84 | + throw new \RuntimeException('Formatter ['.typeOf($formatter).'] is not accepted.'); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $this->silent = $silent ?? $this->silent; |
| 61 | 61 | |
| 62 | 62 | $this->iterationNumberGenerator = |
| 63 | - function (int $iterations, int $i = 1): \Generator { |
|
| 63 | + function(int $iterations, int $i = 1): \Generator { |
|
| 64 | 64 | while ($i <= $iterations) { |
| 65 | 65 | yield $i++; |
| 66 | 66 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | { |
| 85 | 85 | if ($iterations < self::MIN_ITERATIONS) { |
| 86 | 86 | throw new \RuntimeException( |
| 87 | - '[' . __CLASS__ . '] Number of Iterations should be greater than ' . self::MIN_ITERATIONS . '.' |
|
| 87 | + '['.__CLASS__.'] Number of Iterations should be greater than '.self::MIN_ITERATIONS.'.' |
|
| 88 | 88 | ); |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | |
| 300 | 300 | protected function showComment(string $comment = ''): void |
| 301 | 301 | { |
| 302 | - echo $comment . PHP_EOL; |
|
| 302 | + echo $comment.PHP_EOL; |
|
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | /** |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | protected function assertArgs(string $name, array $arguments): void |
| 87 | 87 | { |
| 88 | 88 | if (1 !== \count($arguments)) { |
| 89 | - throw new \ArgumentCountError('Method [' . $name . '] accepts only one argument.'); |
|
| 89 | + throw new \ArgumentCountError('Method ['.$name.'] accepts only one argument.'); |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | protected function assertMethodName(string $name): void |
| 97 | 97 | { |
| 98 | 98 | if (!\array_key_exists($name, static::THEMES)) { |
| 99 | - throw new \BadMethodCallException('Unknown method call [' . $name . '] in [' . static::class . '].'); |
|
| 99 | + throw new \BadMethodCallException('Unknown method call ['.$name.'] in ['.static::class.'].'); |
|
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -31,8 +31,7 @@ |
||
| 31 | 31 | return |
| 32 | 32 | $this->theme->dark( |
| 33 | 33 | 'array' === $type ? |
| 34 | - $str : |
|
| 35 | - sprintf( |
|
| 34 | + $str : sprintf( |
|
| 36 | 35 | '%s(%s)', |
| 37 | 36 | $type, |
| 38 | 37 | $str |
@@ -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 |
@@ -148,8 +148,7 @@ discard block |
||
| 148 | 148 | $str = static::getExporter()->export($executionReturn); |
| 149 | 149 | return |
| 150 | 150 | 'array' === $type ? |
| 151 | - $str : |
|
| 152 | - sprintf( |
|
| 151 | + $str : sprintf( |
|
| 153 | 152 | '%s(%s)', |
| 154 | 153 | $type, |
| 155 | 154 | $str |
@@ -39,17 +39,17 @@ discard block |
||
| 39 | 39 | $this->progressBar->setFormat(static::DEFAULT_PROGRESSBAR_FORMAT); |
| 40 | 40 | |
| 41 | 41 | $progressStart = |
| 42 | - function (): void { |
|
| 42 | + function(): void { |
|
| 43 | 43 | $this->progressBar->start(); |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | 46 | $progressAdvance = |
| 47 | - function (): void { |
|
| 47 | + function(): void { |
|
| 48 | 48 | $this->progressBar->advance(); |
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | 51 | $progressFinish = |
| 52 | - function (): void { |
|
| 52 | + function(): void { |
|
| 53 | 53 | $this->progressBar->finish(); |
| 54 | 54 | $this->progressBar->clear(); |
| 55 | 55 | }; |
@@ -100,6 +100,6 @@ discard block |
||
| 100 | 100 | // $outputStyle = new OutputFormatterStyle('red', 'yellow', ['bold', 'blink']); |
| 101 | 101 | // $this->output->getFormatter()->setStyle('fire', $outputStyle); |
| 102 | 102 | // |
| 103 | - $this->output->writeln('<comment>' . $comment . '</>'); |
|
| 103 | + $this->output->writeln('<comment>'.$comment.'</>'); |
|
| 104 | 104 | } |
| 105 | 105 | } |