Skip to content

Commit fa62c47

Browse files
committed
fix psalm attempt 2
Signed-off-by: szaimen <[email protected]>
1 parent 464a9e8 commit fa62c47

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

apps/updatenotification/lib/Controller/AdminController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
namespace OCA\UpdateNotification\Controller;
2929

3030
use OC\User\Backend;
31+
use OCP\User\Backend\ICountUsersBackend;
3132
use OCA\UpdateNotification\ResetTokenBackgroundJob;
3233
use OCP\AppFramework\Controller;
3334
use OCP\AppFramework\Http;
@@ -128,6 +129,7 @@ private function getUserCount(): int {
128129
$backends = $this->userManager->getBackends();
129130
foreach ($backends as $backend) {
130131
if ($backend->implementsActions(Backend::COUNT_USERS)) {
132+
/** @var ICountUsersBackend $backend */
131133
$backendUsers = $backend->countUsers();
132134
if ($backendUsers !== false) {
133135
$userCount += $backendUsers;

build/psalm-baseline.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,9 +1876,6 @@
18761876
</InvalidArgument>
18771877
</file>
18781878
<file src="apps/updatenotification/lib/Controller/AdminController.php">
1879-
<UndefinedInterfaceMethod occurrences="1">
1880-
<code>countUsers</code>
1881-
</UndefinedInterfaceMethod>
18821879
<InvalidScalarArgument occurrences="2">
18831880
<code>$this-&gt;timeFactory-&gt;getTime()</code>
18841881
<code>0</code>

0 commit comments

Comments
 (0)