private function compiledRouteHttpMethodMatch(
        PHPCodeCollection $code,
        MatchedRouteDataMap $routeDataMap,
        array $parameters
    ): void {
        $code->appendLine('switch ($method) {');

        $code->indent++;

        foreach ($routeDataMap->getHttpMethodRouteDataMap() as $item) {
            [$httpMethods, $routeData] = $item;

            foreach ($httpMethods as $httpMethod) {
                $code->appendLine('case \'' . $httpMethod . '\':');
            }

            $code->indent++;

            $this->compileFoundRoute($code, $routeData, $parameters);

            $code->indent--;
        }

        $code->appendLine('default:');

        $code->indent++;

        foreach ($routeDataMap->allowedHttpMethods() as $method) {
            $code->appendLine('$allowedHttpMethods[] = \'' . $method . '\';');
        }

        $code->appendLine('break;');

        $code->indent--;
        $code->indent--;

        $code->appendLine('}');
    }