Skip to content

Commit 6bcbf76

Browse files
Fixing some CS issues
1 parent ba095e8 commit 6bcbf76

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

components/dependency_injection/parameters.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ makes it easier to change rather than being tied up with the service definition:
7373
services:
7474
mailer:
7575
class: Mailer
76-
arguments: [%mailer.transport%]
76+
arguments: ['%mailer.transport%']
7777
7878
.. code-block:: xml
7979
@@ -85,7 +85,6 @@ makes it easier to change rather than being tied up with the service definition:
8585
<service id="mailer" class="Mailer">
8686
<argument>%mailer.transport%</argument>
8787
</service>
88-
8988
</services>
9089
9190
.. code-block:: php
@@ -114,8 +113,8 @@ making the class of a service a parameter:
114113
115114
services:
116115
mailer:
117-
class: %mailer.class%
118-
arguments: [%mailer.transport%]
116+
class: '%mailer.class%'
117+
arguments: ['%mailer.transport%']
119118
120119
.. code-block:: xml
121120
@@ -151,15 +150,25 @@ making the class of a service a parameter:
151150
The percent sign inside a parameter or argument, as part of the string, must
152151
be escaped with another percent sign:
153152

153+
.. configuration-block::
154+
155+
.. code-block:: yaml
156+
157+
arguments: ['http://symfony.com/?foo=%%s&bar=%%d']
158+
154159
.. code-block:: xml
155160
156161
<argument type="string">http://symfony.com/?foo=%%s&bar=%%d</argument>
157162
163+
.. code-block:: php
164+
165+
->addArgument('http://symfony.com/?foo=%%s&bar=%%d');
166+
158167
Array Parameters
159168
----------------
160169

161170
Parameters do not need to be flat strings, they can also be arrays. For the XML
162-
format, you need to use the type="collection" attribute for all parameters that are
171+
format, you need to use the ``type="collection"`` attribute for all parameters that are
163172
arrays.
164173

165174
.. configuration-block::

0 commit comments

Comments
 (0)