aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/TwoFactorAuth
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-06-26 14:54:51 +0200
committerJoas Schilling <coding@schilljs.com>2020-06-26 14:54:51 +0200
commitab21d69903c4360cbce59741624b6e765e3bd35f (patch)
tree8bed2d6af0d4bfef3766e356acc570b93eb9feb3 /core/Command/TwoFactorAuth
parented4afa55c1ccaef140ac310258ad837bf6af9557 (diff)
downloadnextcloud-server-ab21d69903c4360cbce59741624b6e765e3bd35f.tar.gz
nextcloud-server-ab21d69903c4360cbce59741624b6e765e3bd35f.zip
Add return value to all commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Command/TwoFactorAuth')
-rw-r--r--core/Command/TwoFactorAuth/Cleanup.php3
-rw-r--r--core/Command/TwoFactorAuth/Disable.php2
-rw-r--r--core/Command/TwoFactorAuth/Enable.php2
-rw-r--r--core/Command/TwoFactorAuth/Enforce.php3
-rw-r--r--core/Command/TwoFactorAuth/State.php2
5 files changed, 7 insertions, 5 deletions
diff --git a/core/Command/TwoFactorAuth/Cleanup.php b/core/Command/TwoFactorAuth/Cleanup.php
index ac9dceef343..1ff7e16c5e0 100644
--- a/core/Command/TwoFactorAuth/Cleanup.php
+++ b/core/Command/TwoFactorAuth/Cleanup.php
@@ -50,11 +50,12 @@ class Cleanup extends Base {
$this->addArgument('provider-id', InputArgument::REQUIRED);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$providerId = $input->getArgument('provider-id');
$this->registry->cleanUp($providerId);
$output->writeln("<info>All user-provider associations for provider <options=bold>$providerId</> have been removed.</info>");
+ return 0;
}
}
diff --git a/core/Command/TwoFactorAuth/Disable.php b/core/Command/TwoFactorAuth/Disable.php
index 128699a3970..b4f1b1b2822 100644
--- a/core/Command/TwoFactorAuth/Disable.php
+++ b/core/Command/TwoFactorAuth/Disable.php
@@ -52,7 +52,7 @@ class Disable extends Base {
$this->addArgument('provider_id', InputArgument::REQUIRED);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$uid = $input->getArgument('uid');
$providerId = $input->getArgument('provider_id');
$user = $this->userManager->get($uid);
diff --git a/core/Command/TwoFactorAuth/Enable.php b/core/Command/TwoFactorAuth/Enable.php
index d979768f182..37ef08c2fa3 100644
--- a/core/Command/TwoFactorAuth/Enable.php
+++ b/core/Command/TwoFactorAuth/Enable.php
@@ -52,7 +52,7 @@ class Enable extends Base {
$this->addArgument('provider_id', InputArgument::REQUIRED);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$uid = $input->getArgument('uid');
$providerId = $input->getArgument('provider_id');
$user = $this->userManager->get($uid);
diff --git a/core/Command/TwoFactorAuth/Enforce.php b/core/Command/TwoFactorAuth/Enforce.php
index 7f3ceb9694c..0174fcc76fb 100644
--- a/core/Command/TwoFactorAuth/Enforce.php
+++ b/core/Command/TwoFactorAuth/Enforce.php
@@ -74,7 +74,7 @@ class Enforce extends Command {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
if ($input->getOption('on')) {
$enforcedGroups = $input->getOption('group');
$excludedGroups = $input->getOption('exclude');
@@ -89,6 +89,7 @@ class Enforce extends Command {
} else {
$this->writeNotEnforced($output);
}
+ return 0;
}
/**
diff --git a/core/Command/TwoFactorAuth/State.php b/core/Command/TwoFactorAuth/State.php
index 438a272223f..5784853d60a 100644
--- a/core/Command/TwoFactorAuth/State.php
+++ b/core/Command/TwoFactorAuth/State.php
@@ -52,7 +52,7 @@ class State extends Base {
$this->addArgument('uid', InputArgument::REQUIRED);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$uid = $input->getArgument('uid');
$user = $this->userManager->get($uid);
if (is_null($user)) {