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

Specify coding standard #188

Open
gRegorLove opened this issue Aug 2, 2018 · 3 comments
Open

Specify coding standard #188

gRegorLove opened this issue Aug 2, 2018 · 3 comments

Comments

@gRegorLove
Copy link
Member

gRegorLove commented Aug 2, 2018

https://www.php-fig.org/psr/psr-1/ and https://www.php-fig.org/psr/psr-2/

In addition, should make a choice among $StudlyCaps, $camelCase, or $under_score properties. Historically php-mf2 has used $camelCase so I'm fine with that.

@pfefferle
Copy link

I would vote for camel case

@aaronpk
Copy link
Member

aaronpk commented Aug 2, 2018

I would vote for whatever the majority of the code is currently written in

@Zegnat
Copy link
Member

Zegnat commented Aug 3, 2018

I too would vote camelCase. The PSR uses camelCase in almost all of its examples. Symfony defines camelCase in their coding standards. So did Zend (and they will automatically test for it in the future). There are probably a few more big projects that could be added to this list.

(To this day I am a little surprised the PSR have not documented naming conventions. Not even the upcoming PSR-12 Extended Coding Style Guide.)

I think what will be more important for a coding standard is to pick something that is automatically testable (PHP_CodeSniffer) and preferably automatically fixable (PHP_CodeSniffer or PHP CS Fixer).

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

No branches or pull requests

4 participants