Fix codechecker errors

This commit is contained in:
Anupama Dharmajan 2022-01-17 08:44:01 +11:00
parent 502564a88c
commit f77ac17111
11 changed files with 5 additions and 23 deletions

View file

@ -24,8 +24,6 @@
namespace auth_userkey; namespace auth_userkey;
defined('MOODLE_INTERNAL') || die;
class core_userkey_manager implements userkey_manager_interface { class core_userkey_manager implements userkey_manager_interface {
/** /**

View file

@ -25,8 +25,6 @@
namespace auth_userkey\privacy; namespace auth_userkey\privacy;
defined('MOODLE_INTERNAL') || die;
use core_privacy\local\metadata\null_provider; use core_privacy\local\metadata\null_provider;
use core_privacy\local\legacy_polyfill; use core_privacy\local\legacy_polyfill;

View file

@ -24,8 +24,6 @@
namespace auth_userkey; namespace auth_userkey;
defined('MOODLE_INTERNAL') || die();
/** /**
* Interface userkey_manager_interface describes key manager behaviour. * Interface userkey_manager_interface describes key manager behaviour.
* *
@ -60,4 +58,4 @@ interface userkey_manager_interface {
*/ */
public function validate_key($keyvalue); public function validate_key($keyvalue);
} }

View file

@ -22,8 +22,6 @@
* @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
*/ */
defined('MOODLE_INTERNAL') || die;
function xmldb_auth_userkey_upgrade($oldversion) { function xmldb_auth_userkey_upgrade($oldversion) {
global $DB; global $DB;

View file

@ -28,4 +28,4 @@ if (!is_enabled_auth('userkey')) {
print_error(get_string('pluginisdisabled', 'auth_userkey')); print_error(get_string('pluginisdisabled', 'auth_userkey'));
} }
get_auth_plugin('userkey')->user_login_userkey(); get_auth_plugin('userkey')->user_login_userkey();

View file

@ -28,4 +28,4 @@ if (!is_enabled_auth('userkey')) {
print_error(get_string('pluginisdisabled', 'auth_userkey')); print_error(get_string('pluginisdisabled', 'auth_userkey'));
} }
get_auth_plugin('userkey')->user_logout_userkey(); get_auth_plugin('userkey')->user_logout_userkey();

View file

@ -22,8 +22,6 @@
* @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
*/ */
defined('MOODLE_INTERNAL') || die();
/** /**
* Tests for auth_plugin_userkey class. * Tests for auth_plugin_userkey class.
* *

View file

@ -22,8 +22,6 @@
* @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
*/ */
defined('MOODLE_INTERNAL') || die();
use auth_userkey\core_userkey_manager; use auth_userkey\core_userkey_manager;
/** /**

View file

@ -22,9 +22,6 @@
* @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
*/ */
defined('MOODLE_INTERNAL') || die();
class auth_userkey_externallib_testcase extends advanced_testcase { class auth_userkey_externallib_testcase extends advanced_testcase {
/** /**
* User object. * User object.

View file

@ -24,9 +24,6 @@
namespace auth_userkey; namespace auth_userkey;
defined('MOODLE_INTERNAL') || die();
class fake_userkey_manager implements userkey_manager_interface { class fake_userkey_manager implements userkey_manager_interface {
public function create_key($userid, $allowedips = null) { public function create_key($userid, $allowedips = null) {
@ -40,4 +37,4 @@ class fake_userkey_manager implements userkey_manager_interface {
public function validate_key($keyvalue) { public function validate_key($keyvalue) {
// TODO: Implement validate_key() method. // TODO: Implement validate_key() method.
} }
} }

View file

@ -29,4 +29,4 @@ $plugin->release = 2022011600; // Match release exactly to version.
$plugin->requires = 2017051500; // Requires Moodle 3.3 version. $plugin->requires = 2017051500; // Requires Moodle 3.3 version.
$plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics). $plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE; $plugin->maturity = MATURITY_STABLE;
$plugin->supported = [33, 311]; // A range of branch numbers of supported moodle versions. $plugin->supported = [33, 311]; // A range of branch numbers of supported moodle versions.