aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/TwoFactorAuth
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/TwoFactorAuth')
-rw-r--r--core/Command/TwoFactorAuth/Base.php1
-rw-r--r--core/Command/TwoFactorAuth/Disable.php4
-rw-r--r--core/Command/TwoFactorAuth/Enable.php4
-rw-r--r--core/Command/TwoFactorAuth/State.php12
4 files changed, 11 insertions, 10 deletions
diff --git a/core/Command/TwoFactorAuth/Base.php b/core/Command/TwoFactorAuth/Base.php
index 70e33bfd23c..034ea36afca 100644
--- a/core/Command/TwoFactorAuth/Base.php
+++ b/core/Command/TwoFactorAuth/Base.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/core/Command/TwoFactorAuth/Disable.php b/core/Command/TwoFactorAuth/Disable.php
index aeb3854fc60..c60c1245735 100644
--- a/core/Command/TwoFactorAuth/Disable.php
+++ b/core/Command/TwoFactorAuth/Disable.php
@@ -38,14 +38,14 @@ class Disable extends Base {
$providerId = $input->getArgument('provider_id');
$user = $this->userManager->get($uid);
if (is_null($user)) {
- $output->writeln("<error>Invalid UID</error>");
+ $output->writeln('<error>Invalid UID</error>');
return 1;
}
if ($this->manager->tryDisableProviderFor($providerId, $user)) {
$output->writeln("Two-factor provider <options=bold>$providerId</> disabled for user <options=bold>$uid</>.");
return 0;
} else {
- $output->writeln("<error>The provider does not support this operation.</error>");
+ $output->writeln('<error>The provider does not support this operation.</error>');
return 2;
}
}
diff --git a/core/Command/TwoFactorAuth/Enable.php b/core/Command/TwoFactorAuth/Enable.php
index fac44d11374..215cb31397e 100644
--- a/core/Command/TwoFactorAuth/Enable.php
+++ b/core/Command/TwoFactorAuth/Enable.php
@@ -38,14 +38,14 @@ class Enable extends Base {
$providerId = $input->getArgument('provider_id');
$user = $this->userManager->get($uid);
if (is_null($user)) {
- $output->writeln("<error>Invalid UID</error>");
+ $output->writeln('<error>Invalid UID</error>');
return 1;
}
if ($this->manager->tryEnableProviderFor($providerId, $user)) {
$output->writeln("Two-factor provider <options=bold>$providerId</> enabled for user <options=bold>$uid</>.");
return 0;
} else {
- $output->writeln("<error>The provider does not support this operation.</error>");
+ $output->writeln('<error>The provider does not support this operation.</error>');
return 2;
}
}
diff --git a/core/Command/TwoFactorAuth/State.php b/core/Command/TwoFactorAuth/State.php
index 19a859695c1..ab2e8f2aecf 100644
--- a/core/Command/TwoFactorAuth/State.php
+++ b/core/Command/TwoFactorAuth/State.php
@@ -37,7 +37,7 @@ class State extends Base {
$uid = $input->getArgument('uid');
$user = $this->userManager->get($uid);
if (is_null($user)) {
- $output->writeln("<error>Invalid UID</error>");
+ $output->writeln('<error>Invalid UID</error>');
return 1;
}
@@ -51,9 +51,9 @@ class State extends Base {
$output->writeln("Two-factor authentication is not enabled for user $uid");
}
- $output->writeln("");
- $this->printProviders("Enabled providers", $enabled, $output);
- $this->printProviders("Disabled providers", $disabled, $output);
+ $output->writeln('');
+ $this->printProviders('Enabled providers', $enabled, $output);
+ $this->printProviders('Disabled providers', $disabled, $output);
return 0;
}
@@ -80,9 +80,9 @@ class State extends Base {
return;
}
- $output->writeln($title . ":");
+ $output->writeln($title . ':');
foreach ($providers as $provider) {
- $output->writeln("- " . $provider);
+ $output->writeln('- ' . $provider);
}
}
}