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
$this['dispatcher_class'] = 'Symfony\\Component\\EventDispatcher\\EventDispatcher';
$this['dispatcher'] = $this->share(function () use ($app) {
/**
/*
* @var EventDispatcherInterface
*/
$dispatcher = new $app['dispatcher_class']();
......
......@@ -73,13 +73,13 @@ class LogListenerTest extends \PHPUnit_Framework_TestCase
$logger
->expects($this->once())
->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
->expects($this->once())
->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();
......
......@@ -162,22 +162,22 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
$errors = 0;
$app->error(function ($e) use (&$errors) {
$errors++;
++$errors;
});
$app->error(function ($e) use (&$errors) {
$errors++;
++$errors;
});
$app->error(function ($e) use (&$errors) {
$errors++;
++$errors;
return new Response('foo exception handler');
});
$app->error(function ($e) use (&$errors) {
// should not execute
$errors++;
++$errors;
});
$request = Request::create('/foo');
......@@ -198,7 +198,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
$errors = 0;
$app->error(function ($e) use (&$errors) {
$errors++;
++$errors;
});
try {
......
......@@ -29,7 +29,7 @@ class LazyUrlMatcherTest extends \PHPUnit_Framework_TestCase
$urlMatcher = $this->getMock('Symfony\Component\Routing\Matcher\UrlMatcherInterface');
$matcher = new LazyUrlMatcher(function () use ($urlMatcher, &$callCounter) {
$callCounter++;
++$callCounter;
return $urlMatcher;
});
......
......@@ -31,17 +31,17 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app->before(function () use (&$i, $test) {
$test->assertEquals(0, $i);
$i++;
++$i;
});
$app->match('/foo', function () use (&$i, $test) {
$test->assertEquals(1, $i);
$i++;
++$i;
});
$app->after(function () use (&$i, $test) {
$test->assertEquals(2, $i);
$i++;
++$i;
});
$request = Request::create('/foo');
......@@ -57,13 +57,13 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app = new Application();
$app->match('/foo', function () use (&$i) {
$i++;
++$i;
return new Response('foo');
});
$app->after(function () use (&$i) {
$i++;
++$i;
});
$request = Request::create('/foo');
......@@ -81,27 +81,27 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app->before(function () use (&$i, $test) {
$test->assertEquals(0, $i);
$i++;
++$i;
});
$app->before(function () use (&$i, $test) {
$test->assertEquals(1, $i);
$i++;
++$i;
});
$app->match('/foo', function () use (&$i, $test) {
$test->assertEquals(2, $i);
$i++;
++$i;
});
$app->after(function () use (&$i, $test) {
$test->assertEquals(3, $i);
$i++;
++$i;
});
$app->after(function () use (&$i, $test) {
$test->assertEquals(4, $i);
$i++;
++$i;
});
$request = Request::create('/foo');
......@@ -117,7 +117,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app = new Application();
$app->before(function () use (&$i) {
$i++;
++$i;
});
$app->match('/foo', function () {
......@@ -125,7 +125,7 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
});
$app->after(function () use (&$i) {
$i++;
++$i;
});
$app->error(function () {
......@@ -145,11 +145,11 @@ class MiddlewareTest extends \PHPUnit_Framework_TestCase
$app = new Application();
$app->before(function () use (&$i) {
$i++;
++$i;
}, Application::EARLY_EVENT);
$app->after(function () use (&$i) {
$i++;
++$i;
});
$app->error(function () {
......
......@@ -35,7 +35,7 @@ class StreamTest extends \PHPUnit_Framework_TestCase
$i = 0;
$stream = function () use (&$i) {
$i++;
++$i;
};
$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