From: Tim Düsterhus Date: Mon, 9 Nov 2020 12:41:59 +0000 (+0100) Subject: Add namespace to all functions and constants for multifactor forms X-Git-Tag: 5.4.0_Alpha_1~555^2~53^2~14 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eee1ff7db1f894ba65d56ef39c8502360318d975;p=GitHub%2FWoltLab%2FWCF.git Add namespace to all functions and constants for multifactor forms --- 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) {