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;