Skip to content

Commit

Permalink
minor #3807 Added some exceptions to the method order in CS (stof)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Added some exceptions to the method order in CS

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | n/a

See silexphp/Silex#936 (comment) for the reason. Formalizing this case in the doc is a good idea IMO.

Commits
-------

3b8e644 Added some exceptions to the method order in CS
  • Loading branch information
weaverryan committed Apr 28, 2014
2 parents f801e2e + 3b8e644 commit 1094a13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contributing/code/standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1094a13

Please sign in to comment.