Skip to content

Commit

Permalink
minor #3585 Use consistent method chaining in BlogBundle sample appli…
Browse files Browse the repository at this point in the history
…cation (ockcyp)

This PR was merged into the 2.3 branch.

Discussion
----------

Use consistent method chaining in BlogBundle sample application

- Moved semicolon to end of last chained method
- Moved getManager() to next line to avoid having multiple chained
  methods in the same line

Commits
-------

3670cbb Use consistent method chaining in BlogBundle sample application - Moved semicolon to end of last chained method - Moved getManager() to next line to avoid having multiple chained   methods in the same line
  • Loading branch information
weaverryan committed Mar 4, 2014
2 parents cb61f4f + 3670cbb commit 1714a31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions book/from_flat_php_to_symfony2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ them for you. Here's the same sample application, now built in Symfony2::
{
public function listAction()
{
$posts = $this->get('doctrine')->getManager()
$posts = $this->get('doctrine')
->getManager()
->createQuery('SELECT p FROM AcmeBlogBundle:Post p')
->execute();

Expand All @@ -565,8 +566,7 @@ them for you. Here's the same sample application, now built in Symfony2::
$post = $this->get('doctrine')
->getManager()
->getRepository('AcmeBlogBundle:Post')
->find($id)
;
->find($id);

if (!$post) {
// cause the 404 page not found to be displayed
Expand Down

0 comments on commit 1714a31

Please sign in to comment.