// gets string length for each sub line with multiline format
$linesLength =
array_map(fn ($subLine) => Helper::
width(Helper::
removeDecoration($this->output->
getFormatter(),
rtrim($subLine, "\r"
))),
explode("\n",
$line));
$linesWidth =
max($linesLength);
$terminalWidth =
$this->terminal->
getWidth();
if ($linesWidth <=
$terminalWidth) { return $line;
} $this->
setBarWidth($this->barWidth -
$linesWidth +
$terminalWidth);
return preg_replace_callback($regex,
$callback,
$this->format
);
}}