Skip to content

Commit

Permalink
fix: fix psalm issues
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed May 7, 2024
1 parent e348c7f commit 576f4d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions lib/private/TaskProcessing/Db/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
* @method string|null getUserId()
* @method setAppId(string $type)
* @method string getAppId()
* @method setIdentifier(string $customId)
* @method string getIdentifier()
* @method setCustomId(string $customId)
* @method string getCustomId()
* @method setCompletionExpectedAt(null|\DateTime $completionExpectedAt)
* @method null|\DateTime getCompletionExpectedAt()
* @method setErrorMessage(null|string $error)
Expand Down Expand Up @@ -110,7 +110,7 @@ public static function fromPublicTask(OCPTask $task): self {
'errorMessage' => $task->getErrorMessage(),
'userId' => $task->getUserId(),
'appId' => $task->getAppId(),
'customId' => $task->getIdentifier(),
'customId' => $task->getCustomId(),
'completionExpectedAt' => $task->getCompletionExpectedAt(),
'progress' => $task->getProgress(),
]);
Expand All @@ -122,7 +122,7 @@ public static function fromPublicTask(OCPTask $task): self {
* @throws \JsonException
*/
public function toPublicTask(): OCPTask {
$task = new OCPTask($this->getType(), json_decode($this->getInput(), true, 512, JSON_THROW_ON_ERROR), $this->getAppId(), $this->getuserId(), $this->getIdentifier());
$task = new OCPTask($this->getType(), json_decode($this->getInput(), true, 512, JSON_THROW_ON_ERROR), $this->getAppId(), $this->getuserId(), $this->getCustomId());
$task->setId($this->getId());
$task->setStatus($this->getStatus());
$task->setOutput(json_decode($this->getOutput(), true, 512, JSON_THROW_ON_ERROR));
Expand Down
6 changes: 3 additions & 3 deletions lib/private/TaskProcessing/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function getOptionalOutputShape(): array {
return [];
}

public function process(?string $userId, array $input): array {
public function process(?string $userId, array $input, callable $reportProgress): array {
if ($this->provider instanceof \OCP\TextProcessing\IProviderWithUserId) {
$this->provider->setUserId($userId);
}
Expand Down Expand Up @@ -258,7 +258,7 @@ public function getOptionalOutputShape(): array {
return [];
}

public function process(?string $userId, array $input): array {
public function process(?string $userId, array $input, callable $reportProgress): array {
try {
$folder = $this->appData->getFolder('text2image');
} catch(\OCP\Files\NotFoundException) {
Expand Down Expand Up @@ -340,7 +340,7 @@ public function getOptionalOutputShape(): array {
return [];
}

public function process(?string $userId, array $input): array {
public function process(?string $userId, array $input, callable $reportProgress): array {
try {
$folder = $this->appData->getFolder('audio2text');
} catch(\OCP\Files\NotFoundException) {
Expand Down

0 comments on commit 576f4d7

Please sign in to comment.