fix: fix psalm issues

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
pull/45094/head
Marcel Klehr 4 weeks ago
parent 4d9a0eab5f
commit f2ab6cb0a9

@ -43,8 +43,8 @@ use OCP\TaskProcessing\Task as OCPTask;
* @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)
@ -110,7 +110,7 @@ class Task extends Entity {
'errorMessage' => $task->getErrorMessage(),
'userId' => $task->getUserId(),
'appId' => $task->getAppId(),
'customId' => $task->getIdentifier(),
'customId' => $task->getCustomId(),
'completionExpectedAt' => $task->getCompletionExpectedAt(),
'progress' => $task->getProgress(),
]);
@ -122,7 +122,7 @@ class Task extends Entity {
* @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));

@ -148,7 +148,7 @@ class Manager implements IManager {
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);
}
@ -258,7 +258,7 @@ class Manager implements IManager {
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) {
@ -340,7 +340,7 @@ class Manager implements IManager {
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) {

Loading…
Cancel
Save