Skip to content

Commit

Permalink
fixup! feat: check connection performance of mail service
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <[email protected]>
  • Loading branch information
SebastianKrupinski committed Feb 11, 2025
1 parent 02042c7 commit ad1aea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Db/MailAccountMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public function getRandomAccountIdsByImapHost(string $host, int $limit = 3): arr
// Pick 3 random accounts or any available
if ($ids !== [] && count($ids) >= $limit) {
$rids = array_rand($ids, $limit);
return array_intersect_key($ids, array_flip($rids));
return array_intersect_key($ids, array_values($rids));

Check failure on line 250 in lib/Db/MailAccountMapper.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-master

PossiblyInvalidArgument

lib/Db/MailAccountMapper.php:250:50: PossiblyInvalidArgument: Argument 1 of array_values expects array<array-key, mixed>, but possibly different type array-key|list<array-key> provided (see https://psalm.dev/092)

Check warning on line 250 in lib/Db/MailAccountMapper.php

View check run for this annotation

Codecov / codecov/patch

lib/Db/MailAccountMapper.php#L248-L250

Added lines #L248 - L250 were not covered by tests
}
return $ids;

Check warning on line 252 in lib/Db/MailAccountMapper.php

View check run for this annotation

Codecov / codecov/patch

lib/Db/MailAccountMapper.php#L252

Added line #L252 was not covered by tests
}
Expand Down

0 comments on commit ad1aea8

Please sign in to comment.