From 61c71349561e531aa52a30b7e66a8d8ecf6455d2 Mon Sep 17 00:00:00 2001 From: mscherer Date: Thu, 19 Mar 2026 21:42:31 +0100 Subject: [PATCH] Fix PHPStan errors: add type annotations for list query results --- src/Command/InfoCommand.php | 1 + src/Model/Table/QueueProcessesTable.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Command/InfoCommand.php b/src/Command/InfoCommand.php index dac8a113..0544289b 100644 --- a/src/Command/InfoCommand.php +++ b/src/Command/InfoCommand.php @@ -117,6 +117,7 @@ public function execute(Arguments $args, ConsoleIo $io) { $io->out(); $io->out('Jobs currently in the queue:'); + /** @var array $types */ $types = $QueuedJobs->getTypes()->toArray(); //TODO: refactor using $io->helper table? foreach ($types as $type) { diff --git a/src/Model/Table/QueueProcessesTable.php b/src/Model/Table/QueueProcessesTable.php index 425b3aa0..3a0b19ce 100644 --- a/src/Model/Table/QueueProcessesTable.php +++ b/src/Model/Table/QueueProcessesTable.php @@ -365,7 +365,8 @@ public function buildServerString(): ?string { * @return array */ public function serverList(): array { - return $this->find() + /** @var array $list */ + $list = $this->find() ->distinct(['server']) ->where(['server IS NOT' => null]) ->find( @@ -373,6 +374,8 @@ public function serverList(): array { keyField: 'server', valueField: 'server', )->toArray(); + + return $list; } }