Completed
Push — master ( e42026...8cf92f )
by Alec
02:35
created
src/Tools/Benchmark.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/Colour/Theme.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/BenchmarkReportFormatter.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/BenchmarkFunctionSymfonyFormatter.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
         return
39 39
             $this->theme->dark(
40 40
                 'array' === $type ?
41
-                    $str :
42
-                    sprintf(
41
+                    $str : sprintf(
43 42
                         '%s(%s)',
44 43
                         $type,
45 44
                         $str
@@ -80,8 +79,7 @@  discard block
 block discarded – undo
80 79
     {
81 80
         return
82 81
             $rank === 1 ?
83
-                $this->averageFirst($average) :
84
-                $this->average($average);
82
+                $this->averageFirst($average) : $this->average($average);
85 83
     }
86 84
 
87 85
     protected function averageFirst(float $average): string
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/BenchmarkFunctionFormatter.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,10 +37,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Tools/BenchmarkSymfonyProgressBar.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,17 +42,17 @@  discard block
 block discarded – undo
42 42
         $this->progressBar->setFormat(static::DEFAULT_PROGRESSBAR_FORMAT);
43 43
 
44 44
         $progressStart =
45
-            function (): void {
45
+            function(): void {
46 46
                 $this->progressBar->start();
47 47
             };
48 48
 
49 49
         $progressAdvance =
50
-            function (): void {
50
+            function(): void {
51 51
                 $this->progressBar->advance();
52 52
             };
53 53
 
54 54
         $progressFinish =
55
-            function (): void {
55
+            function(): void {
56 56
                 $this->progressBar->finish();
57 57
                 $this->progressBar->clear();
58 58
             };
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
 
109 109
     protected function showComment(string $comment = ''): void
110 110
     {
111
-        $this->output->writeln('<comment>' . $comment . '</>');
111
+        $this->output->writeln('<comment>'.$comment.'</>');
112 112
     }
113 113
 
114 114
     protected function sectionSeparator(?string $char): string
115 115
     {
116
-        return str_repeat($char ?? static::DEFAULT_SEPARATOR_CHAR, $this->terminalWidth) . PHP_EOL. PHP_EOL;
116
+        return str_repeat($char ?? static::DEFAULT_SEPARATOR_CHAR, $this->terminalWidth).PHP_EOL.PHP_EOL;
117 117
     }
118 118
 }
Please login to merge, or discard this patch.