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

Commit

Permalink
replace else with early return
Browse files Browse the repository at this point in the history
  • Loading branch information
pine3ree committed Jun 6, 2016
1 parent fd1dd3e commit 9e57490
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/View/HelperConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ public function configureServiceManager(ServiceManager $serviceManager)

if (method_exists($serviceManager, 'configure')) {
$serviceManager->configure($config);
} else {
foreach ($config['factories'] as $service => $factory) {
$serviceManager->setFactory($service, $factory);
}
foreach ($config['aliases'] as $alias => $target) {
$serviceManager->setAlias($alias, $target);
}
return $serviceManager;
}

foreach ($config['factories'] as $service => $factory) {
$serviceManager->setFactory($service, $factory);
}
foreach ($config['aliases'] as $alias => $target) {
$serviceManager->setAlias($alias, $target);
}

return $serviceManager;
Expand Down

0 comments on commit 9e57490

Please sign in to comment.