-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
Stop ignoring ControlStructures.EarlyExit #1757
Conversation
} elseif ($lower === 'desc') { | ||
} | ||
|
||
if ($lower === 'desc') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why it was caught (unless elseif
is a bad practice), there's also one more such change. Should I revert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like a bug. We should change them back and report it upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once the elseif
occurrences have been changed back.
6569ad6
to
5edd61b
Compare
@@ -1703,9 +1709,11 @@ public function setParentClasses(array $classNames) | |||
{ | |||
$this->parentClasses = $classNames; | |||
|
|||
if (count($classNames) > 0) { | |||
$this->rootDocumentName = array_pop($classNames); | |||
if (count($classNames) <= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can never be <0, but I understand how this happened. :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better safe than sorry... or something :P
Automatic fixes