Code Duplication    Length = 7-9 lines in 2 locations

src/Zend/Config.php 2 locations

@@ 42-50 (lines=9) @@
39
        $this->injectAliases($injector, $dependencies);
40
    }
41
42
    private function injectAliases(Injector $injector, array $dependencies): void
43
    {
44
        $aliases = $dependencies['aliases'] ?? [];
45
        foreach ($aliases as $alias => $target) {
46
            // Standard Auryn aliases do not work when chained. Work around by
47
            // lazily fetching the shared target from the container.
48
            $injector->share($alias)->share($target)->delegate($alias, $this->makeContainerGet($target));
49
        }
50
    }
51
52
    private function injectFactories(Injector $injector, array $dependencies): void
53
    {
@@ 89-95 (lines=7) @@
86
        }
87
    }
88
89
    private function injectServices(Injector $injector, array $dependencies): void
90
    {
91
        $services = $dependencies['services'] ?? [];
92
        foreach ($services as $name => $service) {
93
            $injector->share($name)->delegate($name, $this->makeIdentity($service));
94
        }
95
    }
96
97
    private function makeDelegator(Injector $injector, string $name, callable $callback, array $delegators): callable
98
    {