From 2599e9adfb1b19ffcafbe991ae967b4d7115a7ed Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 22 Jan 2017 21:08:46 +0100 Subject: [PATCH] Fixing json serialization and reporter --- Models/Department.php | 4 ++-- Models/Position.php | 4 ++-- Models/Unit.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Models/Department.php b/Models/Department.php index 3c8f88c..157be34 100644 --- a/Models/Department.php +++ b/Models/Department.php @@ -104,7 +104,7 @@ class Department */ public function __toString() { - return $this->jsonSerialize(); + return json_encode($this->toArray()); } /** @@ -117,6 +117,6 @@ class Department */ public function jsonSerialize() { - return json_encode($this->toArray()); + return $this->toArray(); } } diff --git a/Models/Position.php b/Models/Position.php index 2b66201..2de467d 100644 --- a/Models/Position.php +++ b/Models/Position.php @@ -93,7 +93,7 @@ class Position implements ArrayableInterface, \JsonSerializable */ public function __toString() { - return $this->jsonSerialize(); + return json_encode($this->toArray()); } /** @@ -106,6 +106,6 @@ class Position implements ArrayableInterface, \JsonSerializable */ public function jsonSerialize() { - return json_encode($this->toArray()); + return $this->toArray(); } } diff --git a/Models/Unit.php b/Models/Unit.php index 4f14a26..2729f44 100644 --- a/Models/Unit.php +++ b/Models/Unit.php @@ -93,7 +93,7 @@ class Unit implements ArrayableInterface, \JsonSerializable */ public function __toString() { - return $this->jsonSerialize(); + return json_encode($this->toArray()); } /** @@ -106,6 +106,6 @@ class Unit implements ArrayableInterface, \JsonSerializable */ public function jsonSerialize() { - return json_encode($this->toArray()); + return $this->toArray(); } }