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(
|
||||
string $string,
|
||||
int $width,
|
||||
int $line = 1
|
||||
int $line = 1,
|
||||
array $words = [],
|
||||
array $lines = []
|
||||
): string
|
||||
{
|
||||
$words = [];
|
||||
|
||||
foreach (explode(' ', $string) as $word)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
$lines = [];
|
||||
|
||||
foreach ($words as $values)
|
||||
{
|
||||
$lines[] = implode(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue