summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}
}