Fixed codechecker issues
This commit is contained in:
parent
805e22e8e0
commit
c1624f7d05
5 changed files with 8 additions and 1 deletions
2
auth.php
2
auth.php
|
@ -347,7 +347,7 @@ class auth_plugin_userkey extends auth_plugin_base {
|
|||
|
||||
$requiredfieds = ['username', 'email', 'firstname', 'lastname'];
|
||||
$missingfields = [];
|
||||
foreach($requiredfieds as $requiredfied) {
|
||||
foreach ($requiredfieds as $requiredfied) {
|
||||
if (empty($user[$requiredfied])) {
|
||||
$missingfields[] = $requiredfied;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
namespace auth_userkey;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Interface userkey_manager_interface describes key manager behaviour.
|
||||
*
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
require_once($CFG->libdir . "/externallib.php");
|
||||
require_once($CFG->dirroot . "/webservice/lib.php");
|
||||
require_once($CFG->dirroot . "/auth/userkey/auth.php");
|
||||
|
|
|
@ -52,6 +52,7 @@ class auth_plugin_userkey_testcase extends advanced_testcase {
|
|||
require_once($CFG->libdir . "/externallib.php");
|
||||
require_once($CFG->dirroot . '/auth/userkey/tests/fake_userkey_manager.php');
|
||||
require_once($CFG->dirroot . '/auth/userkey/auth.php');
|
||||
require_once($CFG->dirroot . '/user/lib.php');
|
||||
|
||||
$this->auth = new auth_plugin_userkey();
|
||||
$this->user = self::getDataGenerator()->create_user();
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
namespace auth_userkey;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
class fake_userkey_manager implements userkey_manager_interface {
|
||||
|
||||
|
|
Loading…
Reference in a new issue