Skip to content

Commit de95293

Browse files
DylanDelobeljaviereguiluz
authored andcommitted
Fix missing trailling commas
1 parent 6f2d09c commit de95293

31 files changed

+36
-40
lines changed

best_practices/controllers.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ for the homepage of our app:
111111
->findLatest();
112112
113113
return $this->render('default/index.html.twig', array(
114-
'posts' => $posts
114+
'posts' => $posts,
115115
));
116116
}
117117
}

best_practices/forms.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ some developers configure form buttons in the controller::
132132
$form = $this->createForm(new PostType(), $post);
133133
$form->add('submit', 'submit', array(
134134
'label' => 'Create',
135-
'attr' => array('class' => 'btn btn-default pull-right')
135+
'attr' => array('class' => 'btn btn-default pull-right'),
136136
));
137137

138138
// ...

components/dom_crawler.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ Pass an array of values::
397397
// sets multiple fields at once
398398
$form->setValues(array('multi' => array(
399399
1 => 'value',
400-
'dimensional' => 'an other value'
400+
'dimensional' => 'an other value',
401401
)));
402402

403403
This is great, but it gets better! The ``Form`` object allows you to interact

components/http_foundation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ class, which can make this even easier::
564564

565565
$response = new JsonResponse();
566566
$response->setData(array(
567-
'data' => 123
567+
'data' => 123,
568568
));
569569

570570
This encodes your array of data to JSON and sets the ``Content-Type`` header

configuration/environments.rst

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ configuration file:
139139
140140
$container->loadFromExtension('web_profiler', array(
141141
'toolbar' => true,
142-
143142
// ...
144143
));
145144

console/style.rst

-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ of your commands to change their appearance::
372372

373373
// After
374374
$io = new CustomStyle($input, $output);
375-
376375
// ...
377376
}
378377
}

doctrine/event_listeners_subscribers.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ managers that use this connection.
106106
->register('my.listener2', SearchIndexer2::class)
107107
->addTag('doctrine.event_listener', array(
108108
'event' => 'postPersist',
109-
'connection' => 'default'
109+
'connection' => 'default',
110110
))
111111
;
112112
$container

email/spool.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ swiftmailer with the memory option, use the following configuration:
5252
// app/config/config.php
5353
$container->loadFromExtension('swiftmailer', array(
5454
// ...
55-
'spool' => array('type' => 'memory')
55+
'spool' => array('type' => 'memory'),
5656
));
5757
5858
.. _spool-using-a-file:

form/form_dependencies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ create your form::
3737
{
3838
$task = ...;
3939
$form = $this->createForm(new TaskType(), $task, array(
40-
'entity_manager' => $this->get('doctrine.orm.entity_manager')
40+
'entity_manager' => $this->get('doctrine.orm.entity_manager'),
4141
));
4242

4343
// ...

form/inherit_data_option.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ for that::
106106
public function configureOptions(OptionsResolver $resolver)
107107
{
108108
$resolver->setDefaults(array(
109-
'inherit_data' => true
109+
'inherit_data' => true,
110110
));
111111
}
112112

http_cache/validation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ exposing a simple and efficient pattern::
218218
// or render a template with the $response you've already started
219219
return $this->render('article/show.html.twig', array(
220220
'article' => $article,
221-
'comments' => $comments
221+
'comments' => $comments,
222222
), $response);
223223
}
224224
}

quick_tour/the_controller.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ a new method called ``helloAction()`` with the following content::
7070
public function helloAction($name)
7171
{
7272
return $this->render('default/hello.html.twig', array(
73-
'name' => $name
73+
'name' => $name,
7474
));
7575
}
7676
}
@@ -125,7 +125,7 @@ as its default value::
125125
public function helloAction($name, $_format)
126126
{
127127
return $this->render('default/hello.'.$_format.'.twig', array(
128-
'name' => $name
128+
'name' => $name,
129129
));
130130
}
131131

@@ -168,7 +168,7 @@ option of the ``@Route()`` annotation::
168168
public function helloAction($name, $_format)
169169
{
170170
return $this->render('default/hello.'.$_format.'.twig', array(
171-
'name' => $name
171+
'name' => $name,
172172
));
173173
}
174174

quick_tour/the_view.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ on its type:
6868
6969
{# 1. Simple variables #}
7070
{# $this->render('template.html.twig', array(
71-
'name' => 'Fabien')
72-
) #}
71+
'name' => 'Fabien',
72+
)) #}
7373
{{ name }}
7474
7575
{# 2. Arrays #}

reference/configuration/framework.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ Assume you have custom global form themes in
13111311
'templating' => array(
13121312
'form' => array(
13131313
'resources' => array(
1314-
'WebsiteBundle:Form'
1314+
'WebsiteBundle:Form',
13151315
),
13161316
),
13171317
),

reference/configuration/security.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,11 @@ multiple firewalls, the "context" could actually be shared:
531531
'firewalls' => array(
532532
'somename' => array(
533533
// ...
534-
'context' => 'my_context'
534+
'context' => 'my_context',
535535
),
536536
'othername' => array(
537537
// ...
538-
'context' => 'my_context'
538+
'context' => 'my_context',
539539
),
540540
),
541541
));

reference/constraints/CardScheme.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ on an object that will contain a credit card number.
8989
{
9090
$metadata->addPropertyConstraint('cardNumber', new Assert\CardScheme(array(
9191
'schemes' => array(
92-
'VISA'
92+
'VISA',
9393
),
9494
'message' => 'Your credit card number is invalid.',
9595
)));

reference/constraints/Isbn.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ on an object that will contain an ISBN.
9999
{
100100
$metadata->addPropertyConstraint('isbn', new Assert\Isbn(array(
101101
'type' => 'isbn10',
102-
'message' => 'This value is not valid.'
102+
'message' => 'This value is not valid.',
103103
)));
104104
}
105105
}

reference/forms/types/collection.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ address as its own input text box::
5858
'type' => 'email',
5959
// these options are passed to each "email" type
6060
'options' => array(
61-
'attr' => array('class' => 'email-box')
61+
'attr' => array('class' => 'email-box'),
6262
),
6363
));
6464

reference/forms/types/date.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ values for the year, month and day fields::
145145

146146
$builder->add('dueDate', 'date', array(
147147
'placeholder' => array(
148-
'year' => 'Year', 'month' => 'Month', 'day' => 'Day'
148+
'year' => 'Year', 'month' => 'Month', 'day' => 'Day',
149149
)
150150
));
151151

reference/forms/types/options/group_by.rst.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Take the following example::
2020
'now' => new \DateTime('now'),
2121
'tomorrow' => new \DateTime('+1 day'),
2222
'1 week' => new \DateTime('+1 week'),
23-
'1 month' => new \DateTime('+1 month')
23+
'1 month' => new \DateTime('+1 month'),
2424
),
2525
'choices_as_values' => true,
2626
'group_by' => function($val, $key, $index) {

reference/forms/types/options/preferred_choices.rst.inc

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ you can list the most popular on top, like Bork Bork and Pirate::
1212
'English' => 'en',
1313
'Spanish' => 'es',
1414
'Bork' => 'muppets',
15-
'Pirate' => 'arr'
15+
'Pirate' => 'arr',
1616
),
1717
'choices_as_values' => true,
18-
'preferred_choices' => array('muppets', 'arr')
18+
'preferred_choices' => array('muppets', 'arr'),
1919
));
2020

2121
.. versionadded:: 2.7
@@ -29,7 +29,7 @@ be especially useful if your values are objects::
2929
'now' => new \DateTime('now'),
3030
'tomorrow' => new \DateTime('+1 day'),
3131
'1 week' => new \DateTime('+1 week'),
32-
'1 month' => new \DateTime('+1 month')
32+
'1 month' => new \DateTime('+1 month'),
3333
),
3434
'choices_as_values' => true,
3535
'preferred_choices' => function ($val, $key) {

routing/requirements.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ a routing ``{wildcard}`` to only match some regular expression:
6565
$collection->add('blog_list', new Route('/blog/{page}', array(
6666
'_controller' => 'AppBundle:Blog:list',
6767
), array(
68-
'page' => '\d+'
68+
'page' => '\d+',
6969
)));
7070
7171
// ...

security/access_control.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ pattern so that it is only accessible by requests from the local server itself:
209209
array(
210210
'path' => '^/internal',
211211
'role' => 'IS_AUTHENTICATED_ANONYMOUSLY',
212-
'ips' => '127.0.0.1, ::1'
212+
'ips' => '127.0.0.1, ::1',
213213
),
214214
array(
215215
'path' => '^/internal',
216-
'role' => 'ROLE_NO_ACCESS'
216+
'role' => 'ROLE_NO_ACCESS',
217217
),
218218
),
219219
));

security/csrf_in_login_form.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ After this, you have protected your login form against CSRF attacks.
209209
'form_login' => array(
210210
// ...
211211
'csrf_parameter' => '_csrf_security_token',
212-
'intention' => 'a_private_string'
212+
'intention' => 'a_private_string',
213213
),
214214
),
215215
),

security/entity_provider.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,14 @@ so you only need the new interface::
375375
{
376376
return serialize(array(
377377
// ...
378-
$this->isActive
378+
$this->isActive,
379379
));
380380
}
381381
public function unserialize($serialized)
382382
{
383383
list (
384384
// ...
385-
$this->isActive
385+
$this->isActive,
386386
) = unserialize($serialized);
387387
}
388388
}

security/impersonating_user.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ the sticky locale:
228228
->register('app.switch_user_listener', SwitchUserListener::class)
229229
->addTag('kernel.event_listener', array(
230230
'event' => 'security.switch_user',
231-
'method' => 'onSwitchUser'
231+
'method' => 'onSwitchUser',
232232
))
233233
;
234234

security/named_encoders.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ named encoders:
9696
'encoders' => array(
9797
'harsh' => array(
9898
'algorithm' => 'bcrypt',
99-
'cost' => '15'
99+
'cost' => '15',
100100
),
101101
),
102102
));
@@ -165,7 +165,7 @@ you must register a service for it in order to use it as a named encoder:
165165
// ...
166166
'encoders' => array(
167167
'app_encoder' => array(
168-
'id' => 'app.password_encoder_service'
168+
'id' => 'app.password_encoder_service',
169169
),
170170
),
171171
));

service_container/definitions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fetched from the container::
7979

8080
$definition = new Definition(DoctrineConfigManager::class, array(
8181
new Reference('doctrine'), // a reference to another service
82-
'%app.config_table_name%' // will be resolved to the value of a container parameter
82+
'%app.config_table_name%', // will be resolved to the value of a container parameter
8383
));
8484

8585
// gets all arguments configured for this definition

service_container/import.rst

-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ invokes the service container extension inside the FrameworkBundle:
174174
$container->loadFromExtension('framework', array(
175175
'secret' => 'xxxxxxxxxx',
176176
'form' => array(),
177-
178177
// ...
179178
));
180179

templating/PHP.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ Here, the ``AppBundle:Hello:fancy`` string refers to the ``fancy`` action of the
289289

290290
return $this->render('AppBundle:Hello:fancy.html.php', array(
291291
'name' => $name,
292-
'object' => $object
292+
'object' => $object,
293293
));
294294
}
295295

templating/templating_service.rst

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ configuration file:
5959
// app/config/config.php
6060
$container->loadFromExtension('framework', array(
6161
// ...
62-
6362
'templating' => array(
6463
'engines' => array('twig'),
6564
),

0 commit comments

Comments
 (0)