Code Duplication    Length = 9-9 lines in 2 locations

src/DependencyInjection/FOSElasticaExtension.php 2 locations

@@ 665-673 (lines=9) @@
662
    /**
663
     * Loads the index manager.
664
     **/
665
    private function loadIndexManager(ContainerBuilder $container): void
666
    {
667
        $indexRefs = array_map(function ($index) {
668
            return $index['reference'];
669
        }, $this->indexConfigs);
670
671
        $managerDef = $container->getDefinition('fos_elastica.index_manager');
672
        $managerDef->replaceArgument(0, $indexRefs);
673
    }
674
675
    /**
676
     * Load index template manager
@@ 678-686 (lines=9) @@
675
    /**
676
     * Load index template manager
677
     */
678
    private function loadIndexTemplateManager(ContainerBuilder $container): void
679
    {
680
        $indexTemplateRefs = array_map(function ($index) {
681
            return $index['reference'];
682
        }, $this->indexTemplateConfigs);
683
684
        $managerDef = $container->getDefinition('fos_elastica.index_template_manager');
685
        $managerDef->replaceArgument(0, $indexTemplateRefs);
686
    }
687
688
    /**
689
     * Makes sure a specific driver has been loaded.