Skip to content

Commit ba99af3

Browse files
authored
Fix PHPStan errors: add type annotations for list query results (#467)
1 parent 6ab3291 commit ba99af3

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/Command/InfoCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public function execute(Arguments $args, ConsoleIo $io) {
117117
$io->out();
118118

119119
$io->out('Jobs currently in the queue:');
120+
/** @var array<string, string> $types */
120121
$types = $QueuedJobs->getTypes()->toArray();
121122
//TODO: refactor using $io->helper table?
122123
foreach ($types as $type) {

src/Model/Table/QueueProcessesTable.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,17 @@ public function buildServerString(): ?string {
365365
* @return array<string, string>
366366
*/
367367
public function serverList(): array {
368-
return $this->find()
368+
/** @var array<string, string> $list */
369+
$list = $this->find()
369370
->distinct(['server'])
370371
->where(['server IS NOT' => null])
371372
->find(
372373
'list',
373374
keyField: 'server',
374375
valueField: 'server',
375376
)->toArray();
377+
378+
return $list;
376379
}
377380

378381
}

0 commit comments

Comments
 (0)