]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix psalm issue
authorJulien Veyssier <julien-nc@posteo.net>
Mon, 7 Aug 2023 15:49:58 +0000 (17:49 +0200)
committerJulien Veyssier <julien-nc@posteo.net>
Wed, 9 Aug 2023 12:58:02 +0000 (14:58 +0200)
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
(cherry picked from commit f154fe7f8ea5e81f313192555e8c720b2207b9fb)
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
core/Controller/TextProcessingApiController.php

index e1d7788be27012de3e4abe324aca4d08053d1277..0035750b4b0f9d554539be83941ecb385cb7e440 100644 (file)
@@ -192,7 +192,7 @@ class TextProcessingApiController extends \OCP\AppFramework\OCSController {
         *
         * @param string $appId
         * @param string|null $identifier
-        * @return DataResponse<Http::STATUS_OK, array{tasks: array{CoreTextProcessingTask}}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
+        * @return DataResponse<Http::STATUS_OK, array{tasks: CoreTextProcessingTask[]}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
         *
         *  200: Task list returned
         */
@@ -200,6 +200,7 @@ class TextProcessingApiController extends \OCP\AppFramework\OCSController {
        public function listTasksByApp(string $appId, ?string $identifier = null): DataResponse {
                try {
                        $tasks = $this->textProcessingManager->getUserTasksByApp($this->userId, $appId, $identifier);
+                       /** @var CoreTextProcessingTask[] $json */
                        $json = array_map(static function (Task $task) {
                                return $task->jsonSerialize();
                        }, $tasks);