1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Add return types to jsonSerialize()

> During inheritance of JsonSerializable: Uncaught
> wcf\system\exception\ErrorException: Return type of
> chat\data\room\Room::jsonSerialize() should either be compatible with
> JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange]
> attribute should be used to temporarily suppress the notice
This commit is contained in:
Tim Düsterhus 2022-10-13 12:59:04 +02:00
parent 7d7bf89dcc
commit 845788583d
Signed by: TimWolla
GPG Key ID: 8FF75566094168AF
5 changed files with 9 additions and 9 deletions

View File

@ -10,7 +10,7 @@ Additional Use Grant: You may use the Licensed Work when your application
uses the Licensed Work for a purpose that does neither uses the Licensed Work for a purpose that does neither
directly or indirectly generate revenue. directly or indirectly generate revenue.
Change Date: 2026-09-19 Change Date: 2026-10-13
Change License: Version 2 or later of the GNU General Public License as Change License: Version 2 or later of the GNU General Public License as
published by the Free Software Foundation. published by the Free Software Foundation.

View File

@ -6,7 +6,7 @@
* Use of this software is governed by the Business Source License * Use of this software is governed by the Business Source License
* included in the LICENSE file. * included in the LICENSE file.
* *
* Change Date: 2026-09-17 * Change Date: 2026-10-13
* *
* On the date above, in accordance with the Business Source * On the date above, in accordance with the Business Source
* License, use of this software will be governed by version 2 * License, use of this software will be governed by version 2
@ -40,7 +40,7 @@ public function __construct(Message $message, Room $room)
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function jsonSerialize() public function jsonSerialize(): array
{ {
$link = LinkHandler::getInstance()->getControllerLink( $link = LinkHandler::getInstance()->getControllerLink(
LogPage::class, LogPage::class,

View File

@ -6,7 +6,7 @@
* Use of this software is governed by the Business Source License * Use of this software is governed by the Business Source License
* included in the LICENSE file. * included in the LICENSE file.
* *
* Change Date: 2026-09-17 * Change Date: 2026-10-13
* *
* On the date above, in accordance with the Business Source * On the date above, in accordance with the Business Source
* License, use of this software will be governed by version 2 * License, use of this software will be governed by version 2
@ -294,7 +294,7 @@ public function getLink(): string
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function jsonSerialize() public function jsonSerialize(): array
{ {
return [ return [
'title' => $this->getTitle(), 'title' => $this->getTitle(),

View File

@ -6,7 +6,7 @@
* Use of this software is governed by the Business Source License * Use of this software is governed by the Business Source License
* included in the LICENSE file. * included in the LICENSE file.
* *
* Change Date: 2026-09-17 * Change Date: 2026-10-13
* *
* On the date above, in accordance with the Business Source * On the date above, in accordance with the Business Source
* License, use of this software will be governed by version 3 * License, use of this software will be governed by version 3
@ -102,7 +102,7 @@ public function getUser(): User
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function jsonSerialize() public function jsonSerialize(): array
{ {
return [ return [
'userID' => $this->userID, 'userID' => $this->userID,

View File

@ -6,7 +6,7 @@
* Use of this software is governed by the Business Source License * Use of this software is governed by the Business Source License
* included in the LICENSE file. * included in the LICENSE file.
* *
* Change Date: 2026-09-17 * Change Date: 2026-10-13
* *
* On the date above, in accordance with the Business Source * On the date above, in accordance with the Business Source
* License, use of this software will be governed by version 2 * License, use of this software will be governed by version 2
@ -110,7 +110,7 @@ public static function getDeadSessions()
/** /**
* @inheritDoc * @inheritDoc
*/ */
public function jsonSerialize() public function jsonSerialize(): array
{ {
return [ return [
'userID' => $this->userID, 'userID' => $this->userID,