aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TextToImage
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2024-01-09 09:41:54 +0100
committerMarcel Klehr <mklehr@gmx.net>2024-01-09 10:11:39 +0100
commit997f6c33cd184e7cb71d91a09423dbace824cb8a (patch)
tree9bd32dda6d4826aff02d8bb5ca3f60aa007318bb /lib/private/TextToImage
parentf27d2bf3526d41ec9ba3b56a1c3b652a6e81885f (diff)
downloadnextcloud-server-997f6c33cd184e7cb71d91a09423dbace824cb8a.tar.gz
nextcloud-server-997f6c33cd184e7cb71d91a09423dbace824cb8a.zip
fix(psalm issues)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/private/TextToImage')
-rw-r--r--lib/private/TextToImage/Manager.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/TextToImage/Manager.php b/lib/private/TextToImage/Manager.php
index 87d69457f16..40cab81b5b1 100644
--- a/lib/private/TextToImage/Manager.php
+++ b/lib/private/TextToImage/Manager.php
@@ -49,7 +49,7 @@ use RuntimeException;
use Throwable;
class Manager implements IManager {
- /** @var ?IProvider[] */
+ /** @var ?list<IProvider> */
private ?array $providers = null;
private IAppData $appData;
@@ -83,7 +83,9 @@ class Manager implements IManager {
foreach ($context->getTextToImageProviders() as $providerServiceRegistration) {
$class = $providerServiceRegistration->getService();
try {
- $this->providers[] = $this->serverContainer->get($class);
+ /** @var IProvider $provider */
+ $provider = $this->serverContainer->get($class);
+ $this->providers[] = $provider;
} catch (Throwable $e) {
$this->logger->error('Failed to load Text to image provider ' . $class, [
'exception' => $e,