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

Require space before throw, yield and yield from #136

Merged
merged 2 commits into from Nov 26, 2019
Merged

Require space before throw, yield and yield from #136

merged 2 commits into from Nov 26, 2019

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Nov 26, 2019

built on top of #135

We require space before return, let's require it also before yield, yield from and throw

@simPod simPod requested a review from a team as a code owner November 26, 2019 13:04
Copy link
Member

@ostrolucky ostrolucky left a comment

Choose a reason for hiding this comment

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

This would mean forbidding

foreach ($locales as $locale) {
    yield $locale->getCode();
}

and

yield 1;
yield 2;
yield 3;

I'm against that. There should be spacing after if structure, not before yield

@simPod
Copy link
Contributor Author

simPod commented Nov 26, 2019

@ostrolucky no, it is allowed. It only tries to separate first yield from previous structure.

@simPod
Copy link
Contributor Author

simPod commented Nov 26, 2019

#120 (comment) very similar to this 😉

Copy link
Member

@ostrolucky ostrolucky left a comment

Choose a reason for hiding this comment

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

then all good

@greg0ire greg0ire merged commit 6c3e899 into doctrine:master Nov 26, 2019
@greg0ire
Copy link
Member

Thanks @simPod !

@simPod simPod deleted the jump-spacing branch November 26, 2019 21:44
@Ocramius Ocramius added this to the 7.0.0 milestone Nov 26, 2019
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.

None yet

8 participants