Completed
Branch master (835f03)
by coExp
02:21
created
src/ProgressBar.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function __construct(OutputInterface $output)
47 47
     {
48
-        $output->getFormatter()->setStyle('ok',  new OutputFormatterStyle('black', 'green', ['bold']));
48
+        $output->getFormatter()->setStyle('ok', new OutputFormatterStyle('black', 'green', ['bold']));
49 49
         $output->getFormatter()->setStyle('err', new OutputFormatterStyle('red', 'black', ['bold']));
50 50
 
51 51
         if ($output instanceof ConsoleOutputInterface) {
@@ -189,25 +189,25 @@  discard block
 block discarded – undo
189 189
 
190 190
             $percent = $this->getNbrDone() / $this->length;
191 191
 
192
-            $lengthPassed   = (int) ($percentPassed  * self::PROGRESSION_LENGTH);
192
+            $lengthPassed   = (int) ($percentPassed * self::PROGRESSION_LENGTH);
193 193
             $lengthWarning  = (int) ($percentWarning * self::PROGRESSION_LENGTH);
194
-            $lengthDone     = (int) ($percentDone    * self::PROGRESSION_LENGTH);
195
-            $lengthError    = (int) ($percentError   * self::PROGRESSION_LENGTH);
194
+            $lengthDone     = (int) ($percentDone * self::PROGRESSION_LENGTH);
195
+            $lengthError    = (int) ($percentError * self::PROGRESSION_LENGTH);
196 196
 
197 197
             $lengthLeft = self::PROGRESSION_LENGTH - $lengthPassed - $lengthDone - $lengthError - $lengthWarning;
198
-            $lengthLeft = ($lengthLeft < 0 ) ? 0 : $lengthLeft;
198
+            $lengthLeft = ($lengthLeft < 0) ? 0 : $lengthLeft;
199 199
 
200
-            $msg  = "\r" . sprintf('%3d', round($percent*100, 0)) . "%: [";
200
+            $msg  = "\r" . sprintf('%3d', round($percent * 100, 0)) . "%: [";
201 201
 
202
-            $msg .= '<info>'    . str_repeat('#', $lengthDone)   . '</info>';
202
+            $msg .= '<info>' . str_repeat('#', $lengthDone) . '</info>';
203 203
             $msg .= '<comment>' . str_repeat('#', $lengthPassed) . '</comment>';
204
-            $msg .= '<err>'   . str_repeat('#', $lengthError)  . '</err>';
204
+            $msg .= '<err>' . str_repeat('#', $lengthError) . '</err>';
205 205
 
206 206
             $msg .= str_repeat('-', $lengthLeft) . '] ';
207
-            $msg .= ($this->nbrSuccess)    ? " Done:<info>$this->nbrSuccess</info>" : '';
207
+            $msg .= ($this->nbrSuccess) ? " Done:<info>$this->nbrSuccess</info>" : '';
208 208
             $msg .= ($this->nbrWarning) ? " Warn:<comment>$this->nbrWarning</comment>" : '';
209
-            $msg .= ($this->nbrPassed)  ? " Pass:$this->nbrPassed" : '';
210
-            $msg .= ($this->nbrError)   ? " Err:<err>$this->nbrError</err>" : '';
209
+            $msg .= ($this->nbrPassed) ? " Pass:$this->nbrPassed" : '';
210
+            $msg .= ($this->nbrError) ? " Err:<err>$this->nbrError</err>" : '';
211 211
             $msg .= ' Remaining:' . ($nbrRemaining);
212 212
 
213 213
             $msg .= ' Elapsed:<info>' . $this->formatTime($timeElapsed) . '</info>';
Please login to merge, or discard this patch.
src/MultipleBar.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         }
161 161
 
162 162
         for ($i = 0 ; $i < $number ; $i++) {
163
-           $this->progressBars[] = new ProgressBar($this->getOutput());
163
+            $this->progressBars[] = new ProgressBar($this->getOutput());
164 164
         }
165 165
 
166 166
         return $this;
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     public function addProgressBarByName(array $names)
174 174
     {
175 175
         foreach ($names as $name) {
176
-           $this->progressBars[$name] = new ProgressBar($this->getOutput());
176
+            $this->progressBars[$name] = new ProgressBar($this->getOutput());
177 177
         }
178 178
 
179 179
         return $this;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function erase()
86 86
     {
87
-        for ($i = 0 ; $i < $this->length; $i++) {
88
-            $this->originalOutput->write(self::CLEAR_LINE.self::MOVE_CURSOR_UP);
87
+        for ($i = 0; $i < $this->length; $i++) {
88
+            $this->originalOutput->write(self::CLEAR_LINE . self::MOVE_CURSOR_UP);
89 89
         }
90 90
 
91 91
         $this->length = 0;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $this->erase();
102 102
 
103 103
         if (false === empty($this->title)) {
104
-            $this->originalOutput->writeln(self::CLEAR_LINE.$this->title);
104
+            $this->originalOutput->writeln(self::CLEAR_LINE . $this->title);
105 105
             $this->length++;
106 106
         }
107 107
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             throw new MultipleBarConfigurationException('Illegal number of ProgressBar');
160 160
         }
161 161
 
162
-        for ($i = 0 ; $i < $number ; $i++) {
162
+        for ($i = 0; $i < $number; $i++) {
163 163
            $this->progressBars[] = new ProgressBar($this->getOutput());
164 164
         }
165 165
 
Please login to merge, or discard this patch.