Permalink
Browse files

code cleaning

  • Loading branch information...
1 parent 8d42203 commit 04c1081affd861bdd2c27a3f55b7035e1663164e @stefanotorresi committed Sep 30, 2013
Showing with 7 additions and 14 deletions.
  1. +7 −14 library/Zend/ServiceManager/ServiceManager.php
@@ -1059,22 +1059,15 @@ protected function createDelegatorFromFactory($canonicalName, $requestedName)
));
}
- // add additional callbacks for every delegatorFactory but the last
- if ($delegatorsCount > 1 && $i != $delegatorsCount - 1) {
- $creationCallback = $this->createDelegatorCallback(
- $delegatorFactory,
- $requestedName,
- $canonicalName,
- $creationCallback
- );
- }
+ $creationCallback = $this->createDelegatorCallback(
+ $delegatorFactory,
+ $requestedName,
+ $canonicalName,
+ $creationCallback
+ );
}
- $delegator = $delegatorFactory instanceof DelegatorFactoryInterface
- ? $delegatorFactory->createDelegatorWithName($serviceManager, $canonicalName, $requestedName, $creationCallback)
- : $delegatorFactory($serviceManager, $canonicalName, $requestedName, $creationCallback);
-
- return $delegator;
+ return $creationCallback($serviceManager, $canonicalName, $requestedName, $creationCallback);
}
/**

0 comments on commit 04c1081

Please sign in to comment.