From b1faa50caa904d5522bcef534946840b3310877d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 22 Mar 2022 17:34:58 +0100 Subject: [PATCH] fixed php 8.1 type bugs --- Account/Account.php | 2 +- Account/Group.php | 2 +- Account/PermissionAbstract.php | 2 +- Localization/Localization.php | 2 +- Message/ResponseAbstract.php | 2 +- Model/Message/Dom.php | 2 +- Model/Message/FormValidation.php | 2 +- Model/Message/Notify.php | 2 +- Model/Message/Redirect.php | 2 +- Model/Message/Reload.php | 2 +- Stdlib/Base/Location.php | 2 +- System/File/Ftp/Directory.php | 2 +- System/File/Local/Directory.php | 2 +- .../DataStorage/Cache/Connection/FileCacheJsonSerializable.php | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Account/Account.php b/Account/Account.php index 9c1cdb35d..50d38f4fe 100644 --- a/Account/Account.php +++ b/Account/Account.php @@ -424,7 +424,7 @@ class Account implements \JsonSerializable, ArrayableInterface /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/Account/Group.php b/Account/Group.php index 80ceee21a..fec196fd0 100644 --- a/Account/Group.php +++ b/Account/Group.php @@ -158,7 +158,7 @@ class Group implements \JsonSerializable, ArrayableInterface /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/Account/PermissionAbstract.php b/Account/PermissionAbstract.php index 4ef9cae99..6c9b28d6d 100755 --- a/Account/PermissionAbstract.php +++ b/Account/PermissionAbstract.php @@ -520,7 +520,7 @@ class PermissionAbstract implements \JsonSerializable /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return [ 'id' => $this->id, diff --git a/Localization/Localization.php b/Localization/Localization.php index 34af2db98..aa4b8a047 100644 --- a/Localization/Localization.php +++ b/Localization/Localization.php @@ -790,7 +790,7 @@ class Localization implements \JsonSerializable /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/Message/ResponseAbstract.php b/Message/ResponseAbstract.php index 464359a90..c1c4d3aa9 100755 --- a/Message/ResponseAbstract.php +++ b/Message/ResponseAbstract.php @@ -77,7 +77,7 @@ abstract class ResponseAbstract implements \JsonSerializable, MessageInterface /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/Model/Message/Dom.php b/Model/Message/Dom.php index 577ef5bed..e4cc95003 100644 --- a/Model/Message/Dom.php +++ b/Model/Message/Dom.php @@ -137,7 +137,7 @@ final class Dom implements \Serializable, ArrayableInterface /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/Model/Message/FormValidation.php b/Model/Message/FormValidation.php index c05010355..ea9e96732 100644 --- a/Model/Message/FormValidation.php +++ b/Model/Message/FormValidation.php @@ -69,7 +69,7 @@ final class FormValidation implements \JsonSerializable, \Serializable, Arrayabl /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/Model/Message/Notify.php b/Model/Message/Notify.php index d330992d5..74dc6b062 100644 --- a/Model/Message/Notify.php +++ b/Model/Message/Notify.php @@ -173,7 +173,7 @@ final class Notify implements \JsonSerializable, \Serializable, ArrayableInterfa /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/Model/Message/Redirect.php b/Model/Message/Redirect.php index ed8cbbb8b..70d4478a4 100644 --- a/Model/Message/Redirect.php +++ b/Model/Message/Redirect.php @@ -115,7 +115,7 @@ final class Redirect implements \JsonSerializable, \Serializable, ArrayableInter /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/Model/Message/Reload.php b/Model/Message/Reload.php index 4872437d2..abbcc461c 100644 --- a/Model/Message/Reload.php +++ b/Model/Message/Reload.php @@ -120,7 +120,7 @@ final class Reload implements \JsonSerializable, \Serializable, ArrayableInterfa /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/Stdlib/Base/Location.php b/Stdlib/Base/Location.php index 5534d2ce2..868ce7d58 100644 --- a/Stdlib/Base/Location.php +++ b/Stdlib/Base/Location.php @@ -191,7 +191,7 @@ class Location implements \JsonSerializable, \Serializable /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return $this->toArray(); } diff --git a/System/File/Ftp/Directory.php b/System/File/Ftp/Directory.php index a43c3e7e7..6a40c3d70 100644 --- a/System/File/Ftp/Directory.php +++ b/System/File/Ftp/Directory.php @@ -728,7 +728,7 @@ class Directory extends FileAbstract implements DirectoryInterface /** * {@inheritdoc} */ - public function offsetExists($offset) + public function offsetExists($offset) : bool { $offset = isset($this->nodes[$offset]) ? $offset : $this->path . '/' . $offset; diff --git a/System/File/Local/Directory.php b/System/File/Local/Directory.php index 5603217b2..756c7eb91 100644 --- a/System/File/Local/Directory.php +++ b/System/File/Local/Directory.php @@ -551,7 +551,7 @@ final class Directory extends FileAbstract implements DirectoryInterface /** * {@inheritdoc} */ - public function offsetExists($offset) + public function offsetExists($offset) : bool { $offset = isset($this->nodes[$offset]) ? $offset : $this->path . '/' . $offset; diff --git a/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php b/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php index 16a085be5..b658495de 100644 --- a/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php +++ b/tests/DataStorage/Cache/Connection/FileCacheJsonSerializable.php @@ -21,7 +21,7 @@ class FileCacheJsonSerializable implements \JsonSerializable /** * {@inheritdoc} */ - public function jsonSerialize() + public function jsonSerialize() : mixed { return 'abc'; }