// Draw each step period, but not too late
if ($prevPeriod !==
$currPeriod ||
$timeInterval >=
$this->maxSecondsBetweenRedraws
) { $this->
display();
} } public function setMaxSteps(int
$max): void
{ $this->format = null;
$this->max =
max(0,
$max);
$this->stepWidth =
$this->max ? Helper::
width((string) $this->max
) : 4;
} /**
* Finishes the progress output.
*/
public function finish(): void
{ if (!
$this->max
) { $this->max =
$this->step;
}