diff options
author | provokateurin <kate@provokateurin.de> | 2024-09-24 15:53:13 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-11-05 09:58:11 +0100 |
commit | 77114fb3277742fc69ddcf2432311ecb263af97e (patch) | |
tree | 0f360660038c65acc5f9cd014f183e45b0c5355b /apps/user_status/lib/Controller/PredefinedStatusController.php | |
parent | 1140e41db2ef6241f806eb605df48642a2a32c62 (diff) | |
download | nextcloud-server-fix/openapi/array-syntax.tar.gz nextcloud-server-fix/openapi/array-syntax.zip |
fix(OpenAPI): Adjust array syntax to avoid ambiguitiesfix/openapi/array-syntax
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/user_status/lib/Controller/PredefinedStatusController.php')
-rw-r--r-- | apps/user_status/lib/Controller/PredefinedStatusController.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/user_status/lib/Controller/PredefinedStatusController.php b/apps/user_status/lib/Controller/PredefinedStatusController.php index 14300360880..70262d1108a 100644 --- a/apps/user_status/lib/Controller/PredefinedStatusController.php +++ b/apps/user_status/lib/Controller/PredefinedStatusController.php @@ -42,7 +42,7 @@ class PredefinedStatusController extends OCSController { /** * Get all predefined messages * - * @return DataResponse<Http::STATUS_OK, UserStatusPredefined[], array{}> + * @return DataResponse<Http::STATUS_OK, list<UserStatusPredefined>, array{}> * * 200: Predefined statuses returned */ @@ -50,8 +50,8 @@ class PredefinedStatusController extends OCSController { #[ApiRoute(verb: 'GET', url: '/api/v1/predefined_statuses/')] public function findAll():DataResponse { // Filtering out the invisible one, that should only be set by API - return new DataResponse(array_filter($this->predefinedStatusService->getDefaultStatuses(), function (array $status) { + return new DataResponse(array_values(array_filter($this->predefinedStatusService->getDefaultStatuses(), function (array $status) { return !array_key_exists('visible', $status) || $status['visible'] === true; - })); + }))); } } |