Skip to content

Commit

Permalink
fix psalm attempt 2
Browse files Browse the repository at this point in the history
Signed-off-by: szaimen <szaimen@e.mail.de>
  • Loading branch information
szaimen committed Mar 11, 2022
1 parent 464a9e8 commit fa62c47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions apps/updatenotification/lib/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
namespace OCA\UpdateNotification\Controller;

use OC\User\Backend;
use OCP\User\Backend\ICountUsersBackend;
use OCA\UpdateNotification\ResetTokenBackgroundJob;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
Expand Down Expand Up @@ -128,6 +129,7 @@ private function getUserCount(): int {
$backends = $this->userManager->getBackends();
foreach ($backends as $backend) {
if ($backend->implementsActions(Backend::COUNT_USERS)) {
/** @var ICountUsersBackend $backend */
$backendUsers = $backend->countUsers();
if ($backendUsers !== false) {
$userCount += $backendUsers;
Expand Down
3 changes: 0 additions & 3 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1876,9 +1876,6 @@
</InvalidArgument>
</file>
<file src="apps/updatenotification/lib/Controller/AdminController.php">
<UndefinedInterfaceMethod occurrences="1">
<code>countUsers</code>
</UndefinedInterfaceMethod>
<InvalidScalarArgument occurrences="2">
<code>$this-&gt;timeFactory-&gt;getTime()</code>
<code>0</code>
Expand Down

0 comments on commit fa62c47

Please sign in to comment.