$formattedTitle =
sprintf($titleFormat, Helper::
substr($title, 0,
$limit -
$formatLength - 3
).'...'
);
} $titleStart =
intdiv($markupLength -
$titleLength, 2
);
if (false ===
mb_detect_encoding($markup, null, true
)) { $markup =
substr_replace($markup,
$formattedTitle,
$titleStart,
$titleLength);
} else { $markup =
mb_substr($markup, 0,
$titleStart).
$formattedTitle.
mb_substr($markup,
$titleStart +
$titleLength);
} } $this->output->
writeln(sprintf($this->style->
getBorderFormat(),
$markup));
} /**
* Renders vertical column separator.
*/
private function renderColumnSeparator(int
$type = self::BORDER_OUTSIDE
): string
{ $borders =
$this->style->
getBorderChars();
return sprintf($this->style->
getBorderFormat(), self::BORDER_OUTSIDE ===
$type ?
$borders[1
] :
$borders[3
]);
}