aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/FullTextSearch
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/FullTextSearch
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/FullTextSearch')
-rw-r--r--lib/private/FullTextSearch/Model/IndexDocument.php4
-rw-r--r--lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php3
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php
index a1648ab6e2a..3078f12c465 100644
--- a/lib/private/FullTextSearch/Model/IndexDocument.php
+++ b/lib/private/FullTextSearch/Model/IndexDocument.php
@@ -963,10 +963,8 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
/**
* @since 15.0.0
- *
- * @return array
*/
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'id' => $this->getId(),
'providerId' => $this->getProviderId(),
diff --git a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php
index 9c9ac71efa9..d6bfe6d9102 100644
--- a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php
+++ b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php
@@ -168,10 +168,9 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS
/**
- * @return array|mixed
* @since 17.0.0
*/
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'type' => $this->getType(),
'field' => $this->getField(),