aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Accounts
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 /lib/private/Accounts
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 'lib/private/Accounts')
-rw-r--r--lib/private/Accounts/Account.php3
-rw-r--r--lib/private/Accounts/AccountProperty.php2
-rw-r--r--lib/private/Accounts/AccountPropertyCollection.php2
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/Accounts/Account.php b/lib/private/Accounts/Account.php
index 1e4189f2b35..540d15cd4b9 100644
--- a/lib/private/Accounts/Account.php
+++ b/lib/private/Accounts/Account.php
@@ -104,7 +104,8 @@ class Account implements IAccount {
return $result;
}
- public function jsonSerialize() {
+ /** @return IAccountPropertyCollection[]|IAccountProperty[] */
+ public function jsonSerialize(): array {
return $this->properties;
}
diff --git a/lib/private/Accounts/AccountProperty.php b/lib/private/Accounts/AccountProperty.php
index 0e6356e9e92..4b7f2b0c04c 100644
--- a/lib/private/Accounts/AccountProperty.php
+++ b/lib/private/Accounts/AccountProperty.php
@@ -54,7 +54,7 @@ class AccountProperty implements IAccountProperty {
$this->verificationData = $verificationData;
}
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'name' => $this->getName(),
'value' => $this->getValue(),
diff --git a/lib/private/Accounts/AccountPropertyCollection.php b/lib/private/Accounts/AccountPropertyCollection.php
index 3aed76d8746..091c5734218 100644
--- a/lib/private/Accounts/AccountPropertyCollection.php
+++ b/lib/private/Accounts/AccountPropertyCollection.php
@@ -102,7 +102,7 @@ class AccountPropertyCollection implements IAccountPropertyCollection {
return $this;
}
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [$this->collectionName => $this->properties];
}