Our code style guide is work in progress.
For PHP we use PSR-1/PSR-2 which use 4 spaces for indenting.
For all other files we generally use 2 spaces for indenting to save space and keep the right margin free a little longer. This applies to HTML, XML, CSS, LESS, SASS, JavaScript, JSON, Blade, etc.
This repo contains an .editorconfig
file that can be copied into project root directories
to help editors keep the style consistent.
Here's a quick command to pull a fresh .editorconfig
file into your current directory:
curl -L https://raw.githubusercontent.com/fewagency/best-practices/master/.editorconfig -o .editorconfig
or shorter:
curl -L https://git.io/v9bcA -o .editorconfig
We also have a slightly more extensive PhpStorm config.