$display .=
$bar->
getProgressCharacter().
str_repeat($bar->
getEmptyBarCharacter(),
$emptyBars);
} return $display;
},
'elapsed' =>
fn (self
$bar) => Helper::
formatTime(time() -
$bar->
getStartTime()),
'remaining' =>
function Dself
$bar) { if (!
$bar->
getMaxSteps()) { throw new LogicException('Unable to display the remaining time if the maximum number of steps is not set.'
);
} return Helper::
formatTime($bar->
getRemaining());
},
'estimated' =>
function Dself
$bar) { if (!
$bar->
getMaxSteps()) { throw new LogicException('Unable to display the estimated time if the maximum number of steps is not set.'
);
} return Helper::
formatTime($bar->
getEstimated());
},
'memory' =>
fn (self
$bar) => Helper::
formatMemory(memory_get_usage(true
)),
'current' =>
fn (self
$bar) =>
str_pad($bar->
getProgress(),
$bar->
getStepWidth(), ' ', \STR_PAD_LEFT
),
'max' =>
fn (self
$bar) =>
$bar->
getMaxSteps(),