diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-10-19 17:11:53 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2021-11-23 09:28:56 +0100 |
commit | 113756db30fcbffe9e90b54c29e78dee0676109f (patch) | |
tree | 8eeaad5ea33957cd2c9ef37dbb05c5e779c48216 /apps | |
parent | 129de6079e53e0ac9dbf9d7c25ec1670ae0ff572 (diff) | |
download | nextcloud-server-113756db30fcbffe9e90b54c29e78dee0676109f.tar.gz nextcloud-server-113756db30fcbffe9e90b54c29e78dee0676109f.zip |
Fix ArrayAccess and JsonSerializable return types
First round of modifications for PHP 8.1
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Auth/AuthMechanism.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Backend/Backend.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/DefinitionParameter.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/StorageConfig.php | 4 | ||||
-rw-r--r-- | apps/theming/lib/Service/JSDataService.php | 2 | ||||
-rw-r--r-- | apps/user_status/lib/Service/JSDataService.php | 2 |
6 files changed, 6 insertions, 14 deletions
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; diff --git a/apps/theming/lib/Service/JSDataService.php b/apps/theming/lib/Service/JSDataService.php index a6e5d6f8e36..1c4d138a764 100644 --- a/apps/theming/lib/Service/JSDataService.php +++ b/apps/theming/lib/Service/JSDataService.php @@ -50,7 +50,7 @@ class JSDataService implements \JsonSerializable { $this->appConfig = $appConfig; } - public function jsonSerialize() { + public function jsonSerialize(): array { return [ 'name' => $this->themingDefaults->getName(), 'url' => $this->themingDefaults->getBaseUrl(), diff --git a/apps/user_status/lib/Service/JSDataService.php b/apps/user_status/lib/Service/JSDataService.php index 6d83591ab2f..c08643ec64f 100644 --- a/apps/user_status/lib/Service/JSDataService.php +++ b/apps/user_status/lib/Service/JSDataService.php @@ -49,7 +49,7 @@ class JSDataService implements \JsonSerializable { $this->statusService = $statusService; } - public function jsonSerialize() { + public function jsonSerialize(): array { $user = $this->userSession->getUser(); if ($user === null) { |