Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Removed unused deprecated ILogger #638

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions lib/Activity/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,19 @@
use InvalidArgumentException;
use OCP\Activity\IEvent;
use OCP\Activity\IProvider;
use OCP\ILogger;
use OCP\IURLGenerator;
use OCP\L10N\IFactory as L10nFactory;

class Provider implements IProvider {

/** @var L10nFactory */
private $l10n;

/** @var IURLGenerator */
private $urlGenerator;

/** @var ILogger */
private $logger;

/**
* @param L10nFactory $l10n
* @param IURLGenerator $urlGenerator
* @param ILogger $logger
*/
public function __construct(L10nFactory $l10n, IURLGenerator $urlGenerator, ILogger $logger) {
$this->logger = $logger;
$this->urlGenerator = $urlGenerator;
$this->l10n = $l10n;
public function __construct(
private L10nFactory $l10n,
private IURLGenerator $urlGenerator,
) {
}

/**
Expand Down
10 changes: 4 additions & 6 deletions tests/Unit/Activity/ProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@
use OCA\TwoFactorWebauthn\Activity\Provider;
use OCP\Activity\IEvent;
use OCP\IL10N;
use OCP\ILogger;
use OCP\IURLGenerator;
use OCP\L10N\IFactory;
use PHPUnit\Framework\MockObject\MockObject;

class ProviderTest extends TestCase {
private $l10n;
private $urlGenerator;
private $logger;
private IFactory&MockObject $l10n;
private IURLGenerator&MockObject $urlGenerator;

/** @var Provider */
private $provider;
Expand All @@ -48,9 +47,8 @@ protected function setUp(): void {

$this->l10n = $this->createMock(IFactory::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->logger = $this->createMock(ILogger::class);

$this->provider = new Provider($this->l10n, $this->urlGenerator, $this->logger);
$this->provider = new Provider($this->l10n, $this->urlGenerator);
}

public function testParseUnrelated(): void {
Expand Down
Loading