Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.1 KB

FEW code style.md

File metadata and controls

30 lines (21 loc) · 1.1 KB

FEW code style

Our code style guide is work in progress.

PHP

For PHP we use PSR-1/PSR-2 which use 4 spaces for indenting.

Other file types

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.

For editors

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.

Git

http://chris.beams.io/posts/git-commit/#seven-rules