summaryrefslogtreecommitdiffstats
path: root/core/Controller/ContactsMenuController.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-07-19 16:30:17 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-08-01 08:20:15 +0200
commite945f2bc3a7450168a4b95fd9236459b78b5a946 (patch)
treee65f0617906f39b4163891080ec4b5479fafb6dc /core/Controller/ContactsMenuController.php
parentaa6d8fcdbfb694eaa37d9afc80191a05ba6c6850 (diff)
downloadnextcloud-server-e945f2bc3a7450168a4b95fd9236459b78b5a946.tar.gz
nextcloud-server-e945f2bc3a7450168a4b95fd9236459b78b5a946.zip
Fix ContactsMenuController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/Controller/ContactsMenuController.php')
-rw-r--r--core/Controller/ContactsMenuController.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/Controller/ContactsMenuController.php b/core/Controller/ContactsMenuController.php
index bbb990f1a4f..76eaf11085d 100644
--- a/core/Controller/ContactsMenuController.php
+++ b/core/Controller/ContactsMenuController.php
@@ -54,7 +54,7 @@ class ContactsMenuController extends Controller {
* @NoAdminRequired
*
* @param string|null filter
- * @return JSONResponse
+ * @return \JsonSerializable[]
*/
public function index($filter = null) {
return $this->manager->getEntries($this->userSession->getUser(), $filter);
@@ -65,15 +65,14 @@ class ContactsMenuController extends Controller {
*
* @param integer $shareType
* @param string $shareWith
- * @return JSONResponse
+ * @return JSONResponse|\JsonSerializable
*/
public function findOne($shareType, $shareWith) {
$contact = $this->manager->findOne($this->userSession->getUser(), $shareType, $shareWith);
if ($contact) {
return $contact;
- } else {
- return new JSONResponse([], Http::STATUS_NOT_FOUND);
}
+ return new JSONResponse([], Http::STATUS_NOT_FOUND);
}
}