mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
define initials as arguments
This commit is contained in:
parent
016a81ecfa
commit
31b86cd30e
1 changed files with 3 additions and 5 deletions
|
|
@ -166,11 +166,11 @@ class Markup implements \Yggverse\Yoda\Interface\Model\Gtk\Pango\Markup
|
||||||
protected static function _wrap(
|
protected static function _wrap(
|
||||||
string $string,
|
string $string,
|
||||||
int $width,
|
int $width,
|
||||||
int $line = 1
|
int $line = 1,
|
||||||
|
array $words = [],
|
||||||
|
array $lines = []
|
||||||
): string
|
): string
|
||||||
{
|
{
|
||||||
$words = [];
|
|
||||||
|
|
||||||
foreach (explode(' ', $string) as $word)
|
foreach (explode(' ', $string) as $word)
|
||||||
{
|
{
|
||||||
if (isset($words[$line]) && self::_width(implode(' ', $words[$line])) > $width)
|
if (isset($words[$line]) && self::_width(implode(' ', $words[$line])) > $width)
|
||||||
|
|
@ -181,8 +181,6 @@ class Markup implements \Yggverse\Yoda\Interface\Model\Gtk\Pango\Markup
|
||||||
$words[$line][] = $word;
|
$words[$line][] = $word;
|
||||||
}
|
}
|
||||||
|
|
||||||
$lines = [];
|
|
||||||
|
|
||||||
foreach ($words as $values)
|
foreach ($words as $values)
|
||||||
{
|
{
|
||||||
$lines[] = implode(
|
$lines[] = implode(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue