From 5b94705cf3918dc7986c6043b1fbe776bf22958f Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Tue, 27 Mar 2018 15:35:06 +0200 Subject: Core: Fix compatibility with nextcloud codestyle (#280) --- lib/Controller/EntityApiSerializer.php | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'lib/Controller/EntityApiSerializer.php') diff --git a/lib/Controller/EntityApiSerializer.php b/lib/Controller/EntityApiSerializer.php index af126045e..f624eb84c 100644 --- a/lib/Controller/EntityApiSerializer.php +++ b/lib/Controller/EntityApiSerializer.php @@ -5,8 +5,8 @@ * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * - * @author Bernhard Posselt - * @copyright Bernhard Posselt 2014 + * @author Bernhard Posselt + * @copyright 2012-2014 Bernhard Posselt */ namespace OCA\News\Controller; @@ -14,11 +14,13 @@ namespace OCA\News\Controller; use \OCA\News\Db\IAPI; -class EntityApiSerializer { +class EntityApiSerializer +{ private $level; - public function __construct($level) { + public function __construct($level) + { $this->level = $level; } @@ -26,14 +28,15 @@ class EntityApiSerializer { /** * Call toAPI() method on all entities. Works on * - * @param mixed $data : - * * Entity - * * Entity[] - * * array('level' => Entity[]) - * * Response + * @param mixed $data : + * * Entity + * * Entity[] + * * array('level' => Entity[]) + * * Response * @return array|mixed */ - public function serialize($data) { + public function serialize($data) + { if($data instanceof IAPI) { return [$this->level => [$data->toAPI()]]; @@ -49,14 +52,15 @@ class EntityApiSerializer { } - private function convert($entities) { + private function convert($entities) + { $converted = []; foreach($entities as $entity) { if($entity instanceof IAPI) { $converted[] = $entity->toAPI(); - // break if it contains anything else than entities + // break if it contains anything else than entities } else { return $entities; } -- cgit v1.2.3