@@ -71,28 +71,30 @@ GitHub covers the topic of `pull requests`_ in detail.
71
71
Standards
72
72
---------
73
73
74
- In order to help the reader as much as possible and to create code examples that
75
- looks and feels familiar, you should follow these rules:
74
+ In order to help the reader as much as possible and to create code examples that
75
+ look and feel familiar, you should follow these rules:
76
76
77
- * The code follows the Coding Standards, the :doc: `Symfony Coding Standards</contributing/code/standards> `
77
+ * The code follows the :doc: `Symfony Coding Standards</contributing/code/standards> `
78
78
as well as the `Twig Coding Standards `_;
79
- * When we fold one or more lines of code, we place `... ` in a comment at the point
80
- of the fold. These comments are: `// ... ` (php), `# ... ` (yaml/bash), `{# ... #} `
81
- (twig), `<!-- ... --> ` (xml/html), `; ... ` (ini), `... ` (text);
82
- * When we fold a part of a line, e.g. a variable value, we put `... ` (without comment)
79
+ * When we fold one or more lines of code, we place `` ... `` in a comment at the point
80
+ of the fold. These comments are: `` // ... `` (php), `` # ... `` (yaml/bash), `` {# ... #} ``
81
+ (twig), `` <!-- ... --> `` (xml/html), `` ; ... `` (ini), `` ... ` ` (text);
82
+ * When we fold a part of a line, e.g. a variable value, we put `` ... ` ` (without comment)
83
83
at the place of the fold;
84
- * Description about the fold: (optional)
85
- If we fold some lines: The description can be placed after the `... `
86
- If we fold a part of a line: The description can be placed before the line;
87
- * If usefull, a codeblock begins with a comment with the filename. After this comment
88
- should not be a blank line, except if the next line is a comment too;
89
- * You should put a `$ ` in front of every bash line;
90
- * We prefer the `:: ` shorthand over `.. code-block:: php ` to begin a PHP code block.
84
+ * Description of the foloed code: (optional)
85
+ If we fold several lines: the description of the fold can be placed after the ``... ``
86
+ If we fold only part of a line: the description can be placed before the line;
87
+ * If useful, a ``codeblock `` should begin with a comment containing the filename
88
+ of the file in the code block. Place a blank line after this comment,
89
+ unless the next line is also a comment;
90
+ * You should put a ``$ `` in front of every bash line;
91
+ * We prefer the ``:: `` shorthand over ``.. code-block:: php `` to begin a PHP
92
+ code block.
91
93
92
94
An example::
93
95
94
96
// src/Foo/Bar/foo.php
95
- function foo($bar)
97
+ public function foo($bar)
96
98
{
97
99
// set foo with a value of bar
98
100
$foo = ...;
@@ -103,10 +105,11 @@ An example::
103
105
}
104
106
105
107
.. note ::
106
- * In Yaml you should to put a space after `{ ` and before `} ` (e.g. `{ _controller: ... } `),
107
- but this should not be done in Twig (e.g. `{'hello' : 'value'} `).
108
- * An array item is a part of a line, not a complete line. So you should not use `// ... `
109
- but `..., ` (the comma because of the Coding Standards)::
108
+
109
+ * In Yaml you should put a space after ``{ `` and before ``} `` (e.g. ``{ _controller: ... } ``),
110
+ but this should not be done in Twig (e.g. ``{'hello' : 'value'} ``).
111
+ * An array item is a part of a line, not a complete line. So you should
112
+ not use ``// ... `` but ``..., `` (the comma because of the Coding Standards)::
110
113
111
114
array(
112
115
'some value',
0 commit comments