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 88a8b20 commit e6fcc1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grade/tests/behat/behat_grades.php
Original file line number Diff line number Diff line change
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 e6fcc1e

Please sign in to comment.