Skip to content

Commit 9a62ff4

Browse files
PSR-2 fixes
1 parent 3a2be08 commit 9a62ff4

File tree

5 files changed

+33
-33
lines changed

5 files changed

+33
-33
lines changed

Tests/DataCollector/ConfigDataCollectorTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ public function testCollect()
3333
$c->setKernel($kernel);
3434
$c->collect(new Request(), new Response());
3535

36-
$this->assertSame('test',$c->getEnv());
36+
$this->assertSame('test', $c->getEnv());
3737
$this->assertTrue($c->isDebug());
38-
$this->assertSame('config',$c->getName());
39-
$this->assertSame('testkernel',$c->getAppName());
40-
$this->assertSame(PHP_VERSION,$c->getPhpVersion());
41-
$this->assertSame(Kernel::VERSION,$c->getSymfonyVersion());
38+
$this->assertSame('config', $c->getName());
39+
$this->assertSame('testkernel', $c->getAppName());
40+
$this->assertSame(PHP_VERSION, $c->getPhpVersion());
41+
$this->assertSame(Kernel::VERSION, $c->getSymfonyVersion());
4242
$this->assertNull($c->getToken());
4343

4444
// if else clause because we don't know it

Tests/DataCollector/ExceptionDataCollectorTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ protected function setUp()
2727

2828
public function testCollect()
2929
{
30-
$e = new \Exception('foo',500);
30+
$e = new \Exception('foo', 500);
3131
$c = new ExceptionDataCollector();
3232
$flattened = FlattenException::create($e);
3333
$trace = $flattened->getTrace();
3434

3535
$this->assertFalse($c->hasException());
3636

37-
$c->collect(new Request(), new Response(),$e);
37+
$c->collect(new Request(), new Response(), $e);
3838

3939
$this->assertTrue($c->hasException());
40-
$this->assertEquals($flattened,$c->getException());
41-
$this->assertSame('foo',$c->getMessage());
42-
$this->assertSame(500,$c->getCode());
43-
$this->assertSame('exception',$c->getName());
44-
$this->assertSame($trace,$c->getTrace());
40+
$this->assertEquals($flattened, $c->getException());
41+
$this->assertSame('foo', $c->getMessage());
42+
$this->assertSame(500, $c->getCode());
43+
$this->assertSame('exception', $c->getName());
44+
$this->assertSame($trace, $c->getTrace());
4545
}
4646
}

Tests/DataCollector/RequestDataCollectorTest.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ public function testCollect(Request $request, Response $response)
3838

3939
$c->collect($request, $response);
4040

41-
$this->assertSame('request',$c->getName());
42-
$this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag',$c->getRequestHeaders());
43-
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestServer());
44-
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestCookies());
45-
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestAttributes());
46-
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestRequest());
47-
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestQuery());
48-
$this->assertEquals('html',$c->getFormat());
49-
$this->assertEquals(array(),$c->getSessionAttributes());
50-
$this->assertEquals('en',$c->getLocale());
51-
52-
$this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag',$c->getResponseHeaders());
53-
$this->assertEquals('OK',$c->getStatusText());
54-
$this->assertEquals(200,$c->getStatusCode());
55-
$this->assertEquals('application/json',$c->getContentType());
41+
$this->assertSame('request', $c->getName());
42+
$this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $c->getRequestHeaders());
43+
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestServer());
44+
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestCookies());
45+
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestAttributes());
46+
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestRequest());
47+
$this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestQuery());
48+
$this->assertEquals('html', $c->getFormat());
49+
$this->assertEquals(array(), $c->getSessionAttributes());
50+
$this->assertEquals('en', $c->getLocale());
51+
52+
$this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $c->getResponseHeaders());
53+
$this->assertEquals('OK', $c->getStatusText());
54+
$this->assertEquals(200, $c->getStatusCode());
55+
$this->assertEquals('application/json', $c->getContentType());
5656
}
5757

5858
/**
@@ -161,9 +161,9 @@ public function provider()
161161
$response = new Response();
162162
$response->setStatusCode(200);
163163
$response->headers->set('Content-Type', 'application/json');
164-
$response->headers->setCookie(new Cookie('foo','bar',1,'/foo','localhost',true,true));
165-
$response->headers->setCookie(new Cookie('bar','foo',new \DateTime('@946684800')));
166-
$response->headers->setCookie(new Cookie('bazz','foo','2000-12-12'));
164+
$response->headers->setCookie(new Cookie('foo', 'bar', 1, '/foo', 'localhost', true, true));
165+
$response->headers->setCookie(new Cookie('bar', 'foo', new \DateTime('@946684800')));
166+
$response->headers->setCookie(new Cookie('bazz', 'foo', '2000-12-12'));
167167

168168
return array(
169169
array($request, $response),

Tests/HttpCache/StoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function testSetsTheXContentDigestResponseHeaderBeforeStoring()
9191
{
9292
$cacheKey = $this->storeSimpleEntry();
9393
$entries = $this->getStoreMetadata($cacheKey);
94-
list ($req, $res) = $entries[0];
94+
list($req, $res) = $entries[0];
9595

9696
$this->assertEquals('ena94a8fe5ccb19ba61c4c0873d391e987982fbbd3', $res['x-content-digest'][0]);
9797
}

Tests/KernelTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ public function testLocateResourceReturnsAllMatches()
497497

498498
$this->assertEquals(array(
499499
__DIR__.'/Fixtures/Bundle2Bundle/foo.txt',
500-
__DIR__.'/Fixtures/Bundle1Bundle/foo.txt',),
500+
__DIR__.'/Fixtures/Bundle1Bundle/foo.txt', ),
501501
$kernel->locateResource('@Bundle1Bundle/foo.txt', null, false));
502502
}
503503

@@ -560,7 +560,7 @@ public function testLocateResourceReturnsTheDirOneForResourcesAndBundleOnes()
560560

561561
$this->assertEquals(array(
562562
__DIR__.'/Fixtures/Resources/Bundle1Bundle/foo.txt',
563-
__DIR__.'/Fixtures/Bundle1Bundle/Resources/foo.txt',),
563+
__DIR__.'/Fixtures/Bundle1Bundle/Resources/foo.txt', ),
564564
$kernel->locateResource('@Bundle1Bundle/Resources/foo.txt', __DIR__.'/Fixtures/Resources', false)
565565
);
566566
}

0 commit comments

Comments
 (0)