Skip to content

Commit

Permalink
MDL-78673 behat: Replace arrow function
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Jul 12, 2023
1 parent f716236 commit 6123ba6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grade/tests/behat/behat_grades.php
Expand Up @@ -58,7 +58,9 @@ protected function resolve_page_instance_url(string $type, string $identifier):
);

// This plugin is not in the list of plugins. Check the pluginname string.
$names = array_map(fn($name) => strtolower(get_string('pluginname', "gradereport_{$name}")), $plugins);
$names = array_map(function($name) {
return strtolower(get_string('pluginname', "gradereport_{$name}"));
}, $plugins);
$result = array_search($pluginname, $names);
if ($result === false) {
throw new \coding_exception("Unknown plugin '{$pluginname}'");
Expand Down

0 comments on commit 6123ba6

Please sign in to comment.