Skip to content

Commit 3b8e644

Browse files
committed
Added some exceptions to the method order in CS
1 parent 252ffe7 commit 3b8e644

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contributing/code/standards.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ Structure
101101

102102
* Declare class properties before methods;
103103

104-
* Declare public methods first, then protected ones and finally private ones;
104+
* Declare public methods first, then protected ones and finally private ones.
105+
The exceptions to this rule are the class constructor and the ``setUp`` and
106+
``tearDown`` methods of PHPUnit tests, which should always be the first methods
107+
to increase readability.
105108

106109
* Use parentheses when instantiating classes regardless of the number of
107110
arguments the constructor has;

0 commit comments

Comments
 (0)