Skip to content

Misc changes #4695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Misc changes #4695

wants to merge 2 commits into from

Conversation

ifdattic
Copy link
Contributor

Q A
Doc fix? yes
New docs? no
Applies to 2.3
Fixed tickets

@timglabisch
Copy link
Contributor

👍

@@ -174,7 +175,8 @@ manually. In our application, we have this situation in ``CommentController``:
{
$post = $this->getDoctrine()
->getRepository('AppBundle:Post')
->findOneBy(array('slug' => $postSlug));
->findOneBy(array('slug' => $postSlug))
;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 for this change, as we are sure ->findOneBy() will be the last method call in this chain.

@@ -146,7 +147,7 @@ For example:
$deleteForm = $this->createDeleteForm($post);

return $this->render('admin/post/show.html.twig', array(
'post' => $post,
'post' => $post,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 👎 here. The code team decided recently to not align array values. I would just trim the spaces to one single space.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll significantly improves readability, which is way more important in the docs than having nice diffs in PRs.

This change gets a very big 👍 from me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, let's keep it. Readability is a good argument. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the code I'm personally not a big fan of alligning myself as most of the time it gives more problems than it solves.

For documentation, I think it's a really good idea to improve readability as you want to make docs as easy to digest as possible (I'm currently rereading parts of PHP documentation, and .... it's not great, but as someone with experience I can slip past those problems, but for newcomers it might be a mine field).

@stof
Copy link
Member

stof commented Dec 29, 2014

👍

@wouterj
Copy link
Member

wouterj commented Dec 29, 2014

thank you for fixing and improving the code, Andrew!

wouterj added a commit that referenced this pull request Dec 29, 2014
This PR was squashed before being merged into the 2.3 branch (closes #4695).

Discussion
----------

Misc changes

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |

Commits
-------

18fa2c6 Misc changes
@wouterj wouterj closed this Dec 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants