Code Duplication    Length = 15-15 lines in 2 locations

src/Eccube/Twig/Extension/IgnoreRoutingNotFoundExtension.php 2 locations

@@ 40-54 (lines=15) @@
37
        ];
38
    }
39
40
    public function getPath(string $name, array $parameters = [], bool $relative = false): string
41
    {
42
        if ($this->containerBag->get('kernel.debug')) {
43
            return $this->routingExtension->getPath($name, $parameters, $relative);
44
        }
45
46
        try {
47
            return $this->routingExtension->getPath($name, $parameters, $relative);
48
        } catch (RouteNotFoundException $e) {
49
            // FIXME log関数でエラーになるので, 修正されたらコメントアウトをはずす
50
            // log_warning($e->getMessage(), ['exception' => $e]);
51
52
            return $this->routingExtension->getPath('homepage') . '404?bind=' . $name;
53
        }
54
    }
55
56
    public function getUrl(string $name, array $parameters = [], bool $schemeRelative = false): string
57
    {
@@ 56-70 (lines=15) @@
53
        }
54
    }
55
56
    public function getUrl(string $name, array $parameters = [], bool $schemeRelative = false): string
57
    {
58
        if ($this->containerBag->get('kernel.debug')) {
59
            return $this->routingExtension->getUrl($name, $parameters, $schemeRelative);
60
        }
61
62
        try {
63
            return $this->routingExtension->getUrl($name, $parameters, $schemeRelative);
64
        } catch (RouteNotFoundException $e) {
65
            // FIXME log関数でエラーになるので, 修正されたらコメントアウトをはずす
66
            // log_warning($e->getMessage(), ['exception' => $e]);
67
68
            return $this->routingExtension->getUrl('homepage', $parameters, $schemeRelative) . '404?bind=' . $name;
69
        }
70
    }
71
72
    public function isUrlGenerationSafe(Node $argsNode): array
73
    {