Skip to content

Commit 4f9cbec

Browse files
authored
Merge pull request #114 from MagnusSamuelsson/fix/ci-warnings
Fix codechecker issues so CI passes
2 parents 1cdfbfc + 7d0c117 commit 4f9cbec

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

auth.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ protected function get_mapping_parameter() {
529529
];
530530
break;
531531

532-
533532
default:
534533
$parameter = [];
535534
break;

classes/privacy/provider.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
namespace auth_userkey\privacy;
2727

2828
use core_privacy\local\metadata\null_provider;
29-
use core_privacy\local\legacy_polyfill;
3029

3130
/**
3231
* Privacy provider.
@@ -35,15 +34,13 @@
3534
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3635
*/
3736
class provider implements null_provider {
38-
use legacy_polyfill;
39-
4037
/**
4138
* Get the language string identifier with the component's language
4239
* file to explain why this plugin stores no data.
4340
*
4441
* @return string
4542
*/
46-
public static function _get_reason() {
43+
public static function get_reason(): string {
4744
return 'privacy:metadata';
4845
}
4946
}

tests/auth_plugin_test.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,9 @@ public function test_that_user_gets_redirected_to_external_wantsurl(): void {
896896
$_POST['wantsurl'] = 'http://test.com/course/index.php?id=12&key=134';
897897

898898
$this->expectException(moodle_exception::class);
899-
$this->expectExceptionMessage('Unsupported redirect to http://test.com/course/index.php?id=12&key=134 detected, execution terminated');
899+
$this->expectExceptionMessage(
900+
'Unsupported redirect to http://test.com/course/index.php?id=12&key=134 detected, execution terminated'
901+
);
900902

901903
// Using @ is the only way to test this. Thanks moodle!
902904
@$this->auth->user_login_userkey();

tests/core_userkey_manager_test.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,12 @@ public function setUp(): void {
6464
* @return void
6565
* @throws \dml_exception
6666
*/
67-
private function validate_iprestriction(string $allowips = '', string $script = 'auth/userkey', ?string $iprestriction = null,
68-
int $keylifetime = 60): void {
67+
private function validate_iprestriction(
68+
string $allowips = '',
69+
string $script = 'auth/userkey',
70+
?string $iprestriction = null,
71+
int $keylifetime = 60
72+
): void {
6973
global $DB;
7074
$manager = new core_userkey_manager($this->config);
7175
if ($allowips) {

0 commit comments

Comments
 (0)