Completed
Push — master ( f9a123...73c14a )
by Alec
18:36
created
src/Tools/BenchmarkSymfonyProgressBar.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,17 +31,17 @@  discard block
 block discarded – undo
31 31
         $this->progressBar = $progressBar ?? $this->createProgressBar();
32 32
 
33 33
         $progressStart =
34
-            function (): void {
34
+            function(): void {
35 35
                 $this->progressBar->start();
36 36
             };
37 37
 
38 38
         $progressAdvance =
39
-            function (): void {
39
+            function(): void {
40 40
                 $this->progressBar->advance();
41 41
             };
42 42
 
43 43
         $progressFinish =
44
-            function (): void {
44
+            function(): void {
45 45
                 $this->progressBar->finish();
46 46
                 $this->progressBar->clear();
47 47
             };
@@ -110,15 +110,15 @@  discard block
 block discarded – undo
110 110
 
111 111
     protected function showComment(string $comment = ''): void
112 112
     {
113
-        $this->output->writeln('<comment>' . $comment . '</>');
113
+        $this->output->writeln('<comment>'.$comment.'</>');
114 114
     }
115 115
 
116 116
     protected function sectionSeparator(?string $char): string
117 117
     {
118 118
         return
119
-            ' ' . str_repeat(
119
+            ' '.str_repeat(
120 120
                 $char ?? static::DEFAULT_SEPARATOR_CHAR,
121 121
                 $this->terminalWidth - 2
122
-            ) . ' ' . PHP_EOL . PHP_EOL;
122
+            ).' '.PHP_EOL.PHP_EOL;
123 123
     }
124 124
 }
Please login to merge, or discard this patch.
src/Tools/BenchmarkSimpleProgressBar.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,18 +13,18 @@
 block discarded – undo
13 13
         // @codeCoverageIgnoreStart
14 14
         if (!$quiet) {
15 15
             $progressStart =
16
-                static function () use ($width): void {
17
-                    echo ' [' . str_repeat('░', $width) . ']';
18
-                    echo "\e[" . ($width + 1) . 'D';
16
+                static function() use ($width): void {
17
+                    echo ' ['.str_repeat('░', $width).']';
18
+                    echo "\e[".($width + 1).'D';
19 19
                 };
20 20
             $progressAdvance =
21
-                static function (): void {
21
+                static function(): void {
22 22
                     echo '█';
23 23
                 };
24 24
 
25 25
             $progressFinish =
26
-                static function () use ($width): void {
27
-                    echo "\e[" . ($width + 1) . 'D';
26
+                static function() use ($width): void {
27
+                    echo "\e[".($width + 1).'D';
28 28
                     echo "\e[K";
29 29
                 };
30 30
 
Please login to merge, or discard this patch.
src/Tools/Benchmark.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $this->silent = $silent ?? $this->silent;
71 71
 
72 72
         $this->iterationNumberGenerator =
73
-            static function (int $iterations, int $i = 1): \Generator {
73
+            static function(int $iterations, int $i = 1): \Generator {
74 74
                 while ($i <= $iterations) {
75 75
                     yield $i++;
76 76
                 }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     {
97 97
         if ($iterations < self::MIN_ITERATIONS) {
98 98
             throw new \RuntimeException(
99
-                '[' . __CLASS__ . '] Number of Iterations should be greater than ' . self::MIN_ITERATIONS . '.'
99
+                '['.__CLASS__.'] Number of Iterations should be greater than '.self::MIN_ITERATIONS.'.'
100 100
             );
101 101
         }
102 102
     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             str_repeat(
161 161
                 $char ?? static::DEFAULT_SEPARATOR_CHAR,
162 162
                 self::DEFAULT_TERMINAL_WIDTH
163
-            ) . PHP_EOL . PHP_EOL;
163
+            ).PHP_EOL.PHP_EOL;
164 164
     }
165 165
 
166 166
     /**
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                 $this->getTimer()->elapsed(),
271 271
                 PHP_EOL,
272 272
                 (string)$this->memoryUsageReport
273
-            ) .
273
+            ).
274 274
             ($eol ? PHP_EOL : '');
275 275
     }
276 276
 
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 
340 340
     protected function showComment(string $comment = ''): void
341 341
     {
342
-        echo $comment . PHP_EOL;
342
+        echo $comment.PHP_EOL;
343 343
     }
344 344
 
345 345
     /**
Please login to merge, or discard this patch.
src/Tools/BenchmarkWithSpinner.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@
 block discarded – undo
18 18
         if (!$quiet) {
19 19
             $s = $spinner ?? new SnakeSpinner('Benchmarking');
20 20
             $progressStart =
21
-                static function () use ($s): void {
21
+                static function() use ($s): void {
22 22
                     $s->begin(0.0);
23 23
                 };
24 24
 
25 25
             $progressAdvance =
26
-                static function (?float $percent = null) use ($s): void {
26
+                static function(?float $percent = null) use ($s) : void {
27 27
                     $s->spin($percent);
28 28
                 };
29 29
 
30 30
             $progressFinish =
31
-                static function () use ($s): void {
31
+                static function() use ($s): void {
32 32
                     $s->end();
33 33
                 };
34 34
 
Please login to merge, or discard this patch.
src/Tools/Formatters/BenchmarkFunctionSymfonyFormatter.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@  discard block
 block discarded – undo
39 39
         return
40 40
             $this->theme->dark(
41 41
                 'array' === $type ?
42
-                    $exportedValue :
43
-                    sprintf(
42
+                    $exportedValue : sprintf(
44 43
                         '%s(%s)',
45 44
                         $type,
46 45
                         $exportedValue
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
     {
82 81
         return
83 82
             $rank === 1 ?
84
-                $this->averageFirst($average) :
85
-                $this->average($average);
83
+                $this->averageFirst($average) : $this->average($average);
86 84
     }
87 85
 
88 86
     protected function averageFirst(float $average): string
Please login to merge, or discard this patch.
src/Tools/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
         return
46 46
             $this->errorMessage($function, BenchmarkFunction::class);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     {
133 133
         return
134 134
             str_pad(
135
-                $prefix . Pretty::percent($relative),
135
+                $prefix.Pretty::percent($relative),
136 136
                 9,
137 137
                 ' ',
138 138
                 STR_PAD_LEFT
@@ -146,8 +146,7 @@  discard block
 block discarded – undo
146 146
         $str = static::getExporter()->export($executionReturn);
147 147
         return
148 148
             'array' === $type ?
149
-                $str :
150
-                sprintf(
149
+                $str : sprintf(
151 150
                     '%s(%s)',
152 151
                     $type,
153 152
                     $str
Please login to merge, or discard this patch.
src/Tools/Formatters/BenchmarkReportFormatter.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
     protected function build(BenchmarkReport $report): string
61 61
     {
62 62
         $this->report = $report;
63
-        $str = static::RESULTS . PHP_EOL;
63
+        $str = static::RESULTS.PHP_EOL;
64 64
         $this->computeVariables();
65 65
         if ($this->benchmarkedAny) {
66
-            $str .= static::BENCHMARK . PHP_EOL;
66
+            $str .= static::BENCHMARK.PHP_EOL;
67 67
         }
68 68
         if ($this->anyExceptions) {
69
-            $exceptions = static::EXCEPTIONS . PHP_EOL;
69
+            $exceptions = static::EXCEPTIONS.PHP_EOL;
70 70
         } else {
71 71
             $exceptions = '';
72 72
         }
@@ -158,8 +158,7 @@  discard block
 block discarded – undo
158 158
                     '%s%s%s',
159 159
                     $aRAE,
160 160
                     $this->benchmarkedMoreThanOne && $this->report->isShowReturns() ?
161
-                        ':' . PHP_EOL . $formattedLastReturn :
162
-                        $dLM,
161
+                        ':'.PHP_EOL.$formattedLastReturn : $dLM,
163 162
                     PHP_EOL
164 163
                 );
165 164
         }
Please login to merge, or discard this patch.