Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion contributing/code/standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ Structure
to increase readability;

* Declare all the arguments on the same line as the method/function name, no
matter how many arguments there are;
matter how many arguments there are (with exception of `constructor property promotion`_);

* When using `constructor property promotion`_ put each parameter on a new line with
`trailing comma`_;

* Use parentheses when instantiating classes regardless of the number of
arguments the constructor has;
Expand Down Expand Up @@ -299,3 +302,5 @@ License
.. _`camelCase`: https://en.wikipedia.org/wiki/Camel_case
.. _`UpperCamelCase`: https://en.wikipedia.org/wiki/Camel_case
.. _`snake_case`: https://en.wikipedia.org/wiki/Snake_case
.. _`constructor property promotion`: https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor.promotion
.. _`trailing comma`: https://wiki.php.net/rfc/trailing_comma_in_parameter_list