Code Duplication    Length = 4-5 lines in 2 locations

src/DependencyInjection/FOSElasticaExtension.php 2 locations

@@ 191-195 (lines=5) @@
188
                'name' => $name,
189
            ]);
190
191
            if (isset($index['client'])) {
192
                $client = $this->getClient($index['client']);
193
194
                $indexDef->setFactory([$client, 'getIndex']);
195
            }
196
197
            $container->setDefinition($indexId, $indexDef);
198
            $reference = new Reference($indexId);
@@ 252-255 (lines=4) @@
249
                'name' => $name,
250
            ));
251
252
            if (isset($indexTemplate['client'])) {
253
                $client = $this->getClient($indexTemplate['client']);
254
                $indexDef->setFactory([$client, 'getIndexTemplate']);
255
            }
256
257
            $container->setDefinition($indexId, $indexDef);
258
            $reference = new Reference($indexId);