summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-10-19 17:11:53 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-11-23 09:28:56 +0100
commit113756db30fcbffe9e90b54c29e78dee0676109f (patch)
tree8eeaad5ea33957cd2c9ef37dbb05c5e779c48216 /apps/files_external/lib
parent129de6079e53e0ac9dbf9d7c25ec1670ae0ff572 (diff)
downloadnextcloud-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/files_external/lib')
-rw-r--r--apps/files_external/lib/Lib/Auth/AuthMechanism.php4
-rw-r--r--apps/files_external/lib/Lib/Backend/Backend.php4
-rw-r--r--apps/files_external/lib/Lib/DefinitionParameter.php4
-rw-r--r--apps/files_external/lib/Lib/StorageConfig.php4
4 files changed, 4 insertions, 12 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;