Code Duplication    Length = 6-6 lines in 2 locations

Controller/TwigExceptionController.php 2 locations

@@ 55-60 (lines=6) @@
52
        // For error pages, try to find a template for the specific HTTP status code and format
53
        if (!$showException) {
54
            $template = sprintf('@Twig/Exception/%s%s.%s.twig', $name, $statusCode, $format);
55
            if (
56
                ($this->templating instanceof EngineInterface && $this->templating->exists($template)) ||
57
                ($this->templating instanceof Environment && $this->templateExists($template))
58
            ) {
59
                return $template;
60
            }
61
        }
62
63
        // try to find a template for the given format
@@ 65-70 (lines=6) @@
62
63
        // try to find a template for the given format
64
        $template = sprintf('@Twig/Exception/%s.%s.twig', $name, $format);
65
        if (
66
            ($this->templating instanceof EngineInterface && $this->templating->exists($template)) ||
67
            ($this->templating instanceof Environment && $this->templateExists($template))
68
        ) {
69
            return $template;
70
        }
71
72
        // default to a generic HTML exception
73
        $request->setRequestFormat('html');