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:
Andrew Nicols
2024-11-15 12:50:44 +08:00
parent e1d05182a6
commit c370c0cc5e
407 changed files with 1449 additions and 1430 deletions
+3 -5
View File
@@ -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);
}
/**