From c111bd06d452332b058006618d4d2a36201273f5 Mon Sep 17 00:00:00 2001 From: Matthew Byrne Date: Tue, 19 Sep 2023 14:31:46 +0100 Subject: [PATCH] fixes #48 --- Examples/example-1-your-first-request.php | 2 +- src/PrintNode/Entity.php | 6 +++--- src/PrintNode/EntityDynamic.php | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Examples/example-1-your-first-request.php b/Examples/example-1-your-first-request.php index 04e79eb..278e67a 100644 --- a/Examples/example-1-your-first-request.php +++ b/Examples/example-1-your-first-request.php @@ -96,4 +96,4 @@ * */ -echo $whoAmI->firstname . ' ' . $whoAmI->lastname; \ No newline at end of file +echo $whoAmI->firstname . ' ' . $whoAmI->lastname; diff --git a/src/PrintNode/Entity.php b/src/PrintNode/Entity.php index 8782bea..f368b0e 100755 --- a/src/PrintNode/Entity.php +++ b/src/PrintNode/Entity.php @@ -102,9 +102,9 @@ public function mapValuesFromJson($json) * * @return string */ - public function jsonSerialize(): mixed + #[\ReturnTypeWillChange] + public function jsonSerialize() { - $json = array(); foreach (static::$responseMap as $responseKey => $responseMapType) { @@ -132,4 +132,4 @@ public function __toString() { } -} \ No newline at end of file +} diff --git a/src/PrintNode/EntityDynamic.php b/src/PrintNode/EntityDynamic.php index 7820c0d..de83486 100644 --- a/src/PrintNode/EntityDynamic.php +++ b/src/PrintNode/EntityDynamic.php @@ -52,7 +52,8 @@ public function mapValuesFromJson($json) * * @return string */ - public function jsonSerialize(): mixed + #[\ReturnTypeWillChange] + public function jsonSerialize() { $refClass = new \ReflectionClass($this); @@ -75,4 +76,4 @@ public function jsonSerialize(): mixed } -} \ No newline at end of file +}