Skip to content

Commit

Permalink
[Routing] Fix Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyweb committed Jun 5, 2023
1 parent c2ac11e commit 56bfc13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Matcher/Dumper/CompiledUrlMatcherDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ private function generateCompiledRoutes(): string
foreach ($staticRoutes as $path => $routes) {
$code .= sprintf(" %s => [\n", self::export($path));
foreach ($routes as $route) {
$code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route));
$r = array_map([__CLASS__, 'export'], $route);
$code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", $r[0], $r[1], $r[2], $r[3], $r[4], $r[5], $r[6]);
}
$code .= " ],\n";
}
Expand All @@ -151,7 +152,8 @@ private function generateCompiledRoutes(): string
foreach ($dynamicRoutes as $path => $routes) {
$code .= sprintf(" %s => [\n", self::export($path));
foreach ($routes as $route) {
$code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", ...array_map([__CLASS__, 'export'], $route));
$r = array_map([__CLASS__, 'export'], $route);
$code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", $r[0], $r[1], $r[2], $r[3], $r[4], $r[5], $r[6]);
}
$code .= " ],\n";
}
Expand Down

0 comments on commit 56bfc13

Please sign in to comment.