diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-10-18 13:33:04 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2023-10-18 13:44:21 +0200 |
commit | 9b7f63946f090f27728e58f8c809f50a27478859 (patch) | |
tree | 8b50995176dda837f4068d75bb732a7f3c8b7a38 | |
parent | ca9a28ab51d9f64cd0802ecab5cbdcccfa8eacb9 (diff) | |
download | nextcloud-server-9b7f63946f090f27728e58f8c809f50a27478859.tar.gz nextcloud-server-9b7f63946f090f27728e58f8c809f50a27478859.zip |
fix(TextToImage): Fix psalm issues
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
-rw-r--r-- | core/ResponseDefinitions.php | 2 | ||||
-rw-r--r-- | lib/public/TextToImage/Task.php | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/ResponseDefinitions.php b/core/ResponseDefinitions.php index 97c91c5bbe0..2548880395a 100644 --- a/core/ResponseDefinitions.php +++ b/core/ResponseDefinitions.php @@ -151,7 +151,7 @@ namespace OCA\Core; * userId: ?string, * appId: string, * input: string, - * identifier: string, + * identifier: ?string, * } */ class ResponseDefinitions { diff --git a/lib/public/TextToImage/Task.php b/lib/public/TextToImage/Task.php index 81a33752262..545bd8bac5a 100644 --- a/lib/public/TextToImage/Task.php +++ b/lib/public/TextToImage/Task.php @@ -67,14 +67,14 @@ final class Task implements \JsonSerializable { * @param string $input * @param string $appId * @param string|null $userId - * @param string $identifier An arbitrary identifier for this task. max length: 255 chars + * @param null|string $identifier An arbitrary identifier for this task. max length: 255 chars * @since 28.0.0 */ final public function __construct( protected string $input, protected string $appId, protected ?string $userId, - protected string $identifier = '', + protected ?string $identifier = '', ) { } @@ -143,10 +143,10 @@ final class Task implements \JsonSerializable { } /** - * @return string + * @return null|string * @since 28.0.0 */ - final public function getIdentifier(): string { + final public function getIdentifier(): ?string { return $this->identifier; } @@ -159,7 +159,7 @@ final class Task implements \JsonSerializable { } /** - * @psalm-return array{id: ?int, status: 0|1|2|3|4, userId: ?string, appId: string, input: string, identifier: string} + * @psalm-return array{id: ?int, status: 0|1|2|3|4, userId: ?string, appId: string, input: string, identifier: ?string} * @since 28.0.0 */ public function jsonSerialize(): array { |