Skip to content

[Contributing] Improved CS #1393

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 4 commits into from
Jun 12, 2012
Merged

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented May 23, 2012

I have done some code improvements to the coding standards:

  • Added camelCase, StudlyCase and underscores in the example (as requested in this PR comment)
  • Added example with if ... else statements, because it is not clear if the else needs to be on a new line or not
  • Removed the visibility rules, because it is in the PSR-2 rules (4.2 and 4.3)

if (true === $dummy) {
return;
}
if ('string' === $dummy) {
$dummy = substr($dummy, 0, 5);
}
if (mergedOptions['some_default'] === 'values') {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be 'values' === $mergedOptions['some_default'].

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, you're right. That's the part I personally don't like about the Symfony CS, but I will change it soon.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it an option to at this rule to the Coding Standards @fabpot ? I can't find this rule.

weaverryan added a commit that referenced this pull request Jun 12, 2012
@weaverryan weaverryan merged commit eee4109 into symfony:2.0 Jun 12, 2012
@weaverryan
Copy link
Member

Hey guys!

I've merged this PR - it's a big improvement and I think we've addressed any issues. If any remain, just open up another PR.

Thanks!

@wouterj wouterj deleted the improve_cs_example branch December 31, 2012 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants