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

Stop ignoring ControlStructures.EarlyExit #1757

Merged
merged 1 commit into from
Mar 22, 2018

Conversation

malarzm
Copy link
Member

@malarzm malarzm commented Mar 15, 2018

Automatic fixes

@malarzm malarzm added the Task label Mar 15, 2018
@malarzm malarzm added this to the 2.0.0 milestone Mar 15, 2018
} elseif ($lower === 'desc') {
}

if ($lower === 'desc') {
Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member

@alcaeus alcaeus left a 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.

@malarzm malarzm merged commit 6947e9f into doctrine:master Mar 22, 2018
@malarzm malarzm deleted the csfix-early-exit branch March 22, 2018 17:10
@@ -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) {
Copy link
Contributor

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

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants