diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-06-20 14:58:58 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2023-07-07 13:39:10 +0200 |
commit | b8a9f08d833ae2893eed9b4a19749822bf0441bc (patch) | |
tree | a86dcd0f4652f294e8de2ef81846feef473d7003 /lib/public | |
parent | b6941aa5c3d26b1c2d66837ee924e8e14e5e1232 (diff) | |
download | nextcloud-server-b8a9f08d833ae2893eed9b4a19749822bf0441bc.tar.gz nextcloud-server-b8a9f08d833ae2893eed9b4a19749822bf0441bc.zip |
LLM OCP API: Make linters happy
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/LanguageModel/AbstractLanguageModelTask.php | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/public/LanguageModel/AbstractLanguageModelTask.php b/lib/public/LanguageModel/AbstractLanguageModelTask.php index 63b6396fb43..f1834cdf058 100644 --- a/lib/public/LanguageModel/AbstractLanguageModelTask.php +++ b/lib/public/LanguageModel/AbstractLanguageModelTask.php @@ -2,14 +2,13 @@ namespace OCP\LanguageModel; - use OC\LanguageModel\Db\Task; abstract class AbstractLanguageModelTask implements ILanguageModelTask { protected ?int $id; protected int $status = ILanguageModelTask::STATUS_UNKNOWN; - public final function __construct( + final public function __construct( protected string $input, protected string $appId, protected ?string $userId, @@ -30,49 +29,49 @@ abstract class AbstractLanguageModelTask implements ILanguageModelTask { /** * @return int */ - public final function getStatus(): int { + final public function getStatus(): int { return $this->status; } /** * @param int $status */ - public final function setStatus(int $status): void { + final public function setStatus(int $status): void { $this->status = $status; } /** * @return int|null */ - public final function getId(): ?int { + final public function getId(): ?int { return $this->id; } /** * @param int|null $id */ - public final function setId(?int $id): void { + final public function setId(?int $id): void { $this->id = $id; } /** * @return string */ - public final function getInput(): string { + final public function getInput(): string { return $this->input; } /** * @return string */ - public final function getAppId(): string { + final public function getAppId(): string { return $this->appId; } /** * @return string|null */ - public final function getUserId(): ?string { + final public function getUserId(): ?string { return $this->userId; } @@ -89,7 +88,7 @@ abstract class AbstractLanguageModelTask implements ILanguageModelTask { } - public final static function fromTaskEntity(Task $taskEntity): ILanguageModelTask { + final public static function fromTaskEntity(Task $taskEntity): ILanguageModelTask { $task = self::factory($taskEntity->getType(), $taskEntity->getInput(), $taskEntity->getuserId(), $taskEntity->getAppId()); $task->setId($taskEntity->getId()); $task->setStatus($taskEntity->getStatus()); @@ -104,10 +103,10 @@ abstract class AbstractLanguageModelTask implements ILanguageModelTask { * @return ILanguageModelTask * @throws \InvalidArgumentException */ - public final static function factory(string $type, string $input, ?string $userId, string $appId): ILanguageModelTask { + final public static function factory(string $type, string $input, ?string $userId, string $appId): ILanguageModelTask { if (!in_array($type, self::TYPES)) { throw new \InvalidArgumentException('Unknown task type'); } - return new ILanguageModelTask::TYPES[$type]($input, $userId, $appId); + return new (ILanguageModelTask::TYPES[$type])($input, $userId, $appId); } } |