Combine consecutives unsets#2942
Merged
Ocramius merged 1 commit intodoctrine:masterfrom Dec 20, 2017
carusogabriel:combine-consecutives-unsets
Merged
Combine consecutives unsets#2942Ocramius merged 1 commit intodoctrine:masterfrom carusogabriel:combine-consecutives-unsets
Ocramius merged 1 commit intodoctrine:masterfrom
carusogabriel:combine-consecutives-unsets
Conversation
Contributor
|
I have mixed feelings about this one, it makes it worse to read... :/ |
Contributor
Author
|
I did it to reduce lines, but if readability is more important, why not leave it as it is? 😄 |
Contributor
|
I personally think it is, but let @Ocramius decide. :) |
Member
|
@Majkl578 the readability is quite OK, I just think we aren't used to variadic isset/unset. I myself learned about it just 2 years ago, and I do PHP since aaaaaaages (sadly). The change is semantically more correct, as this is an atomic operation, so a grouped unset is better than a sequence of unset calls anyway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
unsetallow us to pass multiple values to check.PHP-CS-Fixer helped me on that.