Add typing to jsonSerialize

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2022-02-24 16:43:37 +01:00
parent 9fa12f44ea
commit 46f2d448ab
8 changed files with 15 additions and 21 deletions

View File

@@ -69,15 +69,7 @@ class ChangeSet implements \JsonSerializable {
return $this->after;
}
/**
* Specify data which should be serialized to JSON
*
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
* @since 5.4.0
*/
public function jsonSerialize() {
public function jsonSerialize(): array {
return [
'before' => $this->getBefore(),
'after' => $this->getAfter(),