diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-06-25 11:22:08 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-06-25 11:22:08 +0200 |
commit | 06367d8b81407fc2948e0f666b38f4de2dffbd89 (patch) | |
tree | d5cfb74e70560f3abce5aeccf8994dcbe2829e24 /controller/itemcontroller.php | |
parent | 60c4dfbd9661b93bce14a6a429a3f23d19b5327c (diff) |
style fixes
Diffstat (limited to 'controller/itemcontroller.php')
-rw-r--r-- | controller/itemcontroller.php | 75 |
1 files changed, 42 insertions, 33 deletions
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)]; |