Skip to content

Fix missing trailling commas #9238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion best_practices/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ for the homepage of our app:
->findLatest();

return $this->render('default/index.html.twig', array(
'posts' => $posts
'posts' => $posts,
));
}
}
Expand Down
2 changes: 1 addition & 1 deletion best_practices/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ some developers configure form buttons in the controller::
$form = $this->createForm(new PostType(), $post);
$form->add('submit', 'submit', array(
'label' => 'Create',
'attr' => array('class' => 'btn btn-default pull-right')
'attr' => array('class' => 'btn btn-default pull-right'),
));

// ...
Expand Down
2 changes: 1 addition & 1 deletion components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ Pass an array of values::
// sets multiple fields at once
$form->setValues(array('multi' => array(
1 => 'value',
'dimensional' => 'an other value'
'dimensional' => 'an other value',
)));

This is great, but it gets better! The ``Form`` object allows you to interact
Expand Down
2 changes: 1 addition & 1 deletion components/http_foundation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ class, which can make this even easier::

$response = new JsonResponse();
$response->setData(array(
'data' => 123
'data' => 123,
));

This encodes your array of data to JSON and sets the ``Content-Type`` header
Expand Down
1 change: 0 additions & 1 deletion configuration/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ configuration file:
$container->loadFromExtension('web_profiler', array(
'toolbar' => true,
// ...
));
Expand Down
1 change: 0 additions & 1 deletion console/style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ of your commands to change their appearance::

// After
$io = new CustomStyle($input, $output);

// ...
}
}
2 changes: 1 addition & 1 deletion doctrine/event_listeners_subscribers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ managers that use this connection.
->register('my.listener2', SearchIndexer2::class)
->addTag('doctrine.event_listener', array(
'event' => 'postPersist',
'connection' => 'default'
'connection' => 'default',
))
;
$container
Expand Down
2 changes: 1 addition & 1 deletion email/spool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ swiftmailer with the memory option, use the following configuration:
// app/config/config.php
$container->loadFromExtension('swiftmailer', array(
// ...
'spool' => array('type' => 'memory')
'spool' => array('type' => 'memory'),
));

.. _spool-using-a-file:
Expand Down
2 changes: 1 addition & 1 deletion form/form_dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ create your form::
{
$task = ...;
$form = $this->createForm(new TaskType(), $task, array(
'entity_manager' => $this->get('doctrine.orm.entity_manager')
'entity_manager' => $this->get('doctrine.orm.entity_manager'),
));

// ...
Expand Down
2 changes: 1 addition & 1 deletion form/inherit_data_option.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ for that::
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'inherit_data' => true
'inherit_data' => true,
));
}

Expand Down
2 changes: 1 addition & 1 deletion http_cache/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ exposing a simple and efficient pattern::
// or render a template with the $response you've already started
return $this->render('article/show.html.twig', array(
'article' => $article,
'comments' => $comments
'comments' => $comments,
), $response);
}
}
Expand Down
6 changes: 3 additions & 3 deletions quick_tour/the_controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ a new method called ``helloAction()`` with the following content::
public function helloAction($name)
{
return $this->render('default/hello.html.twig', array(
'name' => $name
'name' => $name,
));
}
}
Expand Down Expand Up @@ -125,7 +125,7 @@ as its default value::
public function helloAction($name, $_format)
{
return $this->render('default/hello.'.$_format.'.twig', array(
'name' => $name
'name' => $name,
));
}

Expand Down Expand Up @@ -168,7 +168,7 @@ option of the ``@Route()`` annotation::
public function helloAction($name, $_format)
{
return $this->render('default/hello.'.$_format.'.twig', array(
'name' => $name
'name' => $name,
));
}

Expand Down
4 changes: 2 additions & 2 deletions quick_tour/the_view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ on its type:

{# 1. Simple variables #}
{# $this->render('template.html.twig', array(
'name' => 'Fabien')
) #}
'name' => 'Fabien',
)) #}
{{ name }}

{# 2. Arrays #}
Expand Down
2 changes: 1 addition & 1 deletion reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ Assume you have custom global form themes in
'templating' => array(
'form' => array(
'resources' => array(
'WebsiteBundle:Form'
'WebsiteBundle:Form',
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions reference/configuration/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,11 @@ multiple firewalls, the "context" could actually be shared:
'firewalls' => array(
'somename' => array(
// ...
'context' => 'my_context'
'context' => 'my_context',
),
'othername' => array(
// ...
'context' => 'my_context'
'context' => 'my_context',
),
),
));
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/CardScheme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ on an object that will contain a credit card number.
{
$metadata->addPropertyConstraint('cardNumber', new Assert\CardScheme(array(
'schemes' => array(
'VISA'
'VISA',
),
'message' => 'Your credit card number is invalid.',
)));
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Isbn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ on an object that will contain an ISBN.
{
$metadata->addPropertyConstraint('isbn', new Assert\Isbn(array(
'type' => 'isbn10',
'message' => 'This value is not valid.'
'message' => 'This value is not valid.',
)));
}
}
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ address as its own input text box::
'type' => 'email',
// these options are passed to each "email" type
'options' => array(
'attr' => array('class' => 'email-box')
'attr' => array('class' => 'email-box'),
),
));

Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ values for the year, month and day fields::

$builder->add('dueDate', 'date', array(
'placeholder' => array(
'year' => 'Year', 'month' => 'Month', 'day' => 'Day'
'year' => 'Year', 'month' => 'Month', 'day' => 'Day',
)
));

Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/options/group_by.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Take the following example::
'now' => new \DateTime('now'),
'tomorrow' => new \DateTime('+1 day'),
'1 week' => new \DateTime('+1 week'),
'1 month' => new \DateTime('+1 month')
'1 month' => new \DateTime('+1 month'),
),
'choices_as_values' => true,
'group_by' => function($val, $key, $index) {
Expand Down
6 changes: 3 additions & 3 deletions reference/forms/types/options/preferred_choices.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ you can list the most popular on top, like Bork Bork and Pirate::
'English' => 'en',
'Spanish' => 'es',
'Bork' => 'muppets',
'Pirate' => 'arr'
'Pirate' => 'arr',
),
'choices_as_values' => true,
'preferred_choices' => array('muppets', 'arr')
'preferred_choices' => array('muppets', 'arr'),
));

.. versionadded:: 2.7
Expand All @@ -29,7 +29,7 @@ be especially useful if your values are objects::
'now' => new \DateTime('now'),
'tomorrow' => new \DateTime('+1 day'),
'1 week' => new \DateTime('+1 week'),
'1 month' => new \DateTime('+1 month')
'1 month' => new \DateTime('+1 month'),
),
'choices_as_values' => true,
'preferred_choices' => function ($val, $key) {
Expand Down
2 changes: 1 addition & 1 deletion routing/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ a routing ``{wildcard}`` to only match some regular expression:
$collection->add('blog_list', new Route('/blog/{page}', array(
'_controller' => 'AppBundle:Blog:list',
), array(
'page' => '\d+'
'page' => '\d+',
)));

// ...
Expand Down
4 changes: 2 additions & 2 deletions security/access_control.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ pattern so that it is only accessible by requests from the local server itself:
array(
'path' => '^/internal',
'role' => 'IS_AUTHENTICATED_ANONYMOUSLY',
'ips' => '127.0.0.1, ::1'
'ips' => '127.0.0.1, ::1',
),
array(
'path' => '^/internal',
'role' => 'ROLE_NO_ACCESS'
'role' => 'ROLE_NO_ACCESS',
),
),
));
Expand Down
2 changes: 1 addition & 1 deletion security/csrf_in_login_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ After this, you have protected your login form against CSRF attacks.
'form_login' => array(
// ...
'csrf_parameter' => '_csrf_security_token',
'intention' => 'a_private_string'
'intention' => 'a_private_string',
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ so you only need the new interface::
{
return serialize(array(
// ...
$this->isActive
$this->isActive,
));
}
public function unserialize($serialized)
{
list (
// ...
$this->isActive
$this->isActive,
) = unserialize($serialized);
}
}
Expand Down
2 changes: 1 addition & 1 deletion security/impersonating_user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ the sticky locale:
->register('app.switch_user_listener', SwitchUserListener::class)
->addTag('kernel.event_listener', array(
'event' => 'security.switch_user',
'method' => 'onSwitchUser'
'method' => 'onSwitchUser',
))
;

Expand Down
4 changes: 2 additions & 2 deletions security/named_encoders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ named encoders:
'encoders' => array(
'harsh' => array(
'algorithm' => 'bcrypt',
'cost' => '15'
'cost' => '15',
),
),
));
Expand Down Expand Up @@ -165,7 +165,7 @@ you must register a service for it in order to use it as a named encoder:
// ...
'encoders' => array(
'app_encoder' => array(
'id' => 'app.password_encoder_service'
'id' => 'app.password_encoder_service',
),
),
));
Expand Down
2 changes: 1 addition & 1 deletion service_container/definitions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fetched from the container::

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

// gets all arguments configured for this definition
Expand Down
1 change: 0 additions & 1 deletion service_container/import.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ invokes the service container extension inside the FrameworkBundle:
$container->loadFromExtension('framework', array(
'secret' => 'xxxxxxxxxx',
'form' => array(),

// ...
));

Expand Down
2 changes: 1 addition & 1 deletion templating/PHP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Here, the ``AppBundle:Hello:fancy`` string refers to the ``fancy`` action of the

return $this->render('AppBundle:Hello:fancy.html.php', array(
'name' => $name,
'object' => $object
'object' => $object,
));
}

Expand Down
1 change: 0 additions & 1 deletion templating/templating_service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ configuration file:
// app/config/config.php
$container->loadFromExtension('framework', array(
// ...

'templating' => array(
'engines' => array('twig'),
),
Expand Down