Fixed codechecker issues

This commit is contained in:
Andrew Hancox 2017-04-03 08:55:18 +01:00
parent 805e22e8e0
commit c1624f7d05
5 changed files with 8 additions and 1 deletions

View file

@ -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;
}

View file

@ -24,6 +24,8 @@
namespace auth_userkey;
defined('MOODLE_INTERNAL') || die();
/**
* Interface userkey_manager_interface describes key manager behaviour.
*

View file

@ -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");

View file

@ -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();

View file

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