From 48f30ff96708e22e6fe1dd2e3086c3c34be9cb7d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 16 Dec 2018 11:25:35 +0100 Subject: [PATCH] Implement tests --- Models/Media.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Models/Media.php b/Models/Media.php index f6bb6f6..60c2052 100644 --- a/Models/Media.php +++ b/Models/Media.php @@ -22,7 +22,7 @@ namespace Modules\Media\Models; * @link http://website.orange-management.de * @since 1.0.0 */ -class Media +class Media implements \JsonSerializable { /** @@ -332,6 +332,9 @@ class Media $this->versioned = $versioned; } + /** + * {@inheritdoc} + */ public function toArray() { return [ @@ -342,4 +345,12 @@ class Media 'size' => $this->size, ]; } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() + { + return $this->toArray(); + } }