src/Viserio/Component/Routing/TreeGenerator/RouteTreeCompiler.php
private function compileFoundRoute(PHPCodeCollection $code, array $foundRoute, array $parameterExpressions): void
    {
        $parameters = '[';

        foreach ($foundRoute[0] as $index => $parameterName) {
            $parameters .= '\'' . $parameterName . '\' => ' . $parameterExpressions[$index] . ', ';
        }

        if (\strlen($parameters) > 2) {
            $parameters = \substr($parameters, 0, -2);
        }

        $parameters .= ']';

        $code->appendLine(
            'return ['
            . DispatcherContract::FOUND
            . ', '
            . '\'' . $foundRoute[1] . '\''
            . ', '
            . $parameters
            . '];'
        );
    }
private function compileFoundRoute(PHPCodeCollection $code, array $foundRoute, array $parameterExpressions): void
    {
        $parameters = '[';

        foreach ($foundRoute[0] as $index => $parameterName) {
            $parameters .= '\'' . $parameterName . '\' => ' . $parameterExpressions[$index] . ', ';
        }

        if (\strlen($parameters) > 2) {
            $parameters = \substr($parameters, 0, -2);
        }

        $parameters .= ']';

        $code->appendLine(
            'return ['
            . DispatcherContract::FOUND
            . ', '
            . '\'' . $foundRoute[1] . '\''
            . ', '
            . $parameters
            . '];'
        );
    }
Compile the found route data.

@param \Viserio\Component\Routing\TreeGenerator\PHPCodeCollection $code
@param array                                                      $foundRoute
@param array                                                      $parameterExpressions