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']();
......
......@@ -92,7 +92,7 @@ class SecurityTraitTest extends \PHPUnit_Framework_TestCase
$request = Request::create('/');
$app = $this->createApplication(array(
'fabien' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
'fabien' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
'monique' => array('ROLE_USER', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
));
$app->get('/', function () { return 'foo'; });
......
......@@ -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 () {
......
......@@ -32,7 +32,7 @@ class HttpFragmentServiceProviderTest extends \PHPUnit_Framework_TestCase
$app->register(new TwigServiceProvider(), array(
'twig.templates' => array(
'hello' => '{{ render("/foo") }}{{ render_esi("/foo") }}{{ render_hinclude("/foo") }}',
'foo' => 'foo',
'foo' => 'foo',
),
));
......
......@@ -205,7 +205,7 @@ class SecurityServiceProviderTest extends WebTestCase
'users' => array(
// password is foo
'fabien' => array('ROLE_USER', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
'admin' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
'admin' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
),
),
),
......@@ -256,7 +256,7 @@ class SecurityServiceProviderTest extends WebTestCase
'users' => array(
// password is foo
'dennis' => array('ROLE_USER', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
'admin' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
'admin' => array('ROLE_ADMIN', '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg=='),
),
),
),
......
......@@ -28,7 +28,7 @@ class TwigServiceProviderTest extends \PHPUnit_Framework_TestCase
$app = new Application();
$app->register(new TwigServiceProvider(), array(
'twig.templates' => array('hello' => 'Hello {{ name }}!'),
'twig.templates' => array('hello' => 'Hello {{ name }}!'),
));
$app->get('/hello/{name}', function ($name) use ($app) {
......@@ -50,9 +50,9 @@ class TwigServiceProviderTest extends \PHPUnit_Framework_TestCase
$app->register(new HttpFragmentServiceProvider());
$app->register(new TwigServiceProvider(), array(
'twig.templates' => array(
'twig.templates' => array(
'hello' => '{{ render("/foo") }}',
'foo' => 'foo',
'foo' => 'foo',
),
));
......@@ -73,7 +73,7 @@ class TwigServiceProviderTest extends \PHPUnit_Framework_TestCase
{
$app = new Application();
$app->register(new TwigServiceProvider(), array(
'twig.templates' => array('foo' => 'foo'),
'twig.templates' => array('foo' => 'foo'),
));
$loader = $this->getMock('\Twig_LoaderInterface');
$loader->expects($this->never())->method('getSource');
......
......@@ -89,7 +89,7 @@ class ValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase
));
$builder = $app['form.factory']->createBuilder('form', array(), array(
'constraints' => $constraints,
'constraints' => $constraints,
'csrf_protection' => false,
));
......
......@@ -35,7 +35,7 @@ class StreamTest extends \PHPUnit_Framework_TestCase
$i = 0;
$stream = function () use (&$i) {
$i++;
++$i;
};
$app = new Application();
......
......@@ -68,7 +68,7 @@ class WebTestCaseTest extends WebTestCase
$client = $this->createClient(array(
'PHP_AUTH_USER' => $user,
'PHP_AUTH_PW' => $pass,
'PHP_AUTH_PW' => $pass,
));
$crawler = $client->request('GET', '/server');
......
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