diff --git a/auth.php b/auth.php index 0131068..2a18096 100644 --- a/auth.php +++ b/auth.php @@ -529,7 +529,6 @@ protected function get_mapping_parameter() { ]; break; - default: $parameter = []; break; diff --git a/classes/privacy/provider.php b/classes/privacy/provider.php index 6f1d6ba..76246bc 100644 --- a/classes/privacy/provider.php +++ b/classes/privacy/provider.php @@ -26,7 +26,6 @@ namespace auth_userkey\privacy; use core_privacy\local\metadata\null_provider; -use core_privacy\local\legacy_polyfill; /** * Privacy provider. @@ -35,15 +34,13 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider implements null_provider { - use legacy_polyfill; - /** * Get the language string identifier with the component's language * file to explain why this plugin stores no data. * * @return string */ - public static function _get_reason() { + public static function get_reason(): string { return 'privacy:metadata'; } } diff --git a/tests/auth_plugin_test.php b/tests/auth_plugin_test.php index 566f897..6457821 100644 --- a/tests/auth_plugin_test.php +++ b/tests/auth_plugin_test.php @@ -896,7 +896,9 @@ public function test_that_user_gets_redirected_to_external_wantsurl(): void { $_POST['wantsurl'] = 'http://test.com/course/index.php?id=12&key=134'; $this->expectException(moodle_exception::class); - $this->expectExceptionMessage('Unsupported redirect to http://test.com/course/index.php?id=12&key=134 detected, execution terminated'); + $this->expectExceptionMessage( + 'Unsupported redirect to http://test.com/course/index.php?id=12&key=134 detected, execution terminated' + ); // Using @ is the only way to test this. Thanks moodle! @$this->auth->user_login_userkey(); diff --git a/tests/core_userkey_manager_test.php b/tests/core_userkey_manager_test.php index a09e265..1487081 100644 --- a/tests/core_userkey_manager_test.php +++ b/tests/core_userkey_manager_test.php @@ -64,8 +64,12 @@ public function setUp(): void { * @return void * @throws \dml_exception */ - private function validate_iprestriction(string $allowips = '', string $script = 'auth/userkey', ?string $iprestriction = null, - int $keylifetime = 60): void { + private function validate_iprestriction( + string $allowips = '', + string $script = 'auth/userkey', + ?string $iprestriction = null, + int $keylifetime = 60 + ): void { global $DB; $manager = new core_userkey_manager($this->config); if ($allowips) {