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

Commit

Permalink
[#3424] CS fixes
Browse files Browse the repository at this point in the history
- Trailing whitespace
- whitespace following operators
  • Loading branch information
weierophinney committed Jan 14, 2013
1 parent b9d1977 commit bef0ba6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion library/Zend/ServiceManager/ServiceManager.php
Expand Up @@ -425,7 +425,7 @@ public function get($name, $usePeeringServiceManagers = true)
if ($usePeeringServiceManagers && $retrieveFromPeeringManagerFirst) {
$instance = $this->retrieveFromPeeringManager($name);

if(null !== $instance) {
if (null !== $instance) {
return $instance;
}
}
Expand Down
36 changes: 18 additions & 18 deletions tests/ZendTest/ServiceManager/ServiceManagerTest.php
Expand Up @@ -699,7 +699,7 @@ public function testRetrieveServiceFromPeeringServiceManagerIfretrieveFromPeerin
$this->assertEquals($serviceManagerChild->get($foo1), $boo2);
$this->assertEquals($this->serviceManager->get($foo1), $boo2);
}

/**
* @covers Zend\ServiceManager\ServiceManager::setService
* @covers Zend\ServiceManager\ServiceManager::get
Expand All @@ -713,15 +713,15 @@ public function testParentServiceManagerCanCreateServiceWithSameNameThatAlreadyU

$this->serviceManager->setService($foo1, $boo1);
$this->assertEquals($this->serviceManager->get($foo1), $boo1);

$serviceManagerParent = $this->serviceManager->createScopedServiceManager();

$this->assertContains($this->serviceManager, $this->readAttribute($serviceManagerParent, 'peeringServiceManagers'));

$serviceManagerParent->setService($foo1, $boo2);
$this->assertEquals($serviceManagerParent->get($foo1), $boo2);
}

/**
* @covers Zend\ServiceManager\ServiceManager::setInvokableClass
* @covers Zend\ServiceManager\ServiceManager::get
Expand All @@ -732,18 +732,18 @@ public function testParentServiceManagerCanCreateInvokableServiceWithSameNameTha
$foo1 = "foo1";
$boo1 = "ZendTest\ServiceManager\TestAsset\Foo";
$boo2 = "\stdClass";

$this->serviceManager->setInvokableClass($foo1, $boo1);
$this->assertInstanceOf($boo1, $this->serviceManager->get($foo1));

$serviceManagerParent = $this->serviceManager->createScopedServiceManager();

$this->assertContains($this->serviceManager, $this->readAttribute($serviceManagerParent, 'peeringServiceManagers'));

$serviceManagerParent->setInvokableClass($foo1, $boo2);
$this->assertInstanceOf($boo2, $serviceManagerParent->get($foo1));
}

/**
* @covers Zend\ServiceManager\ServiceManager::setFactory
* @covers Zend\ServiceManager\ServiceManager::get
Expand All @@ -755,18 +755,18 @@ public function testParentServiceManagerCanCreateFactoryServiceWithSameNameThatA
$boo1 = "ZendTest\ServiceManager\TestAsset\FooFactory";
$boo1_returns = "ZendTest\ServiceManager\TestAsset\Foo";
$boo2 = function() { return new \stdClass(); };

$this->serviceManager->setFactory($foo1, $boo1);
$this->assertInstanceOf($boo1_returns, $this->serviceManager->get($foo1));

$serviceManagerParent = $this->serviceManager->createScopedServiceManager();

$this->assertContains($this->serviceManager, $this->readAttribute($serviceManagerParent, 'peeringServiceManagers'));

$serviceManagerParent->setFactory($foo1, $boo2);
$this->assertTrue($serviceManagerParent->get($foo1) instanceof \stdClass);
}

/**
* @covers Zend\ServiceManager\ServiceManager::setAlias
* @covers Zend\ServiceManager\ServiceManager::hasAlias
Expand All @@ -780,12 +780,12 @@ public function testParentServiceManagerCanCreateAliasWithSameNameThatAlreadyUse

$this->serviceManager->setAlias($foo1, $boo1);
$this->assertTrue($this->serviceManager->hasAlias($foo1));

$serviceManagerParent = $this->serviceManager->createScopedServiceManager();

$this->assertFalse($serviceManagerParent->hasAlias($foo1));
$this->assertContains($this->serviceManager, $this->readAttribute($serviceManagerParent, 'peeringServiceManagers'));

$serviceManagerParent->setAlias($foo1, $boo2);
$this->assertTrue($serviceManagerParent->hasAlias($foo1));
}
Expand Down

0 comments on commit bef0ba6

Please sign in to comment.