@@ -6,51 +6,51 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitTwoFactorBackupCodes |
| 8 | 8 | { |
| 9 | - public static $prefixLengthsPsr4 = array ( |
|
| 9 | + public static $prefixLengthsPsr4 = array( |
|
| 10 | 10 | 'O' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'OCA\\TwoFactorBackupCodes\\' => 25, |
| 13 | 13 | ), |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - public static $prefixDirsPsr4 = array ( |
|
| 16 | + public static $prefixDirsPsr4 = array( |
|
| 17 | 17 | 'OCA\\TwoFactorBackupCodes\\' => |
| 18 | - array ( |
|
| 19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
| 18 | + array( |
|
| 19 | + 0 => __DIR__.'/..'.'/../lib', |
|
| 20 | 20 | ), |
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | - public static $classMap = array ( |
|
| 24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 25 | - 'OCA\\TwoFactorBackupCodes\\Activity\\Provider' => __DIR__ . '/..' . '/../lib/Activity/Provider.php', |
|
| 26 | - 'OCA\\TwoFactorBackupCodes\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
| 27 | - 'OCA\\TwoFactorBackupCodes\\BackgroundJob\\CheckBackupCodes' => __DIR__ . '/..' . '/../lib/BackgroundJob/CheckBackupCodes.php', |
|
| 28 | - 'OCA\\TwoFactorBackupCodes\\BackgroundJob\\RememberBackupCodesJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/RememberBackupCodesJob.php', |
|
| 29 | - 'OCA\\TwoFactorBackupCodes\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php', |
|
| 30 | - 'OCA\\TwoFactorBackupCodes\\Db\\BackupCode' => __DIR__ . '/..' . '/../lib/Db/BackupCode.php', |
|
| 31 | - 'OCA\\TwoFactorBackupCodes\\Db\\BackupCodeMapper' => __DIR__ . '/..' . '/../lib/Db/BackupCodeMapper.php', |
|
| 32 | - 'OCA\\TwoFactorBackupCodes\\Event\\CodesGenerated' => __DIR__ . '/..' . '/../lib/Event/CodesGenerated.php', |
|
| 33 | - 'OCA\\TwoFactorBackupCodes\\Listener\\ActivityPublisher' => __DIR__ . '/..' . '/../lib/Listener/ActivityPublisher.php', |
|
| 34 | - 'OCA\\TwoFactorBackupCodes\\Listener\\ClearNotifications' => __DIR__ . '/..' . '/../lib/Listener/ClearNotifications.php', |
|
| 35 | - 'OCA\\TwoFactorBackupCodes\\Listener\\ProviderDisabled' => __DIR__ . '/..' . '/../lib/Listener/ProviderDisabled.php', |
|
| 36 | - 'OCA\\TwoFactorBackupCodes\\Listener\\ProviderEnabled' => __DIR__ . '/..' . '/../lib/Listener/ProviderEnabled.php', |
|
| 37 | - 'OCA\\TwoFactorBackupCodes\\Listener\\RegistryUpdater' => __DIR__ . '/..' . '/../lib/Listener/RegistryUpdater.php', |
|
| 38 | - 'OCA\\TwoFactorBackupCodes\\Listener\\UserDeleted' => __DIR__ . '/..' . '/../lib/Listener/UserDeleted.php', |
|
| 39 | - 'OCA\\TwoFactorBackupCodes\\Migration\\CheckBackupCodes' => __DIR__ . '/..' . '/../lib/Migration/CheckBackupCodes.php', |
|
| 40 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170607104347' => __DIR__ . '/..' . '/../lib/Migration/Version1002Date20170607104347.php', |
|
| 41 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170607113030' => __DIR__ . '/..' . '/../lib/Migration/Version1002Date20170607113030.php', |
|
| 42 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170919123342' => __DIR__ . '/..' . '/../lib/Migration/Version1002Date20170919123342.php', |
|
| 43 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170926101419' => __DIR__ . '/..' . '/../lib/Migration/Version1002Date20170926101419.php', |
|
| 44 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20180821043638' => __DIR__ . '/..' . '/../lib/Migration/Version1002Date20180821043638.php', |
|
| 45 | - 'OCA\\TwoFactorBackupCodes\\Notifications\\Notifier' => __DIR__ . '/..' . '/../lib/Notifications/Notifier.php', |
|
| 46 | - 'OCA\\TwoFactorBackupCodes\\Provider\\BackupCodesProvider' => __DIR__ . '/..' . '/../lib/Provider/BackupCodesProvider.php', |
|
| 47 | - 'OCA\\TwoFactorBackupCodes\\Service\\BackupCodeStorage' => __DIR__ . '/..' . '/../lib/Service/BackupCodeStorage.php', |
|
| 48 | - 'OCA\\TwoFactorBackupCodes\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php', |
|
| 23 | + public static $classMap = array( |
|
| 24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
| 25 | + 'OCA\\TwoFactorBackupCodes\\Activity\\Provider' => __DIR__.'/..'.'/../lib/Activity/Provider.php', |
|
| 26 | + 'OCA\\TwoFactorBackupCodes\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
| 27 | + 'OCA\\TwoFactorBackupCodes\\BackgroundJob\\CheckBackupCodes' => __DIR__.'/..'.'/../lib/BackgroundJob/CheckBackupCodes.php', |
|
| 28 | + 'OCA\\TwoFactorBackupCodes\\BackgroundJob\\RememberBackupCodesJob' => __DIR__.'/..'.'/../lib/BackgroundJob/RememberBackupCodesJob.php', |
|
| 29 | + 'OCA\\TwoFactorBackupCodes\\Controller\\SettingsController' => __DIR__.'/..'.'/../lib/Controller/SettingsController.php', |
|
| 30 | + 'OCA\\TwoFactorBackupCodes\\Db\\BackupCode' => __DIR__.'/..'.'/../lib/Db/BackupCode.php', |
|
| 31 | + 'OCA\\TwoFactorBackupCodes\\Db\\BackupCodeMapper' => __DIR__.'/..'.'/../lib/Db/BackupCodeMapper.php', |
|
| 32 | + 'OCA\\TwoFactorBackupCodes\\Event\\CodesGenerated' => __DIR__.'/..'.'/../lib/Event/CodesGenerated.php', |
|
| 33 | + 'OCA\\TwoFactorBackupCodes\\Listener\\ActivityPublisher' => __DIR__.'/..'.'/../lib/Listener/ActivityPublisher.php', |
|
| 34 | + 'OCA\\TwoFactorBackupCodes\\Listener\\ClearNotifications' => __DIR__.'/..'.'/../lib/Listener/ClearNotifications.php', |
|
| 35 | + 'OCA\\TwoFactorBackupCodes\\Listener\\ProviderDisabled' => __DIR__.'/..'.'/../lib/Listener/ProviderDisabled.php', |
|
| 36 | + 'OCA\\TwoFactorBackupCodes\\Listener\\ProviderEnabled' => __DIR__.'/..'.'/../lib/Listener/ProviderEnabled.php', |
|
| 37 | + 'OCA\\TwoFactorBackupCodes\\Listener\\RegistryUpdater' => __DIR__.'/..'.'/../lib/Listener/RegistryUpdater.php', |
|
| 38 | + 'OCA\\TwoFactorBackupCodes\\Listener\\UserDeleted' => __DIR__.'/..'.'/../lib/Listener/UserDeleted.php', |
|
| 39 | + 'OCA\\TwoFactorBackupCodes\\Migration\\CheckBackupCodes' => __DIR__.'/..'.'/../lib/Migration/CheckBackupCodes.php', |
|
| 40 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170607104347' => __DIR__.'/..'.'/../lib/Migration/Version1002Date20170607104347.php', |
|
| 41 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170607113030' => __DIR__.'/..'.'/../lib/Migration/Version1002Date20170607113030.php', |
|
| 42 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170919123342' => __DIR__.'/..'.'/../lib/Migration/Version1002Date20170919123342.php', |
|
| 43 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170926101419' => __DIR__.'/..'.'/../lib/Migration/Version1002Date20170926101419.php', |
|
| 44 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20180821043638' => __DIR__.'/..'.'/../lib/Migration/Version1002Date20180821043638.php', |
|
| 45 | + 'OCA\\TwoFactorBackupCodes\\Notifications\\Notifier' => __DIR__.'/..'.'/../lib/Notifications/Notifier.php', |
|
| 46 | + 'OCA\\TwoFactorBackupCodes\\Provider\\BackupCodesProvider' => __DIR__.'/..'.'/../lib/Provider/BackupCodesProvider.php', |
|
| 47 | + 'OCA\\TwoFactorBackupCodes\\Service\\BackupCodeStorage' => __DIR__.'/..'.'/../lib/Service/BackupCodeStorage.php', |
|
| 48 | + 'OCA\\TwoFactorBackupCodes\\Settings\\Personal' => __DIR__.'/..'.'/../lib/Settings/Personal.php', |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | 51 | public static function getInitializer(ClassLoader $loader) |
| 52 | 52 | { |
| 53 | - return \Closure::bind(function () use ($loader) { |
|
| 53 | + return \Closure::bind(function() use ($loader) { |
|
| 54 | 54 | $loader->prefixLengthsPsr4 = ComposerStaticInitTwoFactorBackupCodes::$prefixLengthsPsr4; |
| 55 | 55 | $loader->prefixDirsPsr4 = ComposerStaticInitTwoFactorBackupCodes::$prefixDirsPsr4; |
| 56 | 56 | $loader->classMap = ComposerStaticInitTwoFactorBackupCodes::$classMap; |
@@ -6,29 +6,29 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
| 10 | - 'OCA\\TwoFactorBackupCodes\\Activity\\Provider' => $baseDir . '/../lib/Activity/Provider.php', |
|
| 11 | - 'OCA\\TwoFactorBackupCodes\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
| 12 | - 'OCA\\TwoFactorBackupCodes\\BackgroundJob\\CheckBackupCodes' => $baseDir . '/../lib/BackgroundJob/CheckBackupCodes.php', |
|
| 13 | - 'OCA\\TwoFactorBackupCodes\\BackgroundJob\\RememberBackupCodesJob' => $baseDir . '/../lib/BackgroundJob/RememberBackupCodesJob.php', |
|
| 14 | - 'OCA\\TwoFactorBackupCodes\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php', |
|
| 15 | - 'OCA\\TwoFactorBackupCodes\\Db\\BackupCode' => $baseDir . '/../lib/Db/BackupCode.php', |
|
| 16 | - 'OCA\\TwoFactorBackupCodes\\Db\\BackupCodeMapper' => $baseDir . '/../lib/Db/BackupCodeMapper.php', |
|
| 17 | - 'OCA\\TwoFactorBackupCodes\\Event\\CodesGenerated' => $baseDir . '/../lib/Event/CodesGenerated.php', |
|
| 18 | - 'OCA\\TwoFactorBackupCodes\\Listener\\ActivityPublisher' => $baseDir . '/../lib/Listener/ActivityPublisher.php', |
|
| 19 | - 'OCA\\TwoFactorBackupCodes\\Listener\\ClearNotifications' => $baseDir . '/../lib/Listener/ClearNotifications.php', |
|
| 20 | - 'OCA\\TwoFactorBackupCodes\\Listener\\ProviderDisabled' => $baseDir . '/../lib/Listener/ProviderDisabled.php', |
|
| 21 | - 'OCA\\TwoFactorBackupCodes\\Listener\\ProviderEnabled' => $baseDir . '/../lib/Listener/ProviderEnabled.php', |
|
| 22 | - 'OCA\\TwoFactorBackupCodes\\Listener\\RegistryUpdater' => $baseDir . '/../lib/Listener/RegistryUpdater.php', |
|
| 23 | - 'OCA\\TwoFactorBackupCodes\\Listener\\UserDeleted' => $baseDir . '/../lib/Listener/UserDeleted.php', |
|
| 24 | - 'OCA\\TwoFactorBackupCodes\\Migration\\CheckBackupCodes' => $baseDir . '/../lib/Migration/CheckBackupCodes.php', |
|
| 25 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170607104347' => $baseDir . '/../lib/Migration/Version1002Date20170607104347.php', |
|
| 26 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170607113030' => $baseDir . '/../lib/Migration/Version1002Date20170607113030.php', |
|
| 27 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170919123342' => $baseDir . '/../lib/Migration/Version1002Date20170919123342.php', |
|
| 28 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170926101419' => $baseDir . '/../lib/Migration/Version1002Date20170926101419.php', |
|
| 29 | - 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20180821043638' => $baseDir . '/../lib/Migration/Version1002Date20180821043638.php', |
|
| 30 | - 'OCA\\TwoFactorBackupCodes\\Notifications\\Notifier' => $baseDir . '/../lib/Notifications/Notifier.php', |
|
| 31 | - 'OCA\\TwoFactorBackupCodes\\Provider\\BackupCodesProvider' => $baseDir . '/../lib/Provider/BackupCodesProvider.php', |
|
| 32 | - 'OCA\\TwoFactorBackupCodes\\Service\\BackupCodeStorage' => $baseDir . '/../lib/Service/BackupCodeStorage.php', |
|
| 33 | - 'OCA\\TwoFactorBackupCodes\\Settings\\Personal' => $baseDir . '/../lib/Settings/Personal.php', |
|
| 9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
| 10 | + 'OCA\\TwoFactorBackupCodes\\Activity\\Provider' => $baseDir.'/../lib/Activity/Provider.php', |
|
| 11 | + 'OCA\\TwoFactorBackupCodes\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
| 12 | + 'OCA\\TwoFactorBackupCodes\\BackgroundJob\\CheckBackupCodes' => $baseDir.'/../lib/BackgroundJob/CheckBackupCodes.php', |
|
| 13 | + 'OCA\\TwoFactorBackupCodes\\BackgroundJob\\RememberBackupCodesJob' => $baseDir.'/../lib/BackgroundJob/RememberBackupCodesJob.php', |
|
| 14 | + 'OCA\\TwoFactorBackupCodes\\Controller\\SettingsController' => $baseDir.'/../lib/Controller/SettingsController.php', |
|
| 15 | + 'OCA\\TwoFactorBackupCodes\\Db\\BackupCode' => $baseDir.'/../lib/Db/BackupCode.php', |
|
| 16 | + 'OCA\\TwoFactorBackupCodes\\Db\\BackupCodeMapper' => $baseDir.'/../lib/Db/BackupCodeMapper.php', |
|
| 17 | + 'OCA\\TwoFactorBackupCodes\\Event\\CodesGenerated' => $baseDir.'/../lib/Event/CodesGenerated.php', |
|
| 18 | + 'OCA\\TwoFactorBackupCodes\\Listener\\ActivityPublisher' => $baseDir.'/../lib/Listener/ActivityPublisher.php', |
|
| 19 | + 'OCA\\TwoFactorBackupCodes\\Listener\\ClearNotifications' => $baseDir.'/../lib/Listener/ClearNotifications.php', |
|
| 20 | + 'OCA\\TwoFactorBackupCodes\\Listener\\ProviderDisabled' => $baseDir.'/../lib/Listener/ProviderDisabled.php', |
|
| 21 | + 'OCA\\TwoFactorBackupCodes\\Listener\\ProviderEnabled' => $baseDir.'/../lib/Listener/ProviderEnabled.php', |
|
| 22 | + 'OCA\\TwoFactorBackupCodes\\Listener\\RegistryUpdater' => $baseDir.'/../lib/Listener/RegistryUpdater.php', |
|
| 23 | + 'OCA\\TwoFactorBackupCodes\\Listener\\UserDeleted' => $baseDir.'/../lib/Listener/UserDeleted.php', |
|
| 24 | + 'OCA\\TwoFactorBackupCodes\\Migration\\CheckBackupCodes' => $baseDir.'/../lib/Migration/CheckBackupCodes.php', |
|
| 25 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170607104347' => $baseDir.'/../lib/Migration/Version1002Date20170607104347.php', |
|
| 26 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170607113030' => $baseDir.'/../lib/Migration/Version1002Date20170607113030.php', |
|
| 27 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170919123342' => $baseDir.'/../lib/Migration/Version1002Date20170919123342.php', |
|
| 28 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20170926101419' => $baseDir.'/../lib/Migration/Version1002Date20170926101419.php', |
|
| 29 | + 'OCA\\TwoFactorBackupCodes\\Migration\\Version1002Date20180821043638' => $baseDir.'/../lib/Migration/Version1002Date20180821043638.php', |
|
| 30 | + 'OCA\\TwoFactorBackupCodes\\Notifications\\Notifier' => $baseDir.'/../lib/Notifications/Notifier.php', |
|
| 31 | + 'OCA\\TwoFactorBackupCodes\\Provider\\BackupCodesProvider' => $baseDir.'/../lib/Provider/BackupCodesProvider.php', |
|
| 32 | + 'OCA\\TwoFactorBackupCodes\\Service\\BackupCodeStorage' => $baseDir.'/../lib/Service/BackupCodeStorage.php', |
|
| 33 | + 'OCA\\TwoFactorBackupCodes\\Settings\\Personal' => $baseDir.'/../lib/Settings/Personal.php', |
|
| 34 | 34 | ); |
@@ -44,23 +44,23 @@ |
||
| 44 | 44 | use OCP\User\Events\UserDeletedEvent; |
| 45 | 45 | |
| 46 | 46 | class Application extends App implements IBootstrap { |
| 47 | - public const APP_ID = 'twofactor_backupcodes'; |
|
| 47 | + public const APP_ID = 'twofactor_backupcodes'; |
|
| 48 | 48 | |
| 49 | - public function __construct() { |
|
| 50 | - parent::__construct(self::APP_ID); |
|
| 51 | - } |
|
| 49 | + public function __construct() { |
|
| 50 | + parent::__construct(self::APP_ID); |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - public function register(IRegistrationContext $context): void { |
|
| 54 | - $context->registerNotifierService(Notifier::class); |
|
| 53 | + public function register(IRegistrationContext $context): void { |
|
| 54 | + $context->registerNotifierService(Notifier::class); |
|
| 55 | 55 | |
| 56 | - $context->registerEventListener(CodesGenerated::class, ActivityPublisher::class); |
|
| 57 | - $context->registerEventListener(CodesGenerated::class, RegistryUpdater::class); |
|
| 58 | - $context->registerEventListener(CodesGenerated::class, ClearNotifications::class); |
|
| 59 | - $context->registerEventListener(IRegistry::EVENT_PROVIDER_ENABLED, ProviderEnabled::class); |
|
| 60 | - $context->registerEventListener(IRegistry::EVENT_PROVIDER_DISABLED, ProviderDisabled::class); |
|
| 61 | - $context->registerEventListener(UserDeletedEvent::class, UserDeleted::class); |
|
| 62 | - } |
|
| 56 | + $context->registerEventListener(CodesGenerated::class, ActivityPublisher::class); |
|
| 57 | + $context->registerEventListener(CodesGenerated::class, RegistryUpdater::class); |
|
| 58 | + $context->registerEventListener(CodesGenerated::class, ClearNotifications::class); |
|
| 59 | + $context->registerEventListener(IRegistry::EVENT_PROVIDER_ENABLED, ProviderEnabled::class); |
|
| 60 | + $context->registerEventListener(IRegistry::EVENT_PROVIDER_DISABLED, ProviderDisabled::class); |
|
| 61 | + $context->registerEventListener(UserDeletedEvent::class, UserDeleted::class); |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - public function boot(IBootContext $context): void { |
|
| 65 | - } |
|
| 64 | + public function boot(IBootContext $context): void { |
|
| 65 | + } |
|
| 66 | 66 | } |
@@ -33,18 +33,18 @@ |
||
| 33 | 33 | |
| 34 | 34 | class UserDeleted implements IEventListener { |
| 35 | 35 | |
| 36 | - /** @var BackupCodeMapper */ |
|
| 37 | - private $backupCodeMapper; |
|
| 36 | + /** @var BackupCodeMapper */ |
|
| 37 | + private $backupCodeMapper; |
|
| 38 | 38 | |
| 39 | - public function __construct(BackupCodeMapper $backupCodeMapper) { |
|
| 40 | - $this->backupCodeMapper = $backupCodeMapper; |
|
| 41 | - } |
|
| 39 | + public function __construct(BackupCodeMapper $backupCodeMapper) { |
|
| 40 | + $this->backupCodeMapper = $backupCodeMapper; |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - public function handle(Event $event): void { |
|
| 44 | - if (!($event instanceof UserDeletedEvent)) { |
|
| 45 | - return; |
|
| 46 | - } |
|
| 43 | + public function handle(Event $event): void { |
|
| 44 | + if (!($event instanceof UserDeletedEvent)) { |
|
| 45 | + return; |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - $this->backupCodeMapper->deleteCodes($event->getUser()); |
|
| 49 | - } |
|
| 48 | + $this->backupCodeMapper->deleteCodes($event->getUser()); |
|
| 49 | + } |
|
| 50 | 50 | } |