From 175df74de264a8cf4c676750ed7028dca5d8f8ef Mon Sep 17 00:00:00 2001 From: Wouter J Date: Tue, 22 Jan 2013 22:04:28 +0100 Subject: [PATCH] Added 2 commonly-used standards --- contributing/code/standards.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index ab7ab9daf4e..51cc5413eea 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -85,6 +85,9 @@ Structure * Add a single space around operators (``==``, ``&&``, ...); +* Add a comma after each array item in a multi-line array, even after the + last one; + * Add a blank line before ``return`` statements, unless the return is alone inside a statement-group (like an ``if`` statement); @@ -99,6 +102,9 @@ Structure * Declare public methods first, then protected ones and finally private ones. +* Use parentheses when instantiating classes regardless of the number of + arguments the constructor has. + Naming Conventions ------------------