mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 19:06:40 +00:00
minor #4488 Update coding standards (VincentLanglet)
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Update coding standards
Commits
-------
07a4ed17d2 Update coding standards
This commit is contained in:
@@ -88,17 +88,17 @@ standards:
|
||||
[1, 2, 3]
|
||||
{'name': 'Fabien'}
|
||||
|
||||
* Do not put any spaces before and after ``=`` in macro argument declarations:
|
||||
* Put exactly one space before and after ``=`` in macro argument declarations:
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
{% macro html_input(class="input") %}
|
||||
{% macro html_input(class = "input") %}
|
||||
|
||||
* Put exactly one space after the ``:`` sign in macro argument declarations:
|
||||
* Put exactly one space after the ``:`` sign when using named arguments:
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
{% macro html_input(class: "input") %}
|
||||
{{ html_input(class: "input") }}
|
||||
|
||||
* Use snake case for all variable names (provided by the application and
|
||||
created in templates), function/filter/test names, argument names and named
|
||||
|
||||
Reference in New Issue
Block a user