Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2751961

Browse files
committed
move the method so it's together with other public methods
1 parent 206f3c9 commit 2751961

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Symfony/Component/Console/Helper/ProgressBar.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,13 @@ public function setProgress(int $step)
295295
}
296296
}
297297

298+
public function setMaxSteps(int $max)
299+
{
300+
$this->format = null;
301+
$this->max = max(0, $max);
302+
$this->stepWidth = $this->max ? Helper::strlen((string) $this->max) : 4;
303+
}
304+
298305
/**
299306
* Finishes the progress output.
300307
*/
@@ -362,13 +369,6 @@ private function setRealFormat(string $format)
362369
$this->formatLineCount = substr_count($this->format, "\n");
363370
}
364371

365-
public function setMaxSteps(int $max)
366-
{
367-
$this->format = null;
368-
$this->max = max(0, $max);
369-
$this->stepWidth = $this->max ? Helper::strlen((string) $this->max) : 4;
370-
}
371-
372372
/**
373373
* Overwrites a previous message to the output.
374374
*/

0 commit comments

Comments
 (0)