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:
@@ -76,10 +76,11 @@ class verification_field extends \MoodleQuickForm_text {
|
||||
return parent::__construct($elementname, $elementlabel, $attributes);
|
||||
}
|
||||
|
||||
// @codingStandardsIgnoreStart
|
||||
/**
|
||||
* Returns HTML for this form element.
|
||||
*
|
||||
* phpcs:disable moodle.NamingConventions.ValidFunctionName.LowercaseMethod
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHtml(): string {
|
||||
@@ -101,7 +102,6 @@ class verification_field extends \MoodleQuickForm_text {
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
/**
|
||||
* Setup and return the script for autosubmission while inside the secure layout.
|
||||
|
||||
@@ -349,12 +349,10 @@ class manager {
|
||||
try {
|
||||
// Clear locked user factors, they may now reauth with anything.
|
||||
@$DB->set_field('tool_mfa', 'lockcounter', 0, ['userid' => $USER->id]);
|
||||
// @codingStandardsIgnoreStart
|
||||
// phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch
|
||||
} catch (\Exception $e) {
|
||||
// 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.
|
||||
$factors = factor::get_active_user_factor_types();
|
||||
|
||||
@@ -22,13 +22,14 @@
|
||||
* @copyright Catalyst IT
|
||||
* @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.
|
||||
// @codingStandardsIgnoreStart
|
||||
// phpcs:disable moodle.Files.RequireLogin.Missing
|
||||
require_once(__DIR__ . '/../../../../../config.php');
|
||||
|
||||
$instanceid = required_param('instance', PARAM_INT);
|
||||
$pass = optional_param('pass', '0', PARAM_INT);
|
||||
$secret = optional_param('secret', 0, PARAM_INT);
|
||||
// @codingStandardsIgnoreEnds
|
||||
|
||||
$context = context_system::instance();
|
||||
$PAGE->set_context($context);
|
||||
|
||||
Reference in New Issue
Block a user