Skip to content

Commit abd10ca

Browse files
committed
minor #5992 More use single quotes for YAML strings (snoek09)
This PR was merged into the 2.3 branch. Discussion ---------- More use single quotes for YAML strings | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #5935 Commits ------- e9461ca use single quotes for YAML strings
2 parents 647fdaa + e9461ca commit abd10ca

35 files changed

+78
-78
lines changed

best_practices/i18n.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ following ``translator`` configuration option and set your application locale:
1111
# app/config/config.yml
1212
framework:
1313
# ...
14-
translator: { fallbacks: ["%locale%"] }
14+
translator: { fallbacks: ['%locale%'] }
1515
1616
# app/config/parameters.yml
1717
parameters:

best_practices/templates.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ name is irrelevant because you never use it in your own code):
156156
services:
157157
app.twig.app_extension:
158158
class: AppBundle\Twig\AppExtension
159-
arguments: ["@markdown"]
159+
arguments: ['@markdown']
160160
public: false
161161
tags:
162162
- { name: twig.extension }

book/service_container.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ straightforward. Parameters make defining services more organized and flexible:
209209
services:
210210
my_mailer:
211211
class: Acme\HelloBundle\Mailer
212-
arguments: ["%my_mailer.transport%"]
212+
arguments: ['%my_mailer.transport%']
213213
214214
.. code-block:: xml
215215
@@ -353,7 +353,7 @@ directories don't exist, create them.
353353
services:
354354
my_mailer:
355355
class: Acme\HelloBundle\Mailer
356-
arguments: ["%my_mailer.transport%"]
356+
arguments: ['%my_mailer.transport%']
357357
358358
.. code-block:: xml
359359
@@ -614,7 +614,7 @@ the service container gives you a much more appealing option:
614614
615615
newsletter_manager:
616616
class: Acme\HelloBundle\Newsletter\NewsletterManager
617-
arguments: ["@my_mailer"]
617+
arguments: ['@my_mailer']
618618
619619
.. code-block:: xml
620620
@@ -700,7 +700,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
700700
newsletter_manager:
701701
class: Acme\HelloBundle\Newsletter\NewsletterManager
702702
calls:
703-
- [setMailer, ["@my_mailer"]]
703+
- [setMailer, ['@my_mailer']]
704704
705705
.. code-block:: xml
706706
@@ -762,7 +762,7 @@ it exists and do nothing if it doesn't:
762762
services:
763763
newsletter_manager:
764764
class: Acme\HelloBundle\Newsletter\NewsletterManager
765-
arguments: ["@?my_mailer"]
765+
arguments: ['@?my_mailer']
766766
767767
.. code-block:: xml
768768
@@ -872,7 +872,7 @@ Configuring the service container is easy:
872872
services:
873873
newsletter_manager:
874874
class: Acme\HelloBundle\Newsletter\NewsletterManager
875-
arguments: ["@mailer", "@templating"]
875+
arguments: ['@mailer', '@templating']
876876
877877
.. code-block:: xml
878878

components/dependency_injection/_imports-parameters-note.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# app/config/config.yml
1212
imports:
13-
- { resource: "%kernel.root_dir%/parameters.yml" }
13+
- { resource: '%kernel.root_dir%/parameters.yml' }
1414

1515
.. code-block:: xml
1616

components/dependency_injection/configurators.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,20 @@ The service config for the above classes would look something like this:
139139
140140
email_configurator:
141141
class: EmailConfigurator
142-
arguments: ["@email_formatter_manager"]
142+
arguments: ['@email_formatter_manager']
143143
# ...
144144
145145
newsletter_manager:
146146
class: NewsletterManager
147147
calls:
148148
- [setMailer, ["@my_mailer"]]
149-
configurator: ["@email_configurator", configure]
149+
configurator: ['@email_configurator', configure]
150150
151151
greeting_card_manager:
152152
class: GreetingCardManager
153153
calls:
154-
- [setMailer, ["@my_mailer"]]
155-
configurator: ["@email_configurator", configure]
154+
- [setMailer, ['@my_mailer']]
155+
configurator: ['@email_configurator', configure]
156156
157157
.. code-block:: xml
158158

components/dependency_injection/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ config files:
239239
services:
240240
mailer:
241241
class: Mailer
242-
arguments: ["%mailer.transport%"]
242+
arguments: ['%mailer.transport%']
243243
newsletter_manager:
244244
class: NewsletterManager
245245
calls:

components/dependency_injection/parameters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ the parameter value in one place if needed.
151151

152152
.. code-block:: yaml
153153
154-
arguments: ["http://symfony.com/?foo=%%s&bar=%%d"]
154+
arguments: ['http://symfony.com/?foo=%%s&bar=%%d']
155155
156156
.. code-block:: xml
157157

components/dependency_injection/tags.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ For example you may add the following transports as services:
7474
acme_mailer.transport.smtp:
7575
class: \Swift_SmtpTransport
7676
arguments:
77-
- "%mailer_host%"
77+
- '%mailer_host%'
7878
tags:
7979
- { name: acme_mailer.transport }
8080
acme_mailer.transport.sendmail:
@@ -220,7 +220,7 @@ To answer this, change the service declaration:
220220
acme_mailer.transport.smtp:
221221
class: \Swift_SmtpTransport
222222
arguments:
223-
- "%mailer_host%"
223+
- '%mailer_host%'
224224
tags:
225225
- { name: acme_mailer.transport, alias: foo }
226226
acme_mailer.transport.sendmail:

components/dependency_injection/types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ service container configuration:
4343
# ...
4444
newsletter_manager:
4545
class: NewsletterManager
46-
arguments: ["@my_mailer"]
46+
arguments: ['@my_mailer']
4747
4848
.. code-block:: xml
4949

components/yaml/yaml_format.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ YAML uses indentation with one or more spaces to describe nested collections:
216216

217217
.. code-block:: yaml
218218
219-
"symfony 1.0":
219+
'symfony 1.0':
220220
PHP: 5.0
221221
Propel: 1.2
222-
"symfony 1.2":
222+
'symfony 1.2':
223223
PHP: 5.2
224224
Propel: 1.3
225225
@@ -279,8 +279,8 @@ You can mix and match styles to achieve a better readability:
279279
280280
.. code-block:: yaml
281281
282-
"symfony 1.0": { PHP: 5.0, Propel: 1.2 }
283-
"symfony 1.2": { PHP: 5.2, Propel: 1.3 }
282+
'symfony 1.0': { PHP: 5.0, Propel: 1.2 }
283+
'symfony 1.2': { PHP: 5.2, Propel: 1.3 }
284284
285285
Comments
286286
--------

0 commit comments

Comments
 (0)