Passed
Push — master ( da9ad9...c724eb )
by Roeland
13:33 queued 01:55
created
lib/public/Federation/ICloudFederationProviderManager.php 1 patch
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -32,76 +32,76 @@
 block discarded – undo
32 32
  */
33 33
 interface ICloudFederationProviderManager {
34 34
 
35
-	/**
36
-	 * Registers an callback function which must return an cloud federation provider
37
-	 *
38
-	 * @param string $resourceType which resource type does the provider handles
39
-	 * @param string $displayName user facing name of the federated share provider
40
-	 * @param callable $callback
41
-	 * @throws Exceptions\ProviderAlreadyExistsException
42
-	 *
43
-	 * @since 14.0.0
44
-	 */
45
-	public function addCloudFederationProvider($resourceType, $displayName, callable $callback);
35
+    /**
36
+     * Registers an callback function which must return an cloud federation provider
37
+     *
38
+     * @param string $resourceType which resource type does the provider handles
39
+     * @param string $displayName user facing name of the federated share provider
40
+     * @param callable $callback
41
+     * @throws Exceptions\ProviderAlreadyExistsException
42
+     *
43
+     * @since 14.0.0
44
+     */
45
+    public function addCloudFederationProvider($resourceType, $displayName, callable $callback);
46 46
 
47
-	/**
48
-	 * remove cloud federation provider
49
-	 *
50
-	 * @param string $resourceType
51
-	 *
52
-	 * @since 14.0.0
53
-	 */
54
-	public function removeCloudFederationProvider($resourceType);
47
+    /**
48
+     * remove cloud federation provider
49
+     *
50
+     * @param string $resourceType
51
+     *
52
+     * @since 14.0.0
53
+     */
54
+    public function removeCloudFederationProvider($resourceType);
55 55
 
56
-	/**
57
-	 * get a list of all cloudFederationProviders
58
-	 *
59
-	 * @return array [resourceType => ['resourceType' => $resourceType, 'displayName' => $displayName, 'callback' => callback]]
60
-	 *
61
-	 * @since 14.0.0
62
-	 */
63
-	public function getAllCloudFederationProviders();
56
+    /**
57
+     * get a list of all cloudFederationProviders
58
+     *
59
+     * @return array [resourceType => ['resourceType' => $resourceType, 'displayName' => $displayName, 'callback' => callback]]
60
+     *
61
+     * @since 14.0.0
62
+     */
63
+    public function getAllCloudFederationProviders();
64 64
 
65
-	/**
66
-	 * get a specific cloud federation provider
67
-	 *
68
-	 * @param string $resourceType
69
-	 * @return ICloudFederationProvider
70
-	 * @throws Exceptions\ProviderDoesNotExistsException
71
-	 *
72
-	 * @since 14.0.0
73
-	 */
74
-	public function getCloudFederationProvider($resourceType);
65
+    /**
66
+     * get a specific cloud federation provider
67
+     *
68
+     * @param string $resourceType
69
+     * @return ICloudFederationProvider
70
+     * @throws Exceptions\ProviderDoesNotExistsException
71
+     *
72
+     * @since 14.0.0
73
+     */
74
+    public function getCloudFederationProvider($resourceType);
75 75
 
76
-	/**
77
-	 * send federated share
78
-	 *
79
-	 * @param ICloudFederationShare $share
80
-	 * @return mixed
81
-	 *
82
-	 * @since 14.0.0
83
-	 */
84
-	public function sendShare(ICloudFederationShare $share);
76
+    /**
77
+     * send federated share
78
+     *
79
+     * @param ICloudFederationShare $share
80
+     * @return mixed
81
+     *
82
+     * @since 14.0.0
83
+     */
84
+    public function sendShare(ICloudFederationShare $share);
85 85
 
86
-	/**
87
-	 * send notification about existing share
88
-	 *
89
-	 * @param string $url
90
-	 * @param ICloudFederationNotification $notification
91
-	 * @return mixed
92
-	 *
93
-	 * @since 14.0.0
94
-	 */
95
-	public function sendNotification($url, ICloudFederationNotification $notification);
86
+    /**
87
+     * send notification about existing share
88
+     *
89
+     * @param string $url
90
+     * @param ICloudFederationNotification $notification
91
+     * @return mixed
92
+     *
93
+     * @since 14.0.0
94
+     */
95
+    public function sendNotification($url, ICloudFederationNotification $notification);
96 96
 
97
-	/**
98
-	 * check if the new cloud federation API is ready to be used
99
-	 *
100
-	 * @return bool
101
-	 *
102
-	 * @since 14.0.0
103
-	 */
104
-	public function isReady();
97
+    /**
98
+     * check if the new cloud federation API is ready to be used
99
+     *
100
+     * @return bool
101
+     *
102
+     * @since 14.0.0
103
+     */
104
+    public function isReady();
105 105
 
106 106
 
107 107
 }
Please login to merge, or discard this patch.
core/Command/TwoFactorAuth/Cleanup.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -33,29 +33,29 @@
 block discarded – undo
33 33
 
34 34
 class Cleanup extends Base {
35 35
 
36
-	/** @var IRegistry */
37
-	private $registry;
36
+    /** @var IRegistry */
37
+    private $registry;
38 38
 
39
-	public function __construct(IRegistry $registry) {
40
-		parent::__construct();
39
+    public function __construct(IRegistry $registry) {
40
+        parent::__construct();
41 41
 
42
-		$this->registry = $registry;
43
-	}
42
+        $this->registry = $registry;
43
+    }
44 44
 
45
-	protected function configure() {
46
-		parent::configure();
45
+    protected function configure() {
46
+        parent::configure();
47 47
 
48
-		$this->setName('twofactorauth:cleanup');
49
-		$this->setDescription('Clean up the two-factor user-provider association of an uninstalled/removed provider');
50
-		$this->addArgument('provider-id', InputArgument::REQUIRED);
51
-	}
48
+        $this->setName('twofactorauth:cleanup');
49
+        $this->setDescription('Clean up the two-factor user-provider association of an uninstalled/removed provider');
50
+        $this->addArgument('provider-id', InputArgument::REQUIRED);
51
+    }
52 52
 
53
-	protected function execute(InputInterface $input, OutputInterface $output) {
54
-		$providerId = $input->getArgument('provider-id');
53
+    protected function execute(InputInterface $input, OutputInterface $output) {
54
+        $providerId = $input->getArgument('provider-id');
55 55
 
56
-		$this->registry->cleanUp($providerId);
56
+        $this->registry->cleanUp($providerId);
57 57
 
58
-		$output->writeln("<info>All user-provider associations for provider <options=bold>$providerId</> have been removed.</info>");
59
-	}
58
+        $output->writeln("<info>All user-provider associations for provider <options=bold>$providerId</> have been removed.</info>");
59
+    }
60 60
 
61 61
 }
Please login to merge, or discard this patch.
core/Command/TwoFactorAuth/Disable.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -32,42 +32,42 @@
 block discarded – undo
32 32
 
33 33
 class Disable extends Base {
34 34
 
35
-	/** @var ProviderManager */
36
-	private $manager;
35
+    /** @var ProviderManager */
36
+    private $manager;
37 37
 
38
-	/** @var IUserManager */
39
-	protected $userManager;
38
+    /** @var IUserManager */
39
+    protected $userManager;
40 40
 
41
-	public function __construct(ProviderManager $manager, IUserManager $userManager) {
42
-		parent::__construct('twofactorauth:disable');
43
-		$this->manager = $manager;
44
-		$this->userManager = $userManager;
45
-	}
41
+    public function __construct(ProviderManager $manager, IUserManager $userManager) {
42
+        parent::__construct('twofactorauth:disable');
43
+        $this->manager = $manager;
44
+        $this->userManager = $userManager;
45
+    }
46 46
 
47
-	protected function configure() {
48
-		parent::configure();
47
+    protected function configure() {
48
+        parent::configure();
49 49
 
50
-		$this->setName('twofactorauth:disable');
51
-		$this->setDescription('Disable two-factor authentication for a user');
52
-		$this->addArgument('uid', InputArgument::REQUIRED);
53
-		$this->addArgument('provider_id', InputArgument::REQUIRED);
54
-	}
50
+        $this->setName('twofactorauth:disable');
51
+        $this->setDescription('Disable two-factor authentication for a user');
52
+        $this->addArgument('uid', InputArgument::REQUIRED);
53
+        $this->addArgument('provider_id', InputArgument::REQUIRED);
54
+    }
55 55
 
56
-	protected function execute(InputInterface $input, OutputInterface $output) {
57
-		$uid = $input->getArgument('uid');
58
-		$providerId = $input->getArgument('provider_id');
59
-		$user = $this->userManager->get($uid);
60
-		if (is_null($user)) {
61
-			$output->writeln("<error>Invalid UID</error>");
62
-			return 1;
63
-		}
64
-		if ($this->manager->tryDisableProviderFor($providerId, $user)) {
65
-			$output->writeln("Two-factor provider <options=bold>$providerId</> disabled for user <options=bold>$uid</>.");
66
-			return 0;
67
-		} else {
68
-			$output->writeln("<error>The provider does not support this operation.</error>");
69
-			return 2;
70
-		}
71
-	}
56
+    protected function execute(InputInterface $input, OutputInterface $output) {
57
+        $uid = $input->getArgument('uid');
58
+        $providerId = $input->getArgument('provider_id');
59
+        $user = $this->userManager->get($uid);
60
+        if (is_null($user)) {
61
+            $output->writeln("<error>Invalid UID</error>");
62
+            return 1;
63
+        }
64
+        if ($this->manager->tryDisableProviderFor($providerId, $user)) {
65
+            $output->writeln("Two-factor provider <options=bold>$providerId</> disabled for user <options=bold>$uid</>.");
66
+            return 0;
67
+        } else {
68
+            $output->writeln("<error>The provider does not support this operation.</error>");
69
+            return 2;
70
+        }
71
+    }
72 72
 
73 73
 }
Please login to merge, or discard this patch.
core/Command/TwoFactorAuth/Enable.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -31,42 +31,42 @@
 block discarded – undo
31 31
 
32 32
 class Enable extends Base {
33 33
 
34
-	/** @var ProviderManager */
35
-	private $manager;
34
+    /** @var ProviderManager */
35
+    private $manager;
36 36
 
37
-	/** @var IUserManager */
38
-	protected $userManager;
37
+    /** @var IUserManager */
38
+    protected $userManager;
39 39
 
40
-	public function __construct(ProviderManager $manager, IUserManager $userManager) {
41
-		parent::__construct('twofactorauth:enable');
42
-		$this->manager = $manager;
43
-		$this->userManager = $userManager;
44
-	}
40
+    public function __construct(ProviderManager $manager, IUserManager $userManager) {
41
+        parent::__construct('twofactorauth:enable');
42
+        $this->manager = $manager;
43
+        $this->userManager = $userManager;
44
+    }
45 45
 
46
-	protected function configure() {
47
-		parent::configure();
46
+    protected function configure() {
47
+        parent::configure();
48 48
 
49
-		$this->setName('twofactorauth:enable');
50
-		$this->setDescription('Enable two-factor authentication for a user');
51
-		$this->addArgument('uid', InputArgument::REQUIRED);
52
-		$this->addArgument('provider_id', InputArgument::REQUIRED);
53
-	}
49
+        $this->setName('twofactorauth:enable');
50
+        $this->setDescription('Enable two-factor authentication for a user');
51
+        $this->addArgument('uid', InputArgument::REQUIRED);
52
+        $this->addArgument('provider_id', InputArgument::REQUIRED);
53
+    }
54 54
 
55
-	protected function execute(InputInterface $input, OutputInterface $output) {
56
-		$uid = $input->getArgument('uid');
57
-		$providerId = $input->getArgument('provider_id');
58
-		$user = $this->userManager->get($uid);
59
-		if (is_null($user)) {
60
-			$output->writeln("<error>Invalid UID</error>");
61
-			return 1;
62
-		}
63
-		if ($this->manager->tryEnableProviderFor($providerId, $user)) {
64
-			$output->writeln("Two-factor provider <options=bold>$providerId</> enabled for user <options=bold>$uid</>.");
65
-			return 0;
66
-		} else {
67
-			$output->writeln("<error>The provider does not support this operation.</error>");
68
-			return 2;
69
-		}
70
-	}
55
+    protected function execute(InputInterface $input, OutputInterface $output) {
56
+        $uid = $input->getArgument('uid');
57
+        $providerId = $input->getArgument('provider_id');
58
+        $user = $this->userManager->get($uid);
59
+        if (is_null($user)) {
60
+            $output->writeln("<error>Invalid UID</error>");
61
+            return 1;
62
+        }
63
+        if ($this->manager->tryEnableProviderFor($providerId, $user)) {
64
+            $output->writeln("Two-factor provider <options=bold>$providerId</> enabled for user <options=bold>$uid</>.");
65
+            return 0;
66
+        } else {
67
+            $output->writeln("<error>The provider does not support this operation.</error>");
68
+            return 2;
69
+        }
70
+    }
71 71
 
72 72
 }
Please login to merge, or discard this patch.
lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -34,22 +34,22 @@
 block discarded – undo
34 34
  */
35 35
 interface IProvidesIcons extends IProvider {
36 36
 
37
-	/**
38
-	 * Get the path to the light (white) icon of this provider
39
-	 *
40
-	 * @return String
41
-	 *
42
-	 * @since 15.0.0
43
-	 */
44
-	public function getLightIcon(): String;
37
+    /**
38
+     * Get the path to the light (white) icon of this provider
39
+     *
40
+     * @return String
41
+     *
42
+     * @since 15.0.0
43
+     */
44
+    public function getLightIcon(): String;
45 45
 
46
-	/**
47
-	 * Get the path to the dark (black) icon of this provider
48
-	 *
49
-	 * @return String
50
-	 *
51
-	 * @since 15.0.0
52
-	 */
53
-	public function getDarkIcon(): String;
46
+    /**
47
+     * Get the path to the dark (black) icon of this provider
48
+     *
49
+     * @return String
50
+     *
51
+     * @since 15.0.0
52
+     */
53
+    public function getDarkIcon(): String;
54 54
 
55 55
 }
Please login to merge, or discard this patch.
apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,19 +30,19 @@
 block discarded – undo
30 30
 
31 31
 class CheckBackupCodes implements IRepairStep {
32 32
 
33
-	/** @var IJobList */
34
-	private $jobList;
33
+    /** @var IJobList */
34
+    private $jobList;
35 35
 
36
-	public function __construct(IJobList $jobList) {
37
-		$this->jobList = $jobList;
38
-	}
36
+    public function __construct(IJobList $jobList) {
37
+        $this->jobList = $jobList;
38
+    }
39 39
 
40
-	public function getName(): string {
41
-		return 'Add background job to check for backup codes';
42
-	}
40
+    public function getName(): string {
41
+        return 'Add background job to check for backup codes';
42
+    }
43 43
 
44
-	public function run(IOutput $output) {
45
-		$this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class);
46
-	}
44
+    public function run(IOutput $output) {
45
+        $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class);
46
+    }
47 47
 
48 48
 }
Please login to merge, or discard this patch.
lib/public/Authentication/TwoFactorAuth/IPersonalProviderSettings.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@
 block discarded – undo
33 33
  */
34 34
 interface IPersonalProviderSettings {
35 35
 
36
-	/**
37
-	 * @return Template
38
-	 *
39
-	 * @since 15.0.0
40
-	 */
41
-	public function getBody(): Template;
36
+    /**
37
+     * @return Template
38
+     *
39
+     * @since 15.0.0
40
+     */
41
+    public function getBody(): Template;
42 42
 
43 43
 }
Please login to merge, or discard this patch.
lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
  */
36 36
 interface IProvidesPersonalSettings extends IProvider {
37 37
 
38
-	/**
39
-	 * @param IUser $user
40
-	 *
41
-	 * @return IPersonalProviderSettings
42
-	 *
43
-	 * @since 15.0.0
44
-	 */
45
-	public function getPersonalSettings(IUser $user): IPersonalProviderSettings;
38
+    /**
39
+     * @param IUser $user
40
+     *
41
+     * @return IPersonalProviderSettings
42
+     *
43
+     * @since 15.0.0
44
+     */
45
+    public function getPersonalSettings(IUser $user): IPersonalProviderSettings;
46 46
 
47 47
 }
Please login to merge, or discard this patch.
core/templates/twofactorshowchallenge.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
 	<?php if (!is_null($_['backupProvider'])): ?>
25 25
 	<p>
26 26
 		<a class="two-factor-secondary" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
27
-			[
28
-				'challengeProviderId' => $_['backupProvider']->getId(),
29
-				'redirect_url' => $_['redirect_url'],
30
-			]
31
-		)) ?>">
27
+            [
28
+                'challengeProviderId' => $_['backupProvider']->getId(),
29
+                'redirect_url' => $_['redirect_url'],
30
+            ]
31
+        )) ?>">
32 32
 			<?php p($l->t('Use backup code')) ?>
33 33
 		</a>
34 34
 	</p>
Please login to merge, or discard this patch.