8000 [2.3] [Contributing] Added note about empty returns · symfony/symfony-docs@a6e9a10 · GitHub
[go: up one dir, main page]

Skip to content

Commit a6e9a10

Browse files
committed
[2.3] [Contributing] Added note about empty returns
| Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | | Fixed tickets |
1 parent 8f5338d commit a6e9a10

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contributing/code/standards.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ Structure
112112
* Add a blank line before ``return`` statements, unless the return is alone
113113
inside a statement-group (like an ``if`` statement);
114114

115+
* Use just ``return;`` instead of ``return null;`` when a function must return void
116+
early;
117+
115118
* Use braces to indicate control structure body regardless of the number of
116119
statements it contains;
117120

0 commit comments

Comments
 (0)
0