-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow more specific object keys
Signed-off-by: Joas Schilling <[email protected]>
- Loading branch information
1 parent
b8b55cc
commit ce0c021
Showing
5 changed files
with
684 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OCA\Notifications\Controller; | ||
|
||
use OCP\AppFramework\Http; | ||
use OCP\AppFramework\Http\DataResponse; | ||
use OCP\AppFramework\OCSController; | ||
|
||
class ReturnArraysController extends OCSController { | ||
/** | ||
* Route with array using string keys | ||
* | ||
* @return DataResponse<Http::STATUS_OK, array<string, mixed>, array{}> | ||
* | ||
* 200: OK | ||
*/ | ||
public function stringArray(): DataResponse { | ||
return new DataResponse(); | ||
} | ||
|
||
/** | ||
* Route with array using non-empty-string keys | ||
* | ||
* @return DataResponse<Http::STATUS_OK, array<non-empty-string, mixed>, array{}> | ||
* | ||
* 200: OK | ||
*/ | ||
public function nonEmptyStringArray(): DataResponse { | ||
return new DataResponse(); | ||
} | ||
|
||
/** | ||
* Route with array using lowercase-string keys | ||
* | ||
* @return DataResponse<Http::STATUS_OK, array<lowercase-string, mixed>, array{}> | ||
* | ||
* 200: OK | ||
*/ | ||
public function lowercaseStringArray(): DataResponse { | ||
return new DataResponse(); | ||
} | ||
|
||
/** | ||
* Route with array using non-empty-lowercase-string keys | ||
* | ||
* @return DataResponse<Http::STATUS_OK, array<non-empty-lowercase-string, mixed>, array{}> | ||
* | ||
* 200: OK | ||
*/ | ||
public function nonEmptyLowercaseStringArray(): DataResponse { | ||
return new DataResponse(); | ||
} | ||
} |
Oops, something went wrong.