@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $this->silent = $silent ?? $this->silent; |
69 | 69 | |
70 | 70 | $this->iterationNumberGenerator = |
71 | - static function (int $iterations, int $i = 1): \Generator { |
|
71 | + static function(int $iterations, int $i = 1): \Generator { |
|
72 | 72 | while ($i <= $iterations) { |
73 | 73 | yield $i++; |
74 | 74 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | { |
94 | 94 | if ($iterations < self::MIN_ITERATIONS) { |
95 | 95 | throw new \RuntimeException( |
96 | - '[' . __CLASS__ . '] Number of Iterations should be greater than ' . self::MIN_ITERATIONS . '.' |
|
96 | + '['.__CLASS__.'] Number of Iterations should be greater than '.self::MIN_ITERATIONS.'.' |
|
97 | 97 | ); |
98 | 98 | } |
99 | 99 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | protected function sectionSeparator(?string $char): string |
154 | 154 | { |
155 | - return str_repeat($char ?? static::DEFAULT_SEPARATOR_CHAR, self::DEFAULT_TERMINAL_WIDTH) . PHP_EOL . PHP_EOL; |
|
155 | + return str_repeat($char ?? static::DEFAULT_SEPARATOR_CHAR, self::DEFAULT_TERMINAL_WIDTH).PHP_EOL.PHP_EOL; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | $this->getTimer()->elapsed(), |
263 | 263 | PHP_EOL, |
264 | 264 | (string)$this->memoryUsageReport |
265 | - ) . |
|
265 | + ). |
|
266 | 266 | ($eol ? PHP_EOL : ''); |
267 | 267 | } |
268 | 268 | |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | |
331 | 331 | protected function showComment(string $comment = ''): void |
332 | 332 | { |
333 | - echo $comment . PHP_EOL; |
|
333 | + echo $comment.PHP_EOL; |
|
334 | 334 | } |
335 | 335 | |
336 | 336 | /** |
@@ -13,19 +13,19 @@ |
||
13 | 13 | parent::__construct($iterations); |
14 | 14 | $width = $this->advanceSteps = $this->terminalWidth(); |
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 | |
21 | 21 | $progressAdvance = |
22 | - static function (): void { |
|
22 | + static function(): void { |
|
23 | 23 | echo '█'; |
24 | 24 | }; |
25 | 25 | |
26 | 26 | $progressFinish = |
27 | - static function () use ($width): void { |
|
28 | - echo "\e[" . ($width + 1). 'D'; |
|
27 | + static function() use ($width): void { |
|
28 | + echo "\e[".($width + 1).'D'; |
|
29 | 29 | echo "\e[K"; |
30 | 30 | }; |
31 | 31 |
@@ -31,17 +31,17 @@ discard block |
||
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 |
||
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 | } |