From 4cd39eadffced18d1b07ea743858f2ebe9759e39 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 22 Aug 2025 02:49:50 +0200 Subject: [PATCH] Continued: - added missing method isStateInstanceSet() --- framework/main/traits/state/class_StateableTrait.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/framework/main/traits/state/class_StateableTrait.php b/framework/main/traits/state/class_StateableTrait.php index 4f8bf4c8..2214a6a8 100644 --- a/framework/main/traits/state/class_StateableTrait.php +++ b/framework/main/traits/state/class_StateableTrait.php @@ -52,4 +52,13 @@ trait StateableTrait { return $this->stateInstance; } + /** + * Checks whether a state instance is set + * + * @return $isset Whether a state instance is set + */ + public final function isStateInstanceSet (): bool { + return ($this->stateInstance instanceof Stateable); + } + } -- 2.39.5