Code Duplication    Length = 9-9 lines in 2 locations

src/DependencyInjection/FOSElasticaExtension.php 2 locations

@@ 688-696 (lines=9) @@
685
    /**
686
     * Loads the index manager.
687
     **/
688
    private function loadIndexManager(ContainerBuilder $container): void
689
    {
690
        $indexRefs = array_map(function ($index) {
691
            return $index['reference'];
692
        }, $this->indexConfigs);
693
694
        $managerDef = $container->getDefinition('fos_elastica.index_manager');
695
        $managerDef->replaceArgument(0, $indexRefs);
696
    }
697
698
    /**
699
     * Load index template manager
@@ 701-709 (lines=9) @@
698
    /**
699
     * Load index template manager
700
     */
701
    private function loadIndexTemplateManager(ContainerBuilder $container): void
702
    {
703
        $indexTemplateRefs = array_map(function ($index) {
704
            return $index['reference'];
705
        }, $this->indexTemplateConfigs);
706
707
        $managerDef = $container->getDefinition('fos_elastica.index_template_manager');
708
        $managerDef->replaceArgument(0, $indexTemplateRefs);
709
    }
710
711
    /**
712
     * Makes sure a specific driver has been loaded.