Skip to content

Commit 36de753

Browse files
Fixing some CS issues
1 parent f1f0345 commit 36de753

File tree

5 files changed

+21
-15
lines changed

5 files changed

+21
-15
lines changed

book/controller.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ value to each variable.
473473

474474
$httpKernel = $this->container->get('http_kernel');
475475
$response = $httpKernel->forward(
476-
'AcmeHelloBundle:Hello:fancy', array(
476+
'AcmeHelloBundle:Hello:fancy',
477+
array(
477478
'name' => $name,
478479
'color' => 'green',
479480
)

book/routing.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ system. Take the ``blog_show`` example route from earlier::
10701070
$params = $router->match('/blog/my-blog-post');
10711071
// array(
10721072
// 'slug' => 'my-blog-post',
1073-
// '_controller' => 'AcmeBlogBundle:Blog:show'
1073+
// '_controller' => 'AcmeBlogBundle:Blog:show',
10741074
// )
10751075

10761076
$uri = $router->generate('blog_show', array('slug' => 'my-blog-post'));
@@ -1105,7 +1105,7 @@ In an upcoming section, you'll learn how to generate URLs from inside templates.
11051105
11061106
var url = Routing.generate(
11071107
'blog_show',
1108-
{ "slug": 'my-blog-post'}
1108+
{"slug": 'my-blog-post'}
11091109
);
11101110
11111111
For more information, see the documentation for that bundle.

book/security.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ Next, create the controller that will display the login form::
423423
$session = $request->getSession();
424424

425425
// get the login error if there is one
426-
if ($request->attributes->has(
427-
SecurityContext::AUTHENTICATION_ERROR
428-
)) {
426+
if (
427+
$request->attributes->has(SecurityContext::AUTHENTICATION_ERROR)
428+
) {
429429
$error = $request->attributes->get(
430430
SecurityContext::AUTHENTICATION_ERROR
431431
);

book/service_container.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,14 @@ something like this::
567567
Without using the service container, you can create a new ``NewsletterManager``
568568
fairly easily from inside a controller::
569569

570+
use Acme\HelloBundle\Newsletter\NewsletterManager;
571+
572+
// ...
573+
570574
public function sendNewsletterAction()
571575
{
572576
$mailer = $this->get('my_mailer');
573-
$newsletter = new Acme\HelloBundle\Newsletter\NewsletterManager(
574-
$mailer
575-
);
577+
$newsletter = new NewsletterManager($mailer);
576578
// ...
577579
}
578580

book/testing.rst

+9-6
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ for its ``DemoController`` (`DemoControllerTest`_) that reads as follows::
144144

145145
$crawler = $client->request('GET', '/demo/hello/Fabien');
146146

147-
$this->assertGreaterThan(0, $crawler->filter(
148-
'html:contains("Hello Fabien")'
149-
)->count());
147+
$this->assertGreaterThan(
148+
0,
149+
$crawler->filter('html:contains("Hello Fabien")')->count()
150+
);
150151
}
151152
}
152153

@@ -275,9 +276,11 @@ document::
275276
$this->assertCount(4, $crawler->filter('h2'));
276277

277278
// Assert that the "Content-Type" header is "application/json"
278-
$this->assertTrue($client->getResponse()->headers->contains(
279-
'Content-Type',
280-
'application/json')
279+
$this->assertTrue(
280+
$client->getResponse()->headers->contains(
281+
'Content-Type',
282+
'application/json'
283+
)
281284
);
282285

283286
// Assert that the response content matches a regexp.

0 commit comments

Comments
 (0)