From 113756db30fcbffe9e90b54c29e78dee0676109f Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 19 Oct 2021 17:11:53 +0200 Subject: Fix ArrayAccess and JsonSerializable return types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet --- apps/files_external/lib/Lib/Auth/AuthMechanism.php | 4 +--- apps/files_external/lib/Lib/Backend/Backend.php | 4 +--- apps/files_external/lib/Lib/DefinitionParameter.php | 4 +--- apps/files_external/lib/Lib/StorageConfig.php | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) (limited to 'apps/files_external/lib') diff --git a/apps/files_external/lib/Lib/Auth/AuthMechanism.php b/apps/files_external/lib/Lib/Auth/AuthMechanism.php index f676957794d..210dd705723 100644 --- a/apps/files_external/lib/Lib/Auth/AuthMechanism.php +++ b/apps/files_external/lib/Lib/Auth/AuthMechanism.php @@ -90,10 +90,8 @@ class AuthMechanism implements \JsonSerializable { /** * Serialize into JSON for client-side JS - * - * @return array */ - public function jsonSerialize() { + public function jsonSerialize(): array { $data = $this->jsonSerializeDefinition(); $data += $this->jsonSerializeIdentifier(); diff --git a/apps/files_external/lib/Lib/Backend/Backend.php b/apps/files_external/lib/Lib/Backend/Backend.php index a6e63eb30d1..021d208aed3 100644 --- a/apps/files_external/lib/Lib/Backend/Backend.php +++ b/apps/files_external/lib/Lib/Backend/Backend.php @@ -137,10 +137,8 @@ class Backend implements \JsonSerializable { /** * Serialize into JSON for client-side JS - * - * @return array */ - public function jsonSerialize() { + public function jsonSerialize(): array { $data = $this->jsonSerializeDefinition(); $data += $this->jsonSerializeIdentifier(); diff --git a/apps/files_external/lib/Lib/DefinitionParameter.php b/apps/files_external/lib/Lib/DefinitionParameter.php index fbfbbfd4686..6b081d5a089 100644 --- a/apps/files_external/lib/Lib/DefinitionParameter.php +++ b/apps/files_external/lib/Lib/DefinitionParameter.php @@ -167,10 +167,8 @@ class DefinitionParameter implements \JsonSerializable { /** * Serialize into JSON for client-side JS - * - * @return string */ - public function jsonSerialize() { + public function jsonSerialize(): array { return [ 'value' => $this->getText(), 'flags' => $this->getFlags(), diff --git a/apps/files_external/lib/Lib/StorageConfig.php b/apps/files_external/lib/Lib/StorageConfig.php index 97b72005018..26ba483b00e 100644 --- a/apps/files_external/lib/Lib/StorageConfig.php +++ b/apps/files_external/lib/Lib/StorageConfig.php @@ -396,10 +396,8 @@ class StorageConfig implements \JsonSerializable { /** * Serialize config to JSON - * - * @return array */ - public function jsonSerialize() { + public function jsonSerialize(): array { $result = []; if (!is_null($this->id)) { $result['id'] = $this->id; -- cgit v1.2.3