From 3b8e644f82c4b33833487513c7bcdd567bd94e00 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Wed, 16 Apr 2014 14:16:23 +0200 Subject: [PATCH] Added some exceptions to the method order in CS --- contributing/code/standards.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index aadcb34ef90..7082565cee9 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -101,7 +101,10 @@ Structure * Declare class properties before methods; -* Declare public methods first, then protected ones and finally private ones; +* Declare public methods first, then protected ones and finally private ones. + The exceptions to this rule are the class constructor and the ``setUp`` and + ``tearDown`` methods of PHPUnit tests, which should always be the first methods + to increase readability. * Use parentheses when instantiating classes regardless of the number of arguments the constructor has;