Browse Source

make width method protected

PHP-GTK3
yggverse 4 months ago
parent
commit
016a81ecfa
  1. 4
      src/Abstract/Model/Gtk/Pango/Markup.php
  2. 4
      src/Interface/Model/Gtk/Pango/Markup.php

4
src/Abstract/Model/Gtk/Pango/Markup.php

@ -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++;
} }

4
src/Interface/Model/Gtk/Pango/Markup.php

@ -56,8 +56,4 @@ interface Markup
string $const, string $const,
bool $close bool $close
): string; ): string;
public static function width(
string $markup
): ?int;
} }
Loading…
Cancel
Save