diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2025-01-21 22:52:12 +0100 |
---|---|---|
committer | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2025-01-22 16:59:12 +0100 |
commit | 3c208955241d2608d50eee355852bf21b7f33933 (patch) | |
tree | 6f9199322b0ee711828e657e58209d6b794e6159 /lib/private/Authentication/TwoFactorAuth/ProviderSet.php | |
parent | 250549cd031c6b62fd5728c531fed2bdc219e565 (diff) | |
download | nextcloud-server-authPropertyPromotion.tar.gz nextcloud-server-authPropertyPromotion.zip |
refactor(authentication): Use constructor property promotionauthPropertyPromotion
fix: error
Diffstat (limited to 'lib/private/Authentication/TwoFactorAuth/ProviderSet.php')
-rw-r--r-- | lib/private/Authentication/TwoFactorAuth/ProviderSet.php | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php index 15b82be6dec..53ff0fe137e 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php @@ -16,29 +16,18 @@ use function array_filter; * Contains all two-factor provider information for the two-factor login challenge */ class ProviderSet { - /** @var IProvider */ - private $providers; - /** @var bool */ - private $providerMissing; - - /** - * @param IProvider[] $providers - * @param bool $providerMissing - */ - public function __construct(array $providers, bool $providerMissing) { + public function __construct( + private array $providers, + private bool $providerMissing, + ) { $this->providers = []; foreach ($providers as $provider) { $this->providers[$provider->getId()] = $provider; } - $this->providerMissing = $providerMissing; } - /** - * @param string $providerId - * @return IProvider|null - */ - public function getProvider(string $providerId) { + public function getProvider(string $providerId): ?IProvider { return $this->providers[$providerId] ?? null; } |