Skip to content

Commit d551ac7

Browse files
committed
Tweaking spacing, markup for #1597
1 parent e262aa6 commit d551ac7

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

contributing/documentation/overview.rst

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -71,28 +71,30 @@ GitHub covers the topic of `pull requests`_ in detail.
7171
Standards
7272
---------
7373

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:
7676

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>`
7878
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)
8383
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.
9193

9294
An example::
9395

9496
// src/Foo/Bar/foo.php
95-
function foo($bar)
97+
public function foo($bar)
9698
{
9799
// set foo with a value of bar
98100
$foo = ...;
@@ -103,10 +105,11 @@ An example::
103105
}
104106

105107
.. 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)::
110113

111114
array(
112115
'some value',

0 commit comments

Comments
 (0)