diff options
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; } |