mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
MDL-78942 tool_mfa: replace deprecated coding standards annotation.
Replace with equivalent `phpcs` annotation as appropriate, same as
done previously in a5c91474ee
(see that commit for further context).
This commit is contained in:
parent
7b9a4eeca5
commit
23552e4c84
3 changed files with 6 additions and 7 deletions
|
@ -76,10 +76,11 @@ class verification_field extends \MoodleQuickForm_text {
|
||||||
return parent::__construct($elementname, $elementlabel, $attributes);
|
return parent::__construct($elementname, $elementlabel, $attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @codingStandardsIgnoreStart
|
|
||||||
/**
|
/**
|
||||||
* Returns HTML for this form element.
|
* Returns HTML for this form element.
|
||||||
*
|
*
|
||||||
|
* phpcs:disable moodle.NamingConventions.ValidFunctionName.LowercaseMethod
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function toHtml(): string {
|
public function toHtml(): string {
|
||||||
|
@ -101,7 +102,6 @@ class verification_field extends \MoodleQuickForm_text {
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
// @codingStandardsIgnoreEnd
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup and return the script for autosubmission while inside the secure layout.
|
* Setup and return the script for autosubmission while inside the secure layout.
|
||||||
|
|
|
@ -349,12 +349,10 @@ class manager {
|
||||||
try {
|
try {
|
||||||
// Clear locked user factors, they may now reauth with anything.
|
// Clear locked user factors, they may now reauth with anything.
|
||||||
@$DB->set_field('tool_mfa', 'lockcounter', 0, ['userid' => $USER->id]);
|
@$DB->set_field('tool_mfa', 'lockcounter', 0, ['userid' => $USER->id]);
|
||||||
// @codingStandardsIgnoreStart
|
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// This occurs when upgrade.php hasn't been run. Nothing to do here.
|
// This occurs when upgrade.php hasn't been run. Nothing to do here.
|
||||||
// Coding standards ignored, they break on empty catches.
|
|
||||||
}
|
}
|
||||||
// @codingStandardsIgnoreEnd
|
|
||||||
|
|
||||||
// Fire post pass state factor actions.
|
// Fire post pass state factor actions.
|
||||||
$factors = factor::get_active_user_factor_types();
|
$factors = factor::get_active_user_factor_types();
|
||||||
|
|
|
@ -22,13 +22,14 @@
|
||||||
* @copyright Catalyst IT
|
* @copyright Catalyst IT
|
||||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Ignore coding standards for login check, this page does not require login.
|
// Ignore coding standards for login check, this page does not require login.
|
||||||
// @codingStandardsIgnoreStart
|
// phpcs:disable moodle.Files.RequireLogin.Missing
|
||||||
require_once(__DIR__ . '/../../../../../config.php');
|
require_once(__DIR__ . '/../../../../../config.php');
|
||||||
|
|
||||||
$instanceid = required_param('instance', PARAM_INT);
|
$instanceid = required_param('instance', PARAM_INT);
|
||||||
$pass = optional_param('pass', '0', PARAM_INT);
|
$pass = optional_param('pass', '0', PARAM_INT);
|
||||||
$secret = optional_param('secret', 0, PARAM_INT);
|
$secret = optional_param('secret', 0, PARAM_INT);
|
||||||
// @codingStandardsIgnoreEnds
|
|
||||||
|
|
||||||
$context = context_system::instance();
|
$context = context_system::instance();
|
||||||
$PAGE->set_context($context);
|
$PAGE->set_context($context);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue