Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

use sm3 configure when possible #47

Merged
merged 3 commits into from Jun 7, 2016
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/View/HelperConfig.php
Expand Up @@ -74,12 +74,17 @@ class HelperConfig implements ConfigInterface
*/
public function configureServiceManager(ServiceManager $serviceManager)
{
foreach ($this->factories as $name => $factory) {
$serviceManager->setFactory($name, $factory);
}
foreach ($this->aliases as $alias => $target) {
$serviceManager->setAlias($alias, $target);
if (method_exists($serviceManager, 'configure')) {
$serviceManager->configure($this->toArray());
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early return

foreach ($this->factories as $name => $factory) {
$serviceManager->setFactory($name, $factory);
}
foreach ($this->aliases as $alias => $target) {
$serviceManager->setAlias($alias, $target);
}
}

return $serviceManager;
}

Expand Down