Skip to content

Commit

Permalink
Merge pull request #85 from samsonasik/update-to-latest-php81-syntax
Browse files Browse the repository at this point in the history
Update to use latest PHP 8.1 syntax
  • Loading branch information
arhimede authored Nov 20, 2024
2 parents b9037ab + 203e50f commit 3555f3e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Runner/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ public function setConfig($config)
}

foreach ($config as $key => $val) {
$methodName = 'set' . implode(array_map(static fn($value): string => ucfirst($value), explode('_', $key)));
$methodName = 'set' . implode(
'',
array_map(static fn($value): string => ucfirst($value), explode('_', $key))
);

if (! is_callable([$this, $methodName])) {
throw new BadMethodCallException('Unknown config parameter ' . $key);
Expand Down

0 comments on commit 3555f3e

Please sign in to comment.