diff options
author | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2018-03-27 15:35:06 +0200 |
---|---|---|
committer | Bernhard Posselt <BernhardPosselt@users.noreply.github.com> | 2018-03-27 15:35:06 +0200 |
commit | 5b94705cf3918dc7986c6043b1fbe776bf22958f (patch) | |
tree | 4e8059818a0a913d24938e35238913a721fa6373 /lib/Db/Folder.php | |
parent | f3c9d13551cef5968baea99c2f25085baee0ed5f (diff) |
Core: Fix compatibility with nextcloud codestyle (#280)
Diffstat (limited to 'lib/Db/Folder.php')
-rw-r--r-- | lib/Db/Folder.php | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/lib/Db/Folder.php b/lib/Db/Folder.php index 096e14323..4a6ec8ba1 100644 --- a/lib/Db/Folder.php +++ b/lib/Db/Folder.php @@ -5,10 +5,10 @@ * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * - * @author Alessandro Cosentino <cosenal@gmail.com> - * @author Bernhard Posselt <dev@bernhard-posselt.com> - * @copyright Alessandro Cosentino 2012 - * @copyright Bernhard Posselt 2012, 2014 + * @author Alessandro Cosentino <cosenal@gmail.com> + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright 2012 Alessandro Cosentino + * @copyright 2012-2014 Bernhard Posselt */ namespace OCA\News\Db; @@ -30,9 +30,9 @@ use \OCP\AppFramework\Db\Entity; * @method void setDeletedAt(integer $value) * @method string getLastModified() * @method void setLastModified(string $value) - */ -class Folder extends Entity implements IAPI, \JsonSerializable { +class Folder extends Entity implements IAPI, \JsonSerializable +{ use EntityJSONSerializer; @@ -43,7 +43,8 @@ class Folder extends Entity implements IAPI, \JsonSerializable { protected $deletedAt; protected $lastModified; - public function __construct(){ + public function __construct() + { $this->addType('parentId', 'integer'); $this->addType('opened', 'boolean'); $this->addType('deletedAt', 'integer'); @@ -52,21 +53,27 @@ class Folder extends Entity implements IAPI, \JsonSerializable { /** * Turns entitie attributes into an array */ - public function jsonSerialize() { - return $this->serializeFields([ + public function jsonSerialize() + { + return $this->serializeFields( + [ 'id', 'parentId', 'name', 'userId', 'opened', 'deletedAt', - ]); + ] + ); } - public function toAPI() { - return $this->serializeFields([ + public function toAPI() + { + return $this->serializeFields( + [ 'id', 'name' - ]); + ] + ); } }
\ No newline at end of file |