Skip to content

Commit

Permalink
Merge pull request #2034 from nextcloud/techdebt/noid/user-IThrottler…
Browse files Browse the repository at this point in the history
…-interface-for-DI

techdebt(DI): Use public IThrottler interface which exists since 25
  • Loading branch information
artonge authored Aug 28, 2023
2 parents f09f78c + 1c9229d commit ac0d5d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/Sabre/PublicRootCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@

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;
Expand All @@ -39,15 +39,15 @@ class PublicRootCollection extends AbstractPrincipalCollection {
private IRootFolder $rootFolder;
private UserConfigService $userConfigService;
private IRequest $request;
private Throttler $throttler;
private IThrottler $throttler;

public function __construct(
AlbumMapper $albumMapper,
IRootFolder $rootFolder,
PrincipalBackend\BackendInterface $principalBackend,
UserConfigService $userConfigService,
IRequest $request,
Throttler $throttler
IThrottler $throttler
) {
parent::__construct($principalBackend, 'principals/token');

Expand Down
3 changes: 1 addition & 2 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -37,4 +36,4 @@
</errorLevel>
</UndefinedDocblockClass>
</issueHandlers>
</psalm>
</psalm>

0 comments on commit ac0d5d0

Please sign in to comment.