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/Service/Service.php | |
parent | f3c9d13551cef5968baea99c2f25085baee0ed5f (diff) |
Core: Fix compatibility with nextcloud codestyle (#280)
Diffstat (limited to 'lib/Service/Service.php')
-rw-r--r-- | lib/Service/Service.php | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/Service/Service.php b/lib/Service/Service.php index e8fd4c72c..28cfeeb76 100644 --- a/lib/Service/Service.php +++ b/lib/Service/Service.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\Service; @@ -19,23 +19,27 @@ use \OCP\AppFramework\Db\MultipleObjectsReturnedException; use \OCA\News\Db\NewsMapper; -abstract class Service { +abstract class Service +{ protected $mapper; - public function __construct(NewsMapper $mapper){ + public function __construct(NewsMapper $mapper) + { $this->mapper = $mapper; } /** * Delete an entity - * @param int $id the id of the entity - * @param string $userId the name of the user for security reasons + * + * @param int $id the id of the entity + * @param string $userId the name of the user for security reasons * @throws ServiceNotFoundException if the entity does not exist, or there * are more than one of it */ - public function delete($id, $userId){ + public function delete($id, $userId) + { $entity = $this->find($id, $userId); $this->mapper->delete($entity); } @@ -43,13 +47,15 @@ abstract class Service { /** * Finds an entity by id - * @param int $id the id of the entity - * @param string $userId the name of the user for security reasons + * + * @param int $id the id of the entity + * @param string $userId the name of the user for security reasons * @throws ServiceNotFoundException if the entity does not exist, or there * are more than one of it * @return \OCP\AppFramework\Db\Entity the entity */ - public function find($id, $userId){ + public function find($id, $userId) + { try { return $this->mapper->find($id, $userId); } catch(DoesNotExistException $ex){ |