From 06367d8b81407fc2948e0f666b38f4de2dffbd89 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 25 Jun 2014 11:22:08 +0200 Subject: style fixes --- controller/itemcontroller.php | 75 ++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 33 deletions(-) (limited to 'controller/itemcontroller.php') diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php index 30677d9fc..bbfcaeb56 100644 --- a/controller/itemcontroller.php +++ b/controller/itemcontroller.php @@ -46,14 +46,15 @@ class ItemController extends Controller { } - /** - * @NoAdminRequired - * - * @param int $type - * @param int $id - * @param int $limit - * @param int $offset - */ + /** + * @NoAdminRequired + * + * @param int $type + * @param int $id + * @param int $limit + * @param int $offset + * @return array + */ public function index($type, $id, $limit=50, $offset=0) { $showAll = $this->settings->getUserValue($this->userId, $this->appName, 'showAll') === '1'; @@ -92,13 +93,14 @@ class ItemController extends Controller { } - /** - * @NoAdminRequired - * - * @param int $type - * @param int $id - * @param int $lastModified - */ + /** + * @NoAdminRequired + * + * @param int $type + * @param int $id + * @param int $lastModified + * @return array + */ public function newItems($type, $id, $lastModified=0) { $showAll = $this->settings->getUserValue($this->userId, $this->appName, 'showAll') === '1'; @@ -120,13 +122,14 @@ class ItemController extends Controller { } - /** - * @NoAdminRequired - * - * @param int $feedId - * @param string $guidHash - * @param bool $isStarred - */ + /** + * @NoAdminRequired + * + * @param int $feedId + * @param string $guidHash + * @param bool $isStarred + * @return array|\OCP\AppFramework\Http\JSONResponse + */ public function star($feedId, $guidHash, $isStarred){ try { $this->itemService->star($feedId, $guidHash, $isStarred, @@ -134,29 +137,35 @@ class ItemController extends Controller { } catch(ServiceException $ex) { return $this->error($ex, Http::STATUS_NOT_FOUND); } + + return []; } - /** - * @NoAdminRequired - * - * @param int $itemId - * @param bool $isRead - */ + /** + * @NoAdminRequired + * + * @param int $itemId + * @param bool $isRead + * @return array|\OCP\AppFramework\Http\JSONResponse + */ public function read($itemId, $isRead=true){ try { $this->itemService->read($itemId, $isRead, $this->userId); } catch(ServiceException $ex) { return $this->error($ex, Http::STATUS_NOT_FOUND); } + + return []; } - /** - * @NoAdminRequired - * - * @param int $highestItemId - */ + /** + * @NoAdminRequired + * + * @param int $highestItemId + * @return array + */ public function readAll($highestItemId){ $this->itemService->readAll($highestItemId, $this->userId); return ['feeds' => $this->feedService->findAll($this->userId)]; -- cgit v1.2.3