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

Commit

Permalink
Merge branch 'cs/various-things' of https://github.com/Maks3w/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
* @package Zend_ServiceManager
* @subpackage Exception
*/
class InvalidArgumentException extends \InvalidArgumentException implements
class InvalidArgumentException extends \InvalidArgumentException implements
ExceptionInterface
{}
4 changes: 2 additions & 2 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public function get($name, $usePeeringServiceManagers = true)
if (!$instance) {
if ($this->canCreate(array($cName, $rName))) {
$instance = $this->create(array($cName, $rName));
} else if ($usePeeringServiceManagers && !$retrieveFromPeeringManagerFirst) {
} elseif ($usePeeringServiceManagers && !$retrieveFromPeeringManagerFirst) {
$instance = $this->retrieveFromPeeringManager($name);
}
}
Expand Down Expand Up @@ -787,7 +787,7 @@ protected function createFromAbstractFactory($canonicalName, $requestedName)
// support factories as strings
if (is_string($abstractFactory) && class_exists($abstractFactory, true)) {
$this->abstractFactories[$index] = $abstractFactory = new $abstractFactory;
} else if (!$abstractFactory instanceof AbstractFactoryInterface) {
} elseif (!$abstractFactory instanceof AbstractFactoryInterface) {
throw new Exception\ServiceNotCreatedException(sprintf(
'While attempting to create %s%s an abstract factory could not produce a valid instance.',
$canonicalName,
Expand Down
3 changes: 1 addition & 2 deletions test/ServiceManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,7 @@ public function testDoNotFallbackToAbstractFactory()
public function testAssignAliasWithExistingServiceName()
{
$this->serviceManager->setFactory('foo', 'ZendTest\ServiceManager\TestAsset\FooFactory');
$this->serviceManager->setFactory('bar', function ($sm)
{
$this->serviceManager->setFactory('bar', function ($sm) {
return new Bar(array('a'));
});
$this->serviceManager->setAllowOverride(false);
Expand Down
4 changes: 2 additions & 2 deletions test/TestAsset/Bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class Bar
{
public function __construct(array $foo) {

public function __construct(array $foo)
{
}
}

0 comments on commit 67c3033

Please sign in to comment.