Mark multi-factor methods as final
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 19 Jan 2021 13:25:22 +0000 (14:25 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 19 Jan 2021 13:25:22 +0000 (14:25 +0100)
There is no good reason why anyone should be allowed to inherit from these
classes, especially since all the methods are either public or private (and not
protected).

wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php
wcfsetup/install/files/lib/system/user/multifactor/EmailMultifactorMethod.class.php
wcfsetup/install/files/lib/system/user/multifactor/TotpMultifactorMethod.class.php

index 42e89ae8b05b29f2bd3bc55840268eccf461530f..9730b828cf93f2ed10fb3041205d237756dd9259 100644 (file)
@@ -25,7 +25,7 @@ use wcf\system\WCF;
  * @package    WoltLabSuite\System\User\Multifactor
  * @since      5.4
  */
-class BackupMultifactorMethod implements IMultifactorMethod {
+final class BackupMultifactorMethod implements IMultifactorMethod {
        /**
         * @var IPasswordAlgorithm
         */
index 9d6c9968479ba4170066c69159bf4a4734d27d4a..a6a80ed1c5d9c3595402ee4bf3d3dcf8e41c9947 100644 (file)
@@ -22,7 +22,7 @@ use wcf\system\WCF;
  * @package    WoltLabSuite\System\User\Multifactor
  * @since      5.4
  */
-class EmailMultifactorMethod implements IMultifactorMethod {
+final class EmailMultifactorMethod implements IMultifactorMethod {
        private const LIFETIME = 10 * 60;
        private const REFRESH_AFTER = 2 * 60;
        
index 43802fb0384484ad3dc58b872a38f9132e203992..e72928814260b6cc4839912696ceadc633d79a6e 100644 (file)
@@ -29,7 +29,7 @@ use wcf\system\WCF;
  * @package    WoltLabSuite\System\User\Multifactor
  * @since      5.4
  */
-class TotpMultifactorMethod implements IMultifactorMethod {
+final class TotpMultifactorMethod implements IMultifactorMethod {
        private const USER_ATTEMPTS_PER_TEN_MINUTES = 5;
        
        /**