Code Duplication    Length = 8-8 lines in 2 locations

src/Routing/Loader/AnnotatedI18nRouteLoader.php 2 locations

@@ 156-163 (lines=8) @@
153
                        $collection->add($routeName, $route);
154
                    }
155
                } else {
156
                    foreach ($globals['locales'] as $locale => $localePrefix) {
157
                        $routeName = "{$name}.{$locale}";
158
                        $routePath = $localePrefix . $path;
159
                        $route = $this->createRoute($routePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition);
160
                        $this->configureRoute($route, $class, $method, $annotation);
161
                        $route->setDefault('_locale', $locale);
162
                        $collection->add($routeName, $route);
163
                    }
164
                }
165
            } else {
166
                if ($isLocalized) {
@@ 167-174 (lines=8) @@
164
                }
165
            } else {
166
                if ($isLocalized) {
167
                    foreach ($locales as $locale => $localePath) {
168
                        $routePath = $globals['path'] . $localePath;
169
                        $routeName = "{$name}.{$locale}";
170
                        $route = $this->createRoute($routePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition);
171
                        $this->configureRoute($route, $class, $method, $annotation);
172
                        $route->setDefault('_locale', $locale);
173
                        $collection->add($routeName, $route);
174
                    }
175
                } else {
176
                    $routePath = $globals['path'] . $path;
177
                    $route = $this->createRoute($routePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition);