Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 927 Bytes

File metadata and controls

23 lines (15 loc) · 927 Bytes

Coding Style Guide

  • Most important: Look around. Match the style you see used in the rest of the project. This includes formatting, naming things in code, naming things in documentation.

  • Code MUST use 4 spaces for indenting, not tabs.

  • There MUST NOT be a hard limit on line length; the soft limit MUST be 120 characters; lines SHOULD be 80 characters or less.

  • There MUST be one blank line after the namespace declaration, and there MUST be one blank line after the block of use declarations.

  • Opening braces for classes MUST go on the next line, and closing braces MUST go on the next line after the body.

  • Opening braces for methods MUST go on the next line, and closing braces MUST go on the next line after the body.

  • Blank lines MAY be added to improve readability and to indicate related blocks of code.

  • The PHP constants true, false, and null MUST be in lower case.

  • Prefer ' over "