Just bringing in some coding standards to get the codebase to a nice readable format. Will slowly bring in other “fixers/sniffs” to keep eberything as uniform as possible.
Just added a .editorconfig file which most major editors read and adhere to a standard.
Neat to see this stuff in order to standardize the codebase a bit. Is this something that each user needs to set up or is it a tool that the project runs?
Both. If we can get developers to follow these standards before submitting a pull request or commiting to the codebase, slowly we will see the changes flow through the code.
and with github (once we start looking at CI), we can use the git hooks to run on the code before its commited to the codebase.
I’m wondering how others feel about 2-character indent sizes instead of 4. I’ve tended to use 2 because it seems enough for the desired vidual effect, and with 4 it sometimes gets crowded on the right.
Strongly disagree with 2 space indentation as a default. 4 is the standard and horizontal crowding shouldn’t be an issue with today’s monitors. Most PHP code uses 4 spaces and I’ve found 2 spaces is way to clustered together. Could be worse, we could be using 8 spaces
The PHP standards working group (http://www.php-fig.org/) suggests lines not be longer than 80 characters with a soft limit at 120 but mandates NO hard limit