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

Whitespace #17

Open
bueltge opened this issue Jan 24, 2015 · 4 comments
Open

Whitespace #17

bueltge opened this issue Jan 24, 2015 · 4 comments

Comments

@bueltge
Copy link

bueltge commented Jan 24, 2015

Currently are all examples, pattern without space between brackets and var.
I think is also a good practice to write readable code.
Maybe I would check all examples for this and send a pull request with the changes - if you like it?

Example:

if (!$foo) {

much better

if ( ! $foo ) {

Also I would add a chapter about space, whitespace in code for better legibility, if you like?

@GaryJones
Copy link
Contributor

While WordPress folks like you and me may be more familiar with the more liberal use of whitespace, others may prefer PSR-2 or other standards, the most of which aren't so liberal. The code here isn't so critical that we can't spend a few extra moments to get accustomed to the coding style, which only serves as an example to the textual descriptions.

I think what's more important, is for this project to have a CONTRIBUTING.md which indicates which standard code snippets should follow, so that there's consistency within the project.

@bueltge
Copy link
Author

bueltge commented Jan 26, 2015

A contributing guideline is much helpful, right. But not from my side, because my English is not really fine enough for this information.
The whitespace is more possible on my side, because I can do it, if is god helpful for the authors here.

@ArnaudLigny
Copy link

  • PSR-2 👍
  • CONTRIBUTING.md 👍

@joanhey
Copy link
Contributor

joanhey commented May 27, 2015

PSR-2 and possibility of add in house guideline

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