From 112fa6507f641f9d61b409279236999ea7ce5ee8 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 7 Jul 2024 08:53:44 +0300 Subject: [PATCH] allow nullable _subtitle value, fix getValue data type returned --- src/Entity/Browser/Container/Tab/Page/Title.php | 4 ++-- src/Gtk/Browser/Container/Tab/Page/Title/Label.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Entity/Browser/Container/Tab/Page/Title.php b/src/Entity/Browser/Container/Tab/Page/Title.php index 61b2535a..1fce471d 100644 --- a/src/Entity/Browser/Container/Tab/Page/Title.php +++ b/src/Entity/Browser/Container/Tab/Page/Title.php @@ -66,12 +66,12 @@ class Title ); } - public function getValue(): string + public function getValue(): ?string { return $this->gtk->get_text(); } - public function getSubtitle(): string + public function getSubtitle(): ?string { return $this->gtk->get_subtitle(); } diff --git a/src/Gtk/Browser/Container/Tab/Page/Title/Label.php b/src/Gtk/Browser/Container/Tab/Page/Title/Label.php index 775697f1..2e01d1e6 100644 --- a/src/Gtk/Browser/Container/Tab/Page/Title/Label.php +++ b/src/Gtk/Browser/Container/Tab/Page/Title/Label.php @@ -6,16 +6,16 @@ namespace Yggverse\Yoda\Gtk\Browser\Container\Tab\Page\Title; class Label extends \GtkLabel { - private string $_subtitle = ''; + private ?string $_subtitle = null; public function set_subtitle( - string $value + ?string $value = null ): void { $this->_subtitle = $value; } - public function get_subtitle(): string + public function get_subtitle(): ?string { return $this->_subtitle; }