Skip to content

Remove redundant path check #28683

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

Merged
merged 1 commit into from
Oct 3, 2018
Merged

Conversation

colinodell
Copy link
Contributor

Q A
Branch? 2.8
Bug fix? maybe?
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Commit 0ec852d introduced this new method. As you can see, the code I'm removing always evaluates to true thanks to the first if statement in this method:

image

(I'm not sure if redundant code technically counts as a "bug", so I've assumed "yes it does" and targeted 2.8.)

The first `if` statement in this method already performs this same
check, so the expression here always evaluated to `true`.
@colinodell
Copy link
Contributor Author

The code standard violation identified by fabbot.io is due to unrelated code in this file.

@nicolas-grekas
Copy link
Member

The code standard violation identified by fabbot.io is due to unrelated code in this file.

BTW, I disabled the rule to add the "b" in a164bb9

@nicolas-grekas nicolas-grekas added this to the 2.8 milestone Oct 2, 2018
@fabpot
Copy link
Member

fabpot commented Oct 3, 2018

Thank you @colinodell.

@fabpot fabpot merged commit 10795cf into symfony:2.8 Oct 3, 2018
fabpot added a commit that referenced this pull request Oct 3, 2018
This PR was merged into the 2.8 branch.

Discussion
----------

Remove redundant path check

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | maybe?
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commit 0ec852d introduced this new method. As you can see, the code I'm removing always evaluates to `true` thanks to the first `if` statement in this method:

![image](https://user-images.githubusercontent.com/202034/46349212-70968a80-c61f-11e8-8360-7d6abc4d7414.png)

(I'm not sure if redundant code technically counts as a "bug", so I've assumed "yes it does" and targeted 2.8.)

Commits
-------

10795cf Remove redundant path check
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