MDL-81521 core: Update all possibly data providers to be static
Note: Some data providers could not be automatically be converted to being static. These will be handled in a separate issue.
This commit is contained in:
@@ -97,14 +97,12 @@ class string_manager_standard_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_deprecated_strings_provider() {
|
||||
public static function get_deprecated_strings_provider(): array {
|
||||
global $CFG;
|
||||
|
||||
$teststringman = testable_core_string_manager::instance($CFG->langotherroot, $CFG->langlocalroot, array());
|
||||
$teststringman = testable_core_string_manager::instance($CFG->langotherroot, $CFG->langlocalroot, []);
|
||||
$allstrings = $teststringman->get_all_deprecated_strings();
|
||||
return array_map(function($string) {
|
||||
return [$string];
|
||||
}, $allstrings);
|
||||
return array_map(fn ($string): array => [$string], $allstrings);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user