Skip to content

Commit

Permalink
FIX: Outdated initialization code for $creationCallback (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxc-commons committed Mar 8, 2018
1 parent 2614fbc commit fb91cbe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,9 @@ private function createServiceFromDelegator($name, array $options = null)
$object = $creationCallback($this->creationContext, $name, $creationCallback, $options);
return $object;
}

$creationCallback = function () use ($name, $options) {
if ($this->factories[$name]) {
return $this->createServiceFromFactory($name, $options);
}
return $this->createServiceFromAbstractFactory($name, $options);
return $this->createServiceFromFactory($name, $options);
};

foreach ($this->delegators[$name] as $index => $delegatorFactory) {
Expand Down

0 comments on commit fb91cbe

Please sign in to comment.