Code Duplication    Length = 9-9 lines in 2 locations

src/DependencyInjection/FOSElasticaExtension.php 2 locations

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