Code Duplication    Length = 9-9 lines in 2 locations

src/DependencyInjection/FOSElasticaExtension.php 2 locations

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