add readonly modifiers wherever possible

This commit is contained in:
Mark Magyar
2023-05-27 21:33:54 +02:00
parent e584f0c56a
commit 955ce522f0
3 changed files with 9 additions and 9 deletions
+7 -7
View File
@@ -28,13 +28,13 @@ class TwoFactorAuth
private static array $_base32lookup = array();
public function __construct(
private ?string $issuer = null,
private int $digits = 6,
private int $period = 30,
private Algorithm $algorithm = Algorithm::Sha1,
private ?IQRCodeProvider $qrcodeprovider = null,
private ?IRNGProvider $rngprovider = null,
private ?ITimeProvider $timeprovider = null
private readonly ?string $issuer = null,
private readonly int $digits = 6,
private readonly int $period = 30,
private readonly Algorithm $algorithm = Algorithm::Sha1,
private ?IQRCodeProvider $qrcodeprovider = null,
private ?IRNGProvider $rngprovider = null,
private ?ITimeProvider $timeprovider = null
) {
if ($this->digits <= 0) {
throw new TwoFactorAuthException('Digits must be > 0');