mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Add missing return types to controllers
This commit is contained in:
@@ -92,7 +92,9 @@ class NoteApiController extends ApiController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
*
|
||||||
* @CORS
|
* @CORS
|
||||||
|
*
|
||||||
* @NoCSRFRequired
|
* @NoCSRFRequired
|
||||||
*
|
*
|
||||||
* @param string $title
|
* @param string $title
|
||||||
@@ -102,6 +104,8 @@ class NoteApiController extends ApiController {
|
|||||||
* @param array $sharedWith
|
* @param array $sharedWith
|
||||||
* @param array $tags
|
* @param array $tags
|
||||||
* @param array $attachments
|
* @param array $attachments
|
||||||
|
*
|
||||||
|
* @return JSONResponse
|
||||||
*/
|
*/
|
||||||
public function create(string $title,
|
public function create(string $title,
|
||||||
string $content,
|
string $content,
|
||||||
@@ -109,7 +113,7 @@ class NoteApiController extends ApiController {
|
|||||||
bool $isPinned = false,
|
bool $isPinned = false,
|
||||||
array $sharedWith = [],
|
array $sharedWith = [],
|
||||||
array $tags = [],
|
array $tags = [],
|
||||||
array $attachments = [])
|
array $attachments = []): JSONResponse
|
||||||
{
|
{
|
||||||
$note = $this->noteService->create($this->userId,
|
$note = $this->noteService->create($this->userId,
|
||||||
$title,
|
$title,
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ class NoteController extends Controller {
|
|||||||
* @param array $sharedWith
|
* @param array $sharedWith
|
||||||
* @param array $tags
|
* @param array $tags
|
||||||
* @param array $attachments
|
* @param array $attachments
|
||||||
|
*
|
||||||
|
* @return JSONResponse
|
||||||
*/
|
*/
|
||||||
public function create(string $title,
|
public function create(string $title,
|
||||||
string $content,
|
string $content,
|
||||||
@@ -103,7 +105,7 @@ class NoteController extends Controller {
|
|||||||
bool $isPinned = false,
|
bool $isPinned = false,
|
||||||
array $sharedWith = [],
|
array $sharedWith = [],
|
||||||
array $tags = [],
|
array $tags = [],
|
||||||
array $attachments = [])
|
array $attachments = []): JSONResponse
|
||||||
{
|
{
|
||||||
$note = $this->noteService->create($this->userId,
|
$note = $this->noteService->create($this->userId,
|
||||||
$title,
|
$title,
|
||||||
|
|||||||
@@ -44,10 +44,14 @@ class PageController extends Controller {
|
|||||||
* basically the only required method to add this exemption, don't
|
* 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
|
* add it to any other method if you don't exactly know what it does
|
||||||
*
|
*
|
||||||
|
*
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
*
|
||||||
* @NoCSRFRequired
|
* @NoCSRFRequired
|
||||||
|
*
|
||||||
|
* @return TemplateResponse
|
||||||
*/
|
*/
|
||||||
public function index() {
|
public function index(): TemplateResponse {
|
||||||
return new TemplateResponse($this->appName, 'main');
|
return new TemplateResponse($this->appName, 'main');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user