diff options
Diffstat (limited to 'core/Command/TwoFactorAuth/State.php')
-rw-r--r-- | core/Command/TwoFactorAuth/State.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/Command/TwoFactorAuth/State.php b/core/Command/TwoFactorAuth/State.php index 5f658e30507..5120080cfb3 100644 --- a/core/Command/TwoFactorAuth/State.php +++ b/core/Command/TwoFactorAuth/State.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at> * * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Joas Schilling <coding@schilljs.com> * * @license GNU AGPL version 3 or any later version * @@ -16,14 +17,13 @@ declare(strict_types=1); * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - namespace OC\Core\Command\TwoFactorAuth; use OCP\Authentication\TwoFactorAuth\IRegistry; @@ -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)) { @@ -62,7 +62,7 @@ class State extends Base { $providerStates = $this->registry->getProviderStates($user); $filtered = $this->filterEnabledDisabledUnknownProviders($providerStates); - list ($enabled, $disabled) = $filtered; + [$enabled, $disabled] = $filtered; if (!empty($enabled)) { $output->writeln("Two-factor authentication is enabled for user $uid"); @@ -104,5 +104,4 @@ class State extends Base { $output->writeln("- " . $provider); } } - } |