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/zendframework/zendframework#6872-php-cs-fixer-automa…
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Nov 14, 2014
181 parents 2ed48d5 + e68310c + 698e4c9 + f89400a + bdd4b7d + 8db253f + a464957 + 741de27 + 4d1adc8 + 8c5c414 + a7502a7 + 5058513 + 68f3d6e + f0a44c8 + 921096f + acfe55c + 35c857a + a9dd8d2 + 44d8daf + d1f9e24 + a36339c + 86f0f77 + 7ed9bcc + 754bd9a + c36f6c0 + 3ead99d + be05873 + 34e7aec + 2fcaf1c + 3f9b994 + ea3acc3 + fe35f10 + 45cc91b + aa77760 + 4959b82 + 35e2edb + 7717bd8 + 127fcbd + fc52973 + 528f461 + 8e251cd + d95b25a + 0f89697 + c941b0e + 3dc45ae + 180e140 + 67c3033 + 533cd3e + 29e7718 + 936c9be + 2d11657 + fa66751 + 2b778cc + ba628cd + ff761e1 + 5b64ee3 + 9456811 + 1c2d797 + 46b0d8f + 82264b3 + 39c88ce + cee064b + c303bed + ea247e3 + 1f87514 + 8896fc2 + 313a38d + 42848d4 + 8f5c457 + e035a2a + 544e341 + 467f8b2 + 30bb6f0 + f8cc896 + 2ee0afd + 656f0b0 + 7092cb4 + 5e1b259 + abb3ff8 + 39a873f + b6e6c92 + 83055d8 + 1dd5d72 + 9bc304a + 479b8c7 + 41fab24 + 80aee85 + 3962f1e + 6c6b004 + acb7af7 + 39aca71 + 9d55623 + c2210f2 + 50b7a31 + 327d366 + 00cfdb8 + 77c12db + 4a66170 + 4bd5c7f + 9549d20 + d3a95e2 + 5e04377 + d9da2cf + 1049b39 + 001d281 + ca437e5 + a5cb2da + e2db3b8 + 27f50b4 + 8008d6f + 4a6bead + e2df9ad + 9045ea9 + 0d18a05 + 48cc7df + dc08391 + ceec2bd + c5fc623 + 6335bda + 2a78ec6 + 56c198e + 3fab1eb + 6e15982 + 75f672f + 6efac6a + 7818a15 + fc61f7c + 0f89452 + 4ce1a3e + 8e87de6 + ff8bdbb + 30d8776 + df9df5b + 95173ad + 6f9a231 + b28d0cf + d4be36e + 335a3c1 + 6b736dd + 303ab92 + 4594eeb + 7db8ed5 + fecc97b + 5a47e2a + fdab45c + a4698e4 + 0eb7480 + d73e943 + cda61b2 + f5875b9 + 485d763 + e23536a + 7981849 + 388d6df + b3220c5 + 112a8ed + 9f981d8 + 5d39422 + 7bbeff8 + d9b366d + 2e1a8ce + 6c95b5a + 831b797 + 4a459ec + 18d7a25 + 90f630e + 0c71387 + 2f90b43 + c8deb2c + 4d3a9b8 + 0d718c7 + 7d9869d + c07a4ae + b1adcfd + 5700ed4 + fa773c1 + 5965ec2 + 64ddc63 + 840ac1e + 6bad72d + 049bbb7 commit 1aa18bd
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 20 deletions.
4 changes: 0 additions & 4 deletions src/Di/DiServiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,9 @@ public function get($name, array $params = array())
}

try {

$service = parent::get($name, $params);
return $service;

} catch (DiClassNotFoundException $e) {

// allow this di service to get dependencies from the service locator AFTER trying di
if ($this->useServiceLocator == self::USE_SL_AFTER_DI && $this->serviceLocator->has($name)) {
return $this->serviceLocator->get($name);
Expand All @@ -117,6 +114,5 @@ public function get($name, array $params = array())
);
}
}

}
}
2 changes: 0 additions & 2 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

class ServiceManager implements ServiceLocatorInterface
{

/**@#+
* Constants
*/
Expand Down Expand Up @@ -1130,7 +1129,6 @@ protected function createDelegatorFromFactory($canonicalName, $requestedName)
};

for ($i = 0; $i < $delegatorsCount; $i += 1) {

$delegatorFactory = $this->delegators[$canonicalName][$i];

if (is_string($delegatorFactory)) {
Expand Down
2 changes: 0 additions & 2 deletions test/AbstractPluginManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

class AbstractPluginManagerTest extends \PHPUnit_Framework_TestCase
{

/**
* @var ServiceManager
*/
Expand Down Expand Up @@ -188,6 +187,5 @@ public function testMultipleDelegatorsUsage()
$this->assertCount(1, $fooDelegator->instances);
$this->assertInstanceOf('stdClass', array_shift($fooDelegator->instances));
$this->assertSame($fooDelegator, array_shift($barDelegator->instances));

}
}
1 change: 0 additions & 1 deletion test/Di/DiAbstractServiceFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
class DiAbstractServiceFactoryTest extends \PHPUnit_Framework_TestCase
{

/**
* @var DiAbstractServiceFactory
*/
Expand Down
1 change: 0 additions & 1 deletion test/Di/DiServiceFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
class DiServiceFactoryTest extends \PHPUnit_Framework_TestCase
{

/**
* @var DiServiceFactory
*/
Expand Down
2 changes: 0 additions & 2 deletions test/Di/DiServiceInitializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public function setup()
$this->mockServiceLocator,
$this->mockDiInstanceManagerProxy
);

}

/**
Expand Down Expand Up @@ -72,5 +71,4 @@ public function testProxyInstanceManagersStayInSync()

$this->assertEquals($instanceManager->getAliases(), $proxy->getAliases());
}

}
15 changes: 7 additions & 8 deletions test/ServiceManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
*/
class ServiceManagerTest extends TestCase
{

/**
* @var ServiceManager
*/
Expand Down Expand Up @@ -671,7 +670,7 @@ public function testWaitingAbstractFactoryNestedContextCounterWhenThrowException
try {
$this->serviceManager->get('SomethingThatCanBeCreated');
$this->fail('serviceManager shoud throw Zend\ServiceManager\Exception\ServiceNotFoundException');
} catch(\Exception $e) {
} catch (\Exception $e) {
if (stripos(get_class($e), 'PHPUnit') !== false) {
throw $e;
}
Expand All @@ -683,7 +682,7 @@ public function testWaitingAbstractFactoryNestedContextCounterWhenThrowException
try {
$this->serviceManager->get('SomethingThatCanBeCreated');
$this->fail('serviceManager shoud throw Zend\ServiceManager\Exception\ServiceNotCreatedException');
} catch(\Exception $e) {
} catch (\Exception $e) {
if (stripos(get_class($e), 'PHPUnit') !== false) {
throw $e;
}
Expand Down Expand Up @@ -1036,7 +1035,7 @@ public function testInvalidDelegatorFactoryThrowsException()
try {
$this->serviceManager->create('foo-service');
$this->fail('Expected exception was not raised');
}catch (Exception\ServiceNotCreatedException $expected) {
} catch (Exception\ServiceNotCreatedException $expected) {
$this->assertRegExp('/invalid factory/', $expected->getMessage());
return;
}
Expand All @@ -1051,7 +1050,7 @@ public function testInvalidDelegatorFactoryAmongMultipleOnesThrowsException()
try {
$this->serviceManager->create('foo-service');
$this->fail('Expected exception was not raised');
}catch (Exception\ServiceNotCreatedException $expected) {
} catch (Exception\ServiceNotCreatedException $expected) {
$this->assertRegExp('/invalid factory/', $expected->getMessage());
return;
}
Expand Down Expand Up @@ -1101,7 +1100,7 @@ public function testAbstractFactoriesCanReturnAnyTypeButNull($service)
try {
$this->serviceManager->get('something');
$this->fail('ServiceManager::get() successfully returned null');
} catch(\Exception $e) {
} catch (\Exception $e) {
$this->assertInstanceOf('Zend\ServiceManager\Exception\ServiceNotCreatedException', $e);
}
} else {
Expand All @@ -1124,7 +1123,7 @@ public function testFactoriesCanReturnAnyTypeButNull($service)
try {
$this->serviceManager->get('something');
$this->fail('ServiceManager::get() successfully returned null');
} catch(\Exception $e) {
} catch (\Exception $e) {
$this->assertInstanceOf('Zend\ServiceManager\Exception\ServiceNotCreatedException', $e);
}
} else {
Expand All @@ -1144,7 +1143,7 @@ public function testServicesCanBeOfAnyTypeButNull($service)
try {
$this->serviceManager->get('something');
$this->fail('ServiceManager::get() successfully returned null');
} catch(\Exception $e) {
} catch (\Exception $e) {
$this->assertInstanceOf('Zend\ServiceManager\Exception\ServiceNotFoundException', $e);
}
} else {
Expand Down

0 comments on commit 1aa18bd

Please sign in to comment.