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(); } }