From eee1ff7db1f894ba65d56ef39c8502360318d975 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 9 Nov 2020 13:41:59 +0100 Subject: [PATCH] Add namespace to all functions and constants for multifactor forms --- .../files/lib/form/MultifactorAuthenticationForm.class.php | 6 +++--- .../install/files/lib/form/MultifactorManageForm.class.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php b/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php index 1bd63a6959..3af706d9dc 100644 --- a/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php +++ b/wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php @@ -72,11 +72,11 @@ class MultifactorAuthenticationForm extends AbstractFormBuilderForm { throw new \LogicException('Unreachable'); } - uasort($this->methods, function (ObjectType $a, ObjectType $b) { + \uasort($this->methods, function (ObjectType $a, ObjectType $b) { return $b->priority <=> $a->priority; }); - $this->setupId = array_keys($this->methods)[0]; + $this->setupId = \array_keys($this->methods)[0]; if (isset($_GET['id'])) { $this->setupId = $_GET['id']; } @@ -86,7 +86,7 @@ class MultifactorAuthenticationForm extends AbstractFormBuilderForm { } $this->method = $this->methods[$this->setupId]; - assert($this->method->getDefinition()->definitionName === 'com.woltlab.wcf.multifactor'); + \assert($this->method->getDefinition()->definitionName === 'com.woltlab.wcf.multifactor'); $this->processor = $this->method->getProcessor(); } diff --git a/wcfsetup/install/files/lib/form/MultifactorManageForm.class.php b/wcfsetup/install/files/lib/form/MultifactorManageForm.class.php index 36e83a4fd7..471d5351fa 100644 --- a/wcfsetup/install/files/lib/form/MultifactorManageForm.class.php +++ b/wcfsetup/install/files/lib/form/MultifactorManageForm.class.php @@ -109,7 +109,7 @@ class MultifactorManageForm extends AbstractFormBuilderForm { $this->setupId, ]); - $setupId = intval($statement->fetchSingleColumn()); + $setupId = \intval($statement->fetchSingleColumn()); } else { $sql = "INSERT INTO wcf".WCF_N."_user_multifactor @@ -121,7 +121,7 @@ class MultifactorManageForm extends AbstractFormBuilderForm { $this->method->objectTypeID, ]); - $setupId = intval(WCF::getDB()->getInsertID("wcf".WCF_N."_user_multifactor", 'setupID')); + $setupId = \intval(WCF::getDB()->getInsertID("wcf".WCF_N."_user_multifactor", 'setupID')); } if (!$setupId) { -- 2.20.1