Code Duplication    Length = 8-8 lines in 2 locations

src/Routing/Loader/AnnotatedI18nRouteLoader.php 2 locations

@@ 171-178 (lines=8) @@
168
                        $collection->add($routeName, $route);
169
                    }
170
                } else {
171
                    foreach ($globals['locales'] as $locale => $localePrefix) {
172
                        $routeName = "{$name}.{$locale}";
173
                        $routePath = $localePrefix . $path;
174
                        $route = $this->createRoute($routePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition);
175
                        $this->configureRoute($route, $class, $method, $annotation);
176
                        $route->setDefault('_locale', $locale);
177
                        $collection->add($routeName, $route);
178
                    }
179
                }
180
            } else {
181
                if ($isLocalized) {
@@ 182-189 (lines=8) @@
179
                }
180
            } else {
181
                if ($isLocalized) {
182
                    foreach ($locales as $locale => $localePath) {
183
                        $routePath = $globals['path'] . $localePath;
184
                        $routeName = "{$name}.{$locale}";
185
                        $route = $this->createRoute($routePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition);
186
                        $this->configureRoute($route, $class, $method, $annotation);
187
                        $route->setDefault('_locale', $locale);
188
                        $collection->add($routeName, $route);
189
                    }
190
                } else {
191
                    $routePath = $globals['path'] . $path;
192
                    $route = $this->createRoute($routePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition);