Skip to content

Commit 5524e1c

Browse files
authored
Merge pull request #83 from catalyst/more-ci
More ci fixes
2 parents 39949b5 + 4ab1cdc commit 5524e1c

6 files changed

+9
-3
lines changed

auth.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function loginpage_hook() {
112112
* @throws \moodle_exception If gets running via CLI or AJAX call.
113113
*/
114114
protected function redirect($url) {
115-
if (CLI_SCRIPT or AJAX_SCRIPT) {
115+
if (CLI_SCRIPT || AJAX_SCRIPT) {
116116
throw new moodle_exception('redirecterrordetected', 'auth_userkey', '', $url);
117117
}
118118

classes/core_userkey_manager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function validate_key($keyvalue) {
117117
throw new \moodle_exception('invalidkey');
118118
}
119119

120-
if (!empty($key->validuntil) and $key->validuntil < time()) {
120+
if (!empty($key->validuntil) && $key->validuntil < time()) {
121121
throw new \moodle_exception('expiredkey');
122122
}
123123

tests/auth_plugin_test.php

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
/**
2727
* Tests for auth_plugin_userkey class.
2828
*
29+
* @covers \auth_plugin_userkey
30+
*
2931
* @package auth_userkey
3032
* @copyright 2016 Dmitrii Metelkin ([email protected])
3133
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

tests/core_userkey_manager_test.php

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* Key validation is fully covered in auth_plugin_test.php file.
2323
* TODO: write tests for validate_key() function.
2424
*
25+
* @covers \auth_userkey\core_userkey_manager
26+
*
2527
* @package auth_userkey
2628
* @copyright 2016 Dmitrii Metelkin ([email protected])
2729
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

tests/externallib_test.php

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
/**
2828
* Tests for externallib.php.
2929
*
30+
* @covers \auth_userkey_external
31+
*
3032
* @package auth_userkey
3133
* @copyright 2016 Dmitrii Metelkin ([email protected])
3234
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
defined('MOODLE_INTERNAL') || die;
2626

27-
$plugin->version = 2022081900; // The current plugin version (Date: YYYYMMDDXX)
27+
$plugin->version = 2022081900; // The current plugin version (Date: YYYYMMDDXX).
2828
$plugin->release = 2022081900; // Match release exactly to version.
2929
$plugin->requires = 2017051500; // Requires Moodle 3.3 version.
3030
$plugin->component = 'auth_userkey'; // Full name of the plugin (used for diagnostics).

0 commit comments

Comments
 (0)