diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-11-06 08:56:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-06 08:56:30 +0100 |
commit | d53fde8eef13d408fcf035ea8a95e6345df9b99b (patch) | |
tree | 60f6b612d967a9a264589cdd6cc0c6d008e1bf05 /lib/public/TaskProcessing | |
parent | 8fab143aa486904f7a17c4f1c2f6364cd43bf9d9 (diff) | |
parent | 77114fb3277742fc69ddcf2432311ecb263af97e (diff) | |
download | nextcloud-server-d53fde8eef13d408fcf035ea8a95e6345df9b99b.tar.gz nextcloud-server-d53fde8eef13d408fcf035ea8a95e6345df9b99b.zip |
Merge pull request #49015 from nextcloud/fix/openapi/array-syntax
Diffstat (limited to 'lib/public/TaskProcessing')
-rw-r--r-- | lib/public/TaskProcessing/IManager.php | 2 | ||||
-rw-r--r-- | lib/public/TaskProcessing/Task.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/public/TaskProcessing/IManager.php b/lib/public/TaskProcessing/IManager.php index 2d5fe1d9ba6..1b59bb12ad4 100644 --- a/lib/public/TaskProcessing/IManager.php +++ b/lib/public/TaskProcessing/IManager.php @@ -46,7 +46,7 @@ interface IManager { public function getPreferredProvider(string $taskTypeId); /** - * @return array<array-key,array{name: string, description: string, inputShape: ShapeDescriptor[], inputShapeEnumValues: ShapeEnumValue[][], inputShapeDefaults: array<array-key, numeric|string>, optionalInputShape: ShapeDescriptor[], optionalInputShapeEnumValues: ShapeEnumValue[][], optionalInputShapeDefaults: array<array-key, numeric|string>, outputShape: ShapeDescriptor[], outputShapeEnumValues: ShapeEnumValue[][], optionalOutputShape: ShapeDescriptor[], optionalOutputShapeEnumValues: ShapeEnumValue[][]}> + * @return array<string, array{name: string, description: string, inputShape: ShapeDescriptor[], inputShapeEnumValues: ShapeEnumValue[][], inputShapeDefaults: array<array-key, numeric|string>, optionalInputShape: ShapeDescriptor[], optionalInputShapeEnumValues: ShapeEnumValue[][], optionalInputShapeDefaults: array<array-key, numeric|string>, outputShape: ShapeDescriptor[], outputShapeEnumValues: ShapeEnumValue[][], optionalOutputShape: ShapeDescriptor[], optionalOutputShapeEnumValues: ShapeEnumValue[][]}> * @since 30.0.0 */ public function getAvailableTaskTypes(): array; diff --git a/lib/public/TaskProcessing/Task.php b/lib/public/TaskProcessing/Task.php index db8e4d7fab5..71c271cd43d 100644 --- a/lib/public/TaskProcessing/Task.php +++ b/lib/public/TaskProcessing/Task.php @@ -253,12 +253,12 @@ final class Task implements \JsonSerializable { } /** - * @psalm-return array{id: ?int, lastUpdated: int, type: string, status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN', userId: ?string, appId: string, input: array<array-key, list<numeric|string>|numeric|string>, output: ?array<array-key, list<numeric|string>|numeric|string>, customId: ?string, completionExpectedAt: ?int, progress: ?float, scheduledAt: ?int, startedAt: ?int, endedAt: ?int} + * @psalm-return array{id: int, lastUpdated: int, type: string, status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN', userId: ?string, appId: string, input: array<string, list<numeric|string>|numeric|string>, output: ?array<string, list<numeric|string>|numeric|string>, customId: ?string, completionExpectedAt: ?int, progress: ?float, scheduledAt: ?int, startedAt: ?int, endedAt: ?int} * @since 30.0.0 */ final public function jsonSerialize(): array { return [ - 'id' => $this->getId(), + 'id' => (int)$this->getId(), 'type' => $this->getTaskTypeId(), 'lastUpdated' => $this->getLastUpdated(), 'status' => self::statusToString($this->getStatus()), |