diff --git a/lib/Controller/NoteApiController.php b/lib/Controller/NoteApiController.php index 5e3eec3..a12544e 100644 --- a/lib/Controller/NoteApiController.php +++ b/lib/Controller/NoteApiController.php @@ -92,7 +92,9 @@ class NoteApiController extends ApiController { /** * @NoAdminRequired + * * @CORS + * * @NoCSRFRequired * * @param string $title @@ -102,6 +104,8 @@ class NoteApiController extends ApiController { * @param array $sharedWith * @param array $tags * @param array $attachments + * + * @return JSONResponse */ public function create(string $title, string $content, @@ -109,7 +113,7 @@ class NoteApiController extends ApiController { bool $isPinned = false, array $sharedWith = [], array $tags = [], - array $attachments = []) + array $attachments = []): JSONResponse { $note = $this->noteService->create($this->userId, $title, diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index 88dbfdc..ecacd27 100644 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -96,6 +96,8 @@ class NoteController extends Controller { * @param array $sharedWith * @param array $tags * @param array $attachments + * + * @return JSONResponse */ public function create(string $title, string $content, @@ -103,7 +105,7 @@ class NoteController extends Controller { bool $isPinned = false, array $sharedWith = [], array $tags = [], - array $attachments = []) + array $attachments = []): JSONResponse { $note = $this->noteService->create($this->userId, $title, diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 2c3c2d8..65feab5 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -44,10 +44,14 @@ class PageController extends Controller { * basically the only required method to add this exemption, don't * add it to any other method if you don't exactly know what it does * + * * @NoAdminRequired + * * @NoCSRFRequired + * + * @return TemplateResponse */ - public function index() { + public function index(): TemplateResponse { return new TemplateResponse($this->appName, 'main'); }