Add namespace to all functions and constants for multifactor forms
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 9 Nov 2020 12:41:59 +0000 (13:41 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 16 Nov 2020 16:29:05 +0000 (17:29 +0100)
wcfsetup/install/files/lib/form/MultifactorAuthenticationForm.class.php
wcfsetup/install/files/lib/form/MultifactorManageForm.class.php

index 1bd63a6959d005baf6f781ca0cc67c8076263450..3af706d9dc8d6a97332bed4c4ea51619863cdd7e 100644 (file)
@@ -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();
        }
index 36e83a4fd7816ace3bdf97890831a4f8bb4d5703..471d5351fa230e786b8b1f936b3e899da6e7c768 100644 (file)
@@ -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) {