Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-03-14 22:21:05 +0300
committerJulius Härtl <jus@bitgrid.net>2022-03-15 17:39:30 +0300
commitd259209baea9706e5af7b30a6ae6ed4daab953f0 (patch)
tree5ae0862e948bfbff7d2c55592f95ca6a3e483d19 /lib
parentb8cf72b19362309afc43e5b6be8a07993a72ec1d (diff)
Let jsonSerialize have a proper return type
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Db/Document.php2
-rw-r--r--lib/Db/Session.php2
-rw-r--r--lib/Db/Step.php5
3 files changed, 3 insertions, 6 deletions
diff --git a/lib/Db/Document.php b/lib/Db/Document.php
index ae3dd43ad..65c8e1986 100644
--- a/lib/Db/Document.php
+++ b/lib/Db/Document.php
@@ -42,7 +42,7 @@ class Document extends Entity implements \JsonSerializable {
$this->addType('initialVersion', 'integer');
}
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'id' => $this->id,
'currentVersion' => $this->currentVersion,
diff --git a/lib/Db/Session.php b/lib/Db/Session.php
index 3dc775ed7..34d518aed 100644
--- a/lib/Db/Session.php
+++ b/lib/Db/Session.php
@@ -47,7 +47,7 @@ class Session extends Entity implements \JsonSerializable {
$this->addType('lastContact', 'integer');
}
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'id' => $this->id,
'userId' => $this->userId,
diff --git a/lib/Db/Step.php b/lib/Db/Step.php
index efc1676fb..fec0537bd 100644
--- a/lib/Db/Step.php
+++ b/lib/Db/Step.php
@@ -39,10 +39,7 @@ class Step extends Entity implements \JsonSerializable {
$this->addType('sessionId', 'integer');
}
- /**
- * @return array|mixed
- */
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
$jsonData = \json_decode($this->data, false);
if (\json_last_error() !== JSON_ERROR_NONE) {
throw new \InvalidArgumentException('Failed to parse step data');