Skip to content
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

[CS] Avoid using useless expressions #6701

Merged
merged 1 commit into from
Jul 8, 2016

Conversation

phansys
Copy link
Contributor

@phansys phansys commented Jul 1, 2016

Q A
Doc fix? yes
New docs? yes
Applies to all
Fixed tickets N/A

Do not use else, elseif, break after if and case conditions
which returns or throws something.

@wouterj
Copy link
Member

wouterj commented Jul 1, 2016

👍
status: reviewed

@@ -175,6 +175,9 @@ Structure
switched to opt-in via ``@`` operator.
Read more at :ref:`contributing-code-conventions-deprecations`.

* Do not use ``else``, ``elseif``, ``break`` after ``if`` and ``case`` conditions
which returns or throws something.
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 not sure, but should we say ... which return or throw something instead of ... which returnS or throwS something ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree @javiereguiluz since we are talking about them plural, and not separately. I'll update this ASAP. Thank you.

@javiereguiluz
Copy link
Member

👍

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | yes
| Applies to    | all
| Fixed tickets | N/A

Do not use `else`, `elseif`, `break` after `if` and `case` conditions
which return or throw something.
@phansys phansys force-pushed the cs_avoid_useless_expressions branch from 6a64cd5 to d96faa4 Compare July 5, 2016 18:52
@wouterj
Copy link
Member

wouterj commented Jul 8, 2016

Thanks Javier!

@wouterj wouterj merged commit d96faa4 into symfony:2.7 Jul 8, 2016
wouterj added a commit that referenced this pull request Jul 8, 2016
This PR was merged into the 2.7 branch.

Discussion
----------

[CS] Avoid using useless expressions

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | yes
| Applies to    | all
| Fixed tickets | N/A

Do not use `else`, `elseif`, `break` after `if` and `case` conditions
which returns or throws something.

Commits
-------

d96faa4 Avoid using useless expressions
@phansys phansys deleted the cs_avoid_useless_expressions branch July 8, 2016 16:39
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.

4 participants