mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
make width method protected
This commit is contained in:
parent
53626a602a
commit
016a81ecfa
2 changed files with 2 additions and 6 deletions
|
|
@ -139,7 +139,7 @@ class Markup implements \Yggverse\Yoda\Interface\Model\Gtk\Pango\Markup
|
||||||
throw new Exception;
|
throw new Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function width(
|
protected static function _width(
|
||||||
string $markup
|
string $markup
|
||||||
): ?int
|
): ?int
|
||||||
{
|
{
|
||||||
|
|
@ -173,7 +173,7 @@ class Markup implements \Yggverse\Yoda\Interface\Model\Gtk\Pango\Markup
|
||||||
|
|
||||||
foreach (explode(' ', $string) as $word)
|
foreach (explode(' ', $string) as $word)
|
||||||
{
|
{
|
||||||
if (isset($words[$line]) && Markup::width(implode(' ', $words[$line])) > $width)
|
if (isset($words[$line]) && self::_width(implode(' ', $words[$line])) > $width)
|
||||||
{
|
{
|
||||||
$line++;
|
$line++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,4 @@ interface Markup
|
||||||
string $const,
|
string $const,
|
||||||
bool $close
|
bool $close
|
||||||
): string;
|
): string;
|
||||||
|
|
||||||
public static function width(
|
|
||||||
string $markup
|
|
||||||
): ?int;
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue