This commit is contained in:
Pascal Borreli 2013-07-21 13:35:20 +01:00
parent 0a894bc800
commit 6e35963fa5
7 changed files with 15 additions and 14 deletions

View File

@ -32,7 +32,8 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer
/** /**
* Constructor. * Constructor.
* *
* @param HttpKernelInterface $kernel A HttpKernelInterface instance * @param HttpKernelInterface $kernel A HttpKernelInterface instance
* @param EventDispatcherInterface $dispatcher A EventDispatcherInterface instance
*/ */
public function __construct(HttpKernelInterface $kernel, EventDispatcherInterface $dispatcher = null) public function __construct(HttpKernelInterface $kernel, EventDispatcherInterface $dispatcher = null)
{ {
@ -53,7 +54,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer
if ($uri instanceof ControllerReference) { if ($uri instanceof ControllerReference) {
$reference = $uri; $reference = $uri;
// Remove attributes from the genereated URI because if not, the Symfony // Remove attributes from the generated URI because if not, the Symfony
// routing system will use them to populate the Request attributes. We don't // routing system will use them to populate the Request attributes. We don't
// want that as we want to preserve objects (so we manually set Request attributes // want that as we want to preserve objects (so we manually set Request attributes
// below instead) // below instead)

View File

@ -89,7 +89,7 @@ abstract class BaseMemcacheProfilerStorage implements ProfilerStorageInterface
--$limit; --$limit;
} }
usort($result, function($a, $b) { usort($result, function ($a, $b) {
if ($a['time'] === $b['time']) { if ($a['time'] === $b['time']) {
return 0; return 0;
} }

View File

@ -70,7 +70,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
} }
if (!empty($start) && $csvTime < $start) { if (!empty($start) && $csvTime < $start) {
continue; continue;
} }
if (!empty($end) && $csvTime > $end) { if (!empty($end) && $csvTime > $end) {

View File

@ -80,7 +80,7 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase
array( array(
'Closure', 'Closure',
function() { return 'foo'; }, function () { return 'foo'; },
array( array(
'class' => __NAMESPACE__.'\{closure}', 'class' => __NAMESPACE__.'\{closure}',
'method' => null, 'method' => null,

View File

@ -78,7 +78,7 @@ class ContainerAwareHttpKernelTest extends \PHPUnit_Framework_TestCase
$resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface'); $resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');
$kernel = new ContainerAwareHttpKernel($dispatcher, $container, $resolver); $kernel = new ContainerAwareHttpKernel($dispatcher, $container, $resolver);
$controller = function() use ($expected) { $controller = function () use ($expected) {
return $expected; return $expected;
}; };
@ -136,7 +136,7 @@ class ContainerAwareHttpKernelTest extends \PHPUnit_Framework_TestCase
$resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface'); $resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');
$kernel = new ContainerAwareHttpKernel($dispatcher, $container, $resolver); $kernel = new ContainerAwareHttpKernel($dispatcher, $container, $resolver);
$controller = function() use ($expected) { $controller = function () use ($expected) {
throw $expected; throw $expected;
}; };

View File

@ -252,7 +252,7 @@ class HttpKernelTest extends \PHPUnit_Framework_TestCase
protected function getResolver($controller = null) protected function getResolver($controller = null)
{ {
if (null === $controller) { if (null === $controller) {
$controller = function() { return new Response('Hello'); }; $controller = function () { return new Response('Hello'); };
} }
$resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface'); $resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');

View File

@ -689,9 +689,9 @@ EOF;
public function testInitializeBundlesSupportsArbitraryBundleRegistrationOrder() public function testInitializeBundlesSupportsArbitraryBundleRegistrationOrder()
{ {
$grandparent = $this->getBundle(null, null, 'GrandParentCCundle'); $grandparent = $this->getBundle(null, null, 'GrandParentCBundle');
$parent = $this->getBundle(null, 'GrandParentCCundle', 'ParentCCundle'); $parent = $this->getBundle(null, 'GrandParentCBundle', 'ParentCBundle');
$child = $this->getBundle(null, 'ParentCCundle', 'ChildCCundle'); $child = $this->getBundle(null, 'ParentCBundle', 'ChildCBundle');
$kernel = $this->getKernel(); $kernel = $this->getKernel();
$kernel $kernel
@ -703,9 +703,9 @@ EOF;
$kernel->initializeBundles(); $kernel->initializeBundles();
$map = $kernel->getBundleMap(); $map = $kernel->getBundleMap();
$this->assertEquals(array($child, $parent, $grandparent), $map['GrandParentCCundle']); $this->assertEquals(array($child, $parent, $grandparent), $map['GrandParentCBundle']);
$this->assertEquals(array($child, $parent), $map['ParentCCundle']); $this->assertEquals(array($child, $parent), $map['ParentCBundle']);
$this->assertEquals(array($child), $map['ChildCCundle']); $this->assertEquals(array($child), $map['ChildCBundle']);
} }
/** /**