Commit 8bd96879 authored by Fabien Potencier's avatar Fabien Potencier

fixed CS

parent f4863ded
...@@ -89,7 +89,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte ...@@ -89,7 +89,7 @@ class Application extends \Pimple implements HttpKernelInterface, TerminableInte
$this['dispatcher_class'] = 'Symfony\\Component\\EventDispatcher\\EventDispatcher'; $this['dispatcher_class'] = 'Symfony\\Component\\EventDispatcher\\EventDispatcher';
$this['dispatcher'] = $this->share(function () use ($app) { $this['dispatcher'] = $this->share(function () use ($app) {
/** /*
* @var EventDispatcherInterface * @var EventDispatcherInterface
*/ */
$dispatcher = new $app['dispatcher_class'](); $dispatcher = new $app['dispatcher_class']();
......
...@@ -73,13 +73,13 @@ class LogListenerTest extends \PHPUnit_Framework_TestCase ...@@ -73,13 +73,13 @@ class LogListenerTest extends \PHPUnit_Framework_TestCase
$logger $logger
->expects($this->once()) ->expects($this->once())
->method('critical') ->method('critical')
->with($this->equalTo('RuntimeException: Fatal error (uncaught exception) at '.__FILE__.' line '.(__LINE__+14))) ->with($this->equalTo('RuntimeException: Fatal error (uncaught exception) at '.__FILE__.' line '.(__LINE__ + 14)))
; ;
$logger $logger
->expects($this->once()) ->expects($this->once())
->method('error') ->method('error')
->with($this->equalTo('Symfony\Component\HttpKernel\Exception\HttpException: Http error (uncaught exception) at '.__FILE__.' line '.(__LINE__+10))) ->with($this->equalTo('Symfony\Component\HttpKernel\Exception\HttpException: Http error (uncaught exception) at '.__FILE__.' line '.(__LINE__ + 10)))
; ;
$dispatcher = new EventDispatcher(); $dispatcher = new EventDispatcher();
......
...@@ -162,22 +162,22 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase ...@@ -162,22 +162,22 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
$errors = 0; $errors = 0;
$app->error(function ($e) use (&$errors) { $app->error(function ($e) use (&$errors) {
$errors++; ++$errors;
}); });
$app->error(function ($e) use (&$errors) { $app->error(function ($e) use (&$errors) {
$errors++; ++$errors;
}); });
$app->error(function ($e) use (&$errors) { $app->error(function ($e) use (&$errors) {
$errors++; ++$errors;
return new Response('foo exception handler'); return new Response('foo exception handler');
}); });
$app->error(function ($e) use (&$errors) { $app->error(function ($e) use (&$errors) {
// should not execute // should not execute
$errors++; ++$errors;
}); });
$request = Request::create('/foo'); $request = Request::create('/foo');
...@@ -198,7 +198,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase ...@@ -198,7 +198,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
$errors = 0; $errors = 0;
$app->error(function ($e) use (&$errors) { $app->error(function ($e) use (&$errors) {
$errors++; ++$errors;
}); });
try { try {
......
...@@ -29,7 +29,7 @@ class LazyUrlMatcherTest extends \PHPUnit_Framework_TestCase ...@@ -29,7 +29,7 @@ class LazyUrlMatcherTest extends \PHPUnit_Framework_TestCase
$urlMatcher = $this->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface'); $urlMatcher = $this->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface');
$matcher = new LazyUrlMatcher(function () use ($urlMatcher, &$callCounter) { $matcher = new LazyUrlMatcher(function () use ($urlMatcher, &$callCounter) {
$callCounter++; ++$callCounter;
return $urlMatcher; return $urlMatcher;
}); });
......
...@@ -31,17 +31,17 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase ...@@ -31,17 +31,17 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app->before(function () use (&$i, $test) { $app->before(function () use (&$i, $test) {
$test->assertEquals(0, $i); $test->assertEquals(0, $i);
$i++; ++$i;
}); });
$app->match('/foo', function () use (&$i, $test) { $app->match('/foo', function () use (&$i, $test) {
$test->assertEquals(1, $i); $test->assertEquals(1, $i);
$i++; ++$i;
}); });
$app->after(function () use (&$i, $test) { $app->after(function () use (&$i, $test) {
$test->assertEquals(2, $i); $test->assertEquals(2, $i);
$i++; ++$i;
}); });
$request = Request::create('/foo'); $request = Request::create('/foo');
...@@ -57,13 +57,13 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase ...@@ -57,13 +57,13 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app = new Application(); $app = new Application();
$app->match('/foo', function () use (&$i) { $app->match('/foo', function () use (&$i) {
$i++; ++$i;
return new Response('foo'); return new Response('foo');
}); });
$app->after(function () use (&$i) { $app->after(function () use (&$i) {
$i++; ++$i;
}); });
$request = Request::create('/foo'); $request = Request::create('/foo');
...@@ -81,27 +81,27 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase ...@@ -81,27 +81,27 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app->before(function () use (&$i, $test) { $app->before(function () use (&$i, $test) {
$test->assertEquals(0, $i); $test->assertEquals(0, $i);
$i++; ++$i;
}); });
$app->before(function () use (&$i, $test) { $app->before(function () use (&$i, $test) {
$test->assertEquals(1, $i); $test->assertEquals(1, $i);
$i++; ++$i;
}); });
$app->match('/foo', function () use (&$i, $test) { $app->match('/foo', function () use (&$i, $test) {
$test->assertEquals(2, $i); $test->assertEquals(2, $i);
$i++; ++$i;
}); });
$app->after(function () use (&$i, $test) { $app->after(function () use (&$i, $test) {
$test->assertEquals(3, $i); $test->assertEquals(3, $i);
$i++; ++$i;
}); });
$app->after(function () use (&$i, $test) { $app->after(function () use (&$i, $test) {
$test->assertEquals(4, $i); $test->assertEquals(4, $i);
$i++; ++$i;
}); });
$request = Request::create('/foo'); $request = Request::create('/foo');
...@@ -117,7 +117,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase ...@@ -117,7 +117,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app = new Application(); $app = new Application();
$app->before(function () use (&$i) { $app->before(function () use (&$i) {
$i++; ++$i;
}); });
$app->match('/foo', function () { $app->match('/foo', function () {
...@@ -125,7 +125,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase ...@@ -125,7 +125,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
}); });
$app->after(function () use (&$i) { $app->after(function () use (&$i) {
$i++; ++$i;
}); });
$app->error(function () { $app->error(function () {
...@@ -145,11 +145,11 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase ...@@ -145,11 +145,11 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app = new Application(); $app = new Application();
$app->before(function () use (&$i) { $app->before(function () use (&$i) {
$i++; ++$i;
}, Application::EARLY_EVENT); }, Application::EARLY_EVENT);
$app->after(function () use (&$i) { $app->after(function () use (&$i) {
$i++; ++$i;
}); });
$app->error(function () { $app->error(function () {
......
...@@ -35,7 +35,7 @@ class StreamTest extends \PHPUnit_Framework_TestCase ...@@ -35,7 +35,7 @@ class StreamTest extends \PHPUnit_Framework_TestCase
$i = 0; $i = 0;
$stream = function () use (&$i) { $stream = function () use (&$i) {
$i++; ++$i;
}; };
$app = new Application(); $app = new Application();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment