`AdminAccountPage`: Cast `$query` to `LdapQuery` using inline `@var`

This commit is contained in:
raviks789 2023-08-14 14:13:16 +02:00
parent 9e0c8ef76a
commit baeba7c27a
1 changed files with 5 additions and 2 deletions

View File

@ -15,6 +15,7 @@ use Icinga\Data\ConfigObject;
use Icinga\Data\ResourceFactory;
use Icinga\Data\Selectable;
use Icinga\Exception\NotImplementedError;
use Icinga\Protocol\Ldap\LdapQuery;
use Icinga\Web\Form;
/**
@ -297,7 +298,8 @@ class AdminAccountPage extends Form
->select(array('user_name'))
->order('user_name', 'asc', true);
if (in_array($this->backendConfig['backend'], array('ldap', 'msldap'))) {
$query->getQuery()->setUsePagedResults();
/** @var LdapQuery $query */
$query->setUsePagedResults();
}
return $query->fetchColumn();
@ -355,7 +357,8 @@ class AdminAccountPage extends Form
->createUserGroupBackend()
->select(array('group_name'));
if (in_array($this->backendConfig['backend'], array('ldap', 'msldap'))) {
$query->getQuery()->setUsePagedResults();
/** @var LdapQuery $query */
$query->setUsePagedResults();
}
return $query->fetchColumn();