techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2023-08-28 15:54:36 +02:00
parent f09f78c901
commit 1c9229df56
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
2 changed files with 4 additions and 5 deletions

View File

@ -23,12 +23,12 @@ declare(strict_types=1);
namespace OCA\Photos\Sabre;
use OC\Security\Bruteforce\Throttler;
use OCA\Photos\Album\AlbumMapper;
use OCA\Photos\Sabre\Album\PublicAlbumRoot;
use OCA\Photos\Service\UserConfigService;
use OCP\Files\IRootFolder;
use OCP\IRequest;
use OCP\Security\Bruteforce\IThrottler;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAVACL\AbstractPrincipalCollection;
use Sabre\DAVACL\PrincipalBackend;
@ -39,7 +39,7 @@ class PublicRootCollection extends AbstractPrincipalCollection {
private IRootFolder $rootFolder;
private UserConfigService $userConfigService;
private IRequest $request;
private Throttler $throttler;
private IThrottler $throttler;
public function __construct(
AlbumMapper $albumMapper,
@ -47,7 +47,7 @@ class PublicRootCollection extends AbstractPrincipalCollection {
PrincipalBackend\BackendInterface $principalBackend,
UserConfigService $userConfigService,
IRequest $request,
Throttler $throttler
IThrottler $throttler
) {
parent::__construct($principalBackend, 'principals/token');

View File

@ -23,7 +23,6 @@
<referencedClass name="OCA\DAV\Connector\Sabre\File" />
<referencedClass name="OCA\DAV\Connector\Sabre\FilesPlugin" />
<referencedClass name="OCA\DAV\Events\SabrePluginAuthInitEvent" />
<referencedClass name="OC\Security\Bruteforce\Throttler" />
<referencedClass name="OC_User" />
</errorLevel>
</UndefinedClass>
@ -37,4 +36,4 @@
</errorLevel>
</UndefinedDocblockClass>
</issueHandlers>
</psalm>
</psalm>