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->makeLazy($target));
49
        }
50
    }
51
52
    private function injectFactories(Injector $injector, array $dependencies): void
53
    {
@@ 85-91 (lines=7) @@
82
        }
83
    }
84
85
    private function injectServices(Injector $injector, array $dependencies): void
86
    {
87
        $services = $dependencies['services'] ?? [];
88
        foreach ($services as $name => $service) {
89
            $injector->share($name)->delegate($name, $this->makeIdentity($service));
90
        }
91
    }
92
93
    private function makeDelegator(Injector $injector, string $name, callable $callback, array $delegators): callable
94
    {