Code Duplication    Length = 12-12 lines in 2 locations

src/App/Application.php 2 locations

@@ 172-183 (lines=12) @@
169
        try {
170
            $routeInfo = $this['app.router']->dispatch($request->getMethod(), $request->getUri());
171
            switch ($routeInfo[0]) {
172
                case \FastRoute\Dispatcher::NOT_FOUND:
173
                    return new Response(
174
                        $this['twig']->render(
175
                            'Error\\index.html.twig',
176
                            [
177
                                'code' => 404,
178
                                'message' => 'Not Found',
179
                            ]
180
                        ),
181
                        Response::HTTP_NOT_FOUND,
182
                        ['Content-Type' => 'text/html; charset=UTF-8']
183
                    );
184
                case \FastRoute\Dispatcher::METHOD_NOT_ALLOWED:
185
                    return new Response(
186
                        $this['twig']->render(
@@ 184-195 (lines=12) @@
181
                        Response::HTTP_NOT_FOUND,
182
                        ['Content-Type' => 'text/html; charset=UTF-8']
183
                    );
184
                case \FastRoute\Dispatcher::METHOD_NOT_ALLOWED:
185
                    return new Response(
186
                        $this['twig']->render(
187
                            'Error\\index.html.twig',
188
                            [
189
                                'code' => 405,
190
                                'message' => 'Not Allowed',
191
                            ]
192
                        ),
193
                        Response::HTTP_METHOD_NOT_ALLOWED,
194
                        ['Content-Type' => 'text/html; charset=UTF-8']
195
                    );
196
                case \FastRoute\Dispatcher::FOUND:
197
                default:
198
                    $handler = $routeInfo[1];