Jira issue originally created by user romanb:
We need a new coding standards document for Doctrine 2.
Comment created by benjamin:
Has there been any work on a coding standards document yet?
I'm currently working on fixing documentation on this project, and it might be a good time to define a standard.
I've started compiling a few recommendations based on various feedbacks I've got in my pull requests, and I can post them here.
Please let me know if there have been previous attempts so far!
Comment created by @ocramius:
[benjamin] [guiblanco] may have a CS ruleset, but it's not ready yet. Perfect timing btw, we really need to automate this to avoid having all these useless CS fix comments in pull requests
Ok, I'll post my document here once ready, and [~guiblanco] will be able to compare it with his ruleset!
Here is a first draft: https://gist.github.com/4676670
[~guiblanco], if you don't have time to compare your ruleset with my draft, maybe you could publish your current ruleset so that others can have a look?
Any update guys? I'm willing to spend some time on this work, but if no one answers, we won't be going forward :(
[~benjamin] I think a pull request against the doctrine website (https://github.com/doctrine/doctrine-website-sphinx) would be fine...
Comment created by @deeky666:
This should go into https://github.com/doctrine/coding-standard repo (long term).
Comment created by phansys:
Could we define PSR-2 as base?
Please just refer to https://github.com/doctrine/coding-standard, which is already PSR-2 based (with variations and more strictness)
@ocramius, Is there a rule for spaces arround ! operator? #1133 (comment)
I just found another set of rules inside https://github.com/doctrine/doctrine2/blob/14ff7f50cfea67d8a4dca37b8ca364d2a83b9864/CONTRIBUTING.md#coding-standard. Which is the current valid standard?
[~phansys] yes, that's doctrine specific (spaces around ! )
What about the disambiguation between the CS? https://github.com/doctrine/coding-standard/tree/master/Docs#doctrine-coding-standard vs https://github.com/doctrine/doctrine2/blob/14ff7f50cfea67d8a4dca37b8ca364d2a83b9864/CONTRIBUTING.md#coding-standard