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 /core/Controller/ReferenceApiController.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 'core/Controller/ReferenceApiController.php')
-rw-r--r-- | core/Controller/ReferenceApiController.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/Controller/ReferenceApiController.php b/core/Controller/ReferenceApiController.php index cba91b976e2..0d34e6244f5 100644 --- a/core/Controller/ReferenceApiController.php +++ b/core/Controller/ReferenceApiController.php @@ -141,7 +141,7 @@ class ReferenceApiController extends \OCP\AppFramework\OCSController { /** * Resolve multiple references * - * @param string[] $references References to resolve + * @param list<string> $references References to resolve * @param int $limit Maximum amount of references to resolve * @return DataResponse<Http::STATUS_OK, array{references: array<string, CoreReference|null>}, array{}> * @@ -168,7 +168,7 @@ class ReferenceApiController extends \OCP\AppFramework\OCSController { /** * Resolve multiple references from a public page * - * @param string[] $references References to resolve + * @param list<string> $references References to resolve * @param string $sharingToken Token of the public share * @param int $limit Maximum amount of references to resolve, limited to 15 * @return DataResponse<Http::STATUS_OK, array{references: array<string, CoreReference|null>}, array{}> @@ -197,7 +197,7 @@ class ReferenceApiController extends \OCP\AppFramework\OCSController { /** * Get the providers * - * @return DataResponse<Http::STATUS_OK, CoreReferenceProvider[], array{}> + * @return DataResponse<Http::STATUS_OK, list<CoreReferenceProvider>, array{}> * * 200: Providers returned */ @@ -205,9 +205,9 @@ class ReferenceApiController extends \OCP\AppFramework\OCSController { #[ApiRoute(verb: 'GET', url: '/providers', root: '/references')] public function getProvidersInfo(): DataResponse { $providers = $this->referenceManager->getDiscoverableProviders(); - $jsonProviders = array_map(static function (IDiscoverableReferenceProvider $provider) { + $jsonProviders = array_values(array_map(static function (IDiscoverableReferenceProvider $provider) { return $provider->jsonSerialize(); - }, $providers); + }, $providers)); return new DataResponse($jsonProviders); } |