8000 Added a note about coding standards and method arguments · symfony/symfony-docs@b7429a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit b7429a5

Browse files
javiereguiluzxabbuh
authored andcommitted
Added a note about coding standards and method arguments
1 parent fa92eac commit b7429a5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

contributing/code/standards.rst

Lines changed: 6 additions & 0 deletions
8000
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,19 @@ Structure
153153
that are not intended to be instantiated from the outside and thus are not
154154
concerned by the `PSR-0`_ and `PSR-4`_ autoload standards;
155155

156+
* Declare the class inheritance and all the implemented interfaces on the same
157+
line as the class name;
158+
156159
* Declare class properties before methods;
157160

158161
* Declare public methods first, then protected ones and finally private ones.
159162
The exceptions to this rule are the class constructor and the ``setUp`` and
160163
``tearDown`` methods of PHPUnit tests, which should always be the first methods
161164
to increase readability;
162165

166+
* Declare all the arguments on the same line as the method/function name, no
167+
matter how many arguments there are;
168+
163169
* Use parentheses when instantiating classes regardless of the number of
164170
arguments the constructor has;
165171

0 commit comments

Comments
 (0)