From 5e0022d858b9c602408f1e41527e35af62ea52af Mon Sep 17 00:00:00 2001 From: Michal Jan Warecki Date: Fri, 25 Oct 2024 10:20:21 +0200 Subject: [PATCH] Add return type to silence PHP warning. Explicitly state methods' return type. Missing type annotations causes PHP to show a notice. --- src/Model/Properties.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Properties.php b/src/Model/Properties.php index f6532ea..9990886 100644 --- a/src/Model/Properties.php +++ b/src/Model/Properties.php @@ -34,7 +34,7 @@ public function offsetUnset($offset): void unset($this->data[$offset]); } - public function offsetGet($offset) + public function offsetGet($offset): mixed { return $this->data[$offset] ?? null; } @@ -96,7 +96,7 @@ public function __unset($key) * Traversable * @since 5.0.0 */ - public function getIterator() + public function getIterator(): \Traversable { return new \ArrayIterator($this->data); }