Skip to content

Commit 8b23d3d

Browse files
minor #42490 More return type fixes (bis) (nicolas-grekas)
This PR was merged into the 5.4 branch. Discussion ---------- More return type fixes (bis) | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- c6a20b4e4d More return type fixes (bis)
2 parents 78c2120 + 907d16f commit 8b23d3d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Matcher/ExpressionLanguageProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ public function __construct(ServiceProviderInterface $functions)
3434
*/
3535
public function getFunctions()
3636
{
37+
$functions = [];
38+
3739
foreach ($this->functions->getProvidedServices() as $function => $type) {
38-
yield new ExpressionFunction(
40+
$functions[] = new ExpressionFunction(
3941
$function,
4042
static function (...$args) use ($function) {
4143
return sprintf('($context->getParameter(\'_functions\')->get(%s)(%s))', var_export($function, true), implode(', ', $args));
@@ -45,6 +47,8 @@ function ($values, ...$args) use ($function) {
4547
}
4648
);
4749
}
50+
51+
return $functions;
4852
}
4953

5054
public function get(string $function): callable

0 commit comments

Comments
 (0)