Skip to content

Commit

Permalink
Merge pull request laminas#43 from GeeH/geeh/laminas#3-hotfix-from-ol…
Browse files Browse the repository at this point in the history
…d-repo
  • Loading branch information
boesing committed Dec 2, 2020
1 parent 103e560 commit f476f7e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use ProxyManager\GeneratorStrategy\FileWriterGeneratorStrategy;

use function array_intersect;
use function array_merge_recursive;
use function class_exists;
use function get_class;
use function gettype;
Expand Down Expand Up @@ -754,13 +753,13 @@ private function createLazyServiceDelegatorFactory()
private function mergeDelegators(array $config)
{
foreach ($config as $key => $delegators) {
if (!isset($this->delegators[$key])) {
if (! array_key_exists($key, $this->delegators)) {
$this->delegators[$key] = $delegators;
continue;
}

foreach ($delegators as $delegator) {
if (!in_array($delegator, $this->delegators[$key], true)) {
if (! in_array($delegator, $this->delegators[$key], true)) {
$this->delegators[$key][] = $delegator;
}
}
Expand Down

0 comments on commit f476f7e

Please sign in to comment.