diff --git a/best_practices/controllers.rst b/best_practices/controllers.rst index ef4f40d417d..d40c7406c8c 100644 --- a/best_practices/controllers.rst +++ b/best_practices/controllers.rst @@ -111,7 +111,7 @@ for the homepage of our app: ->findLatest(); return $this->render('default/index.html.twig', array( - 'posts' => $posts + 'posts' => $posts, )); } } diff --git a/best_practices/forms.rst b/best_practices/forms.rst index 9e87939b82d..a53b7f35c6f 100644 --- a/best_practices/forms.rst +++ b/best_practices/forms.rst @@ -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'), )); // ... diff --git a/components/dom_crawler.rst b/components/dom_crawler.rst index be5d85ba2ab..7883028cf0d 100644 --- a/components/dom_crawler.rst +++ b/components/dom_crawler.rst @@ -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 diff --git a/components/http_foundation.rst b/components/http_foundation.rst index aaee9ec73ad..a7bfc9382f7 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -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 diff --git a/configuration/environments.rst b/configuration/environments.rst index 993863b4514..d7f4394a964 100644 --- a/configuration/environments.rst +++ b/configuration/environments.rst @@ -139,7 +139,6 @@ configuration file: $container->loadFromExtension('web_profiler', array( 'toolbar' => true, - // ... )); diff --git a/console/style.rst b/console/style.rst index e764bdc932b..6587bd9b09a 100644 --- a/console/style.rst +++ b/console/style.rst @@ -372,7 +372,6 @@ of your commands to change their appearance:: // After $io = new CustomStyle($input, $output); - // ... } } diff --git a/doctrine/event_listeners_subscribers.rst b/doctrine/event_listeners_subscribers.rst index 063be429726..716ff97a3b8 100644 --- a/doctrine/event_listeners_subscribers.rst +++ b/doctrine/event_listeners_subscribers.rst @@ -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 diff --git a/email/spool.rst b/email/spool.rst index 2621be481b4..53622386f49 100644 --- a/email/spool.rst +++ b/email/spool.rst @@ -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: diff --git a/form/form_dependencies.rst b/form/form_dependencies.rst index 80173f97c2e..e95a53776a1 100644 --- a/form/form_dependencies.rst +++ b/form/form_dependencies.rst @@ -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'), )); // ... diff --git a/form/inherit_data_option.rst b/form/inherit_data_option.rst index b4bd6c06172..1da2351a6c4 100644 --- a/form/inherit_data_option.rst +++ b/form/inherit_data_option.rst @@ -106,7 +106,7 @@ for that:: public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults(array( - 'inherit_data' => true + 'inherit_data' => true, )); } diff --git a/http_cache/validation.rst b/http_cache/validation.rst index c3dadbeb901..c21ec877539 100644 --- a/http_cache/validation.rst +++ b/http_cache/validation.rst @@ -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); } } diff --git a/quick_tour/the_controller.rst b/quick_tour/the_controller.rst index bd33e9558f6..81456954141 100644 --- a/quick_tour/the_controller.rst +++ b/quick_tour/the_controller.rst @@ -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, )); } } @@ -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, )); } @@ -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, )); } diff --git a/quick_tour/the_view.rst b/quick_tour/the_view.rst index 693433805f7..6254099475f 100644 --- a/quick_tour/the_view.rst +++ b/quick_tour/the_view.rst @@ -68,8 +68,8 @@ on its type: {# 1. Simple variables #} {# $this->render('template.html.twig', array( - 'name' => 'Fabien') - ) #} + 'name' => 'Fabien', + )) #} {{ name }} {# 2. Arrays #} diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 711d3895ef9..14fe8298d5a 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -1311,7 +1311,7 @@ Assume you have custom global form themes in 'templating' => array( 'form' => array( 'resources' => array( - 'WebsiteBundle:Form' + 'WebsiteBundle:Form', ), ), ), diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index e4c856ad4bf..c2887438156 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -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', ), ), )); diff --git a/reference/constraints/CardScheme.rst b/reference/constraints/CardScheme.rst index ce074945557..51707f864fd 100644 --- a/reference/constraints/CardScheme.rst +++ b/reference/constraints/CardScheme.rst @@ -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.', ))); diff --git a/reference/constraints/Isbn.rst b/reference/constraints/Isbn.rst index a72d2f8f624..f653dfe4ab3 100644 --- a/reference/constraints/Isbn.rst +++ b/reference/constraints/Isbn.rst @@ -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.', ))); } } diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index 9e99608ebf7..3f21db3a8a8 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -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'), ), )); diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index 6bd99e48254..6a21bea4c28 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -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', ) )); diff --git a/reference/forms/types/options/group_by.rst.inc b/reference/forms/types/options/group_by.rst.inc index 529d3f9fff2..3628a39d388 100644 --- a/reference/forms/types/options/group_by.rst.inc +++ b/reference/forms/types/options/group_by.rst.inc @@ -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) { diff --git a/reference/forms/types/options/preferred_choices.rst.inc b/reference/forms/types/options/preferred_choices.rst.inc index 9a25d58b80c..8393bd8cf4f 100644 --- a/reference/forms/types/options/preferred_choices.rst.inc +++ b/reference/forms/types/options/preferred_choices.rst.inc @@ -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 @@ -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) { diff --git a/routing/requirements.rst b/routing/requirements.rst index c835a636e4d..f1efff3b664 100644 --- a/routing/requirements.rst +++ b/routing/requirements.rst @@ -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+', ))); // ... diff --git a/security/access_control.rst b/security/access_control.rst index 6377a8eed3c..2bbedd6781b 100644 --- a/security/access_control.rst +++ b/security/access_control.rst @@ -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', ), ), )); diff --git a/security/csrf_in_login_form.rst b/security/csrf_in_login_form.rst index 4c030f68745..e8d57bb9c68 100644 --- a/security/csrf_in_login_form.rst +++ b/security/csrf_in_login_form.rst @@ -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', ), ), ), diff --git a/security/entity_provider.rst b/security/entity_provider.rst index c42b621998c..fc506f2c400 100644 --- a/security/entity_provider.rst +++ b/security/entity_provider.rst @@ -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); } } diff --git a/security/impersonating_user.rst b/security/impersonating_user.rst index 8dcffff5719..0b34e0ce0c2 100644 --- a/security/impersonating_user.rst +++ b/security/impersonating_user.rst @@ -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', )) ; diff --git a/security/named_encoders.rst b/security/named_encoders.rst index 0ed0b696c29..a4c1eeadac6 100644 --- a/security/named_encoders.rst +++ b/security/named_encoders.rst @@ -96,7 +96,7 @@ named encoders: 'encoders' => array( 'harsh' => array( 'algorithm' => 'bcrypt', - 'cost' => '15' + 'cost' => '15', ), ), )); @@ -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', ), ), )); diff --git a/service_container/definitions.rst b/service_container/definitions.rst index ea26c5ff359..b47ea9e143e 100644 --- a/service_container/definitions.rst +++ b/service_container/definitions.rst @@ -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 diff --git a/service_container/import.rst b/service_container/import.rst index bc9da428f28..e0852c7e136 100644 --- a/service_container/import.rst +++ b/service_container/import.rst @@ -174,7 +174,6 @@ invokes the service container extension inside the FrameworkBundle: $container->loadFromExtension('framework', array( 'secret' => 'xxxxxxxxxx', 'form' => array(), - // ... )); diff --git a/templating/PHP.rst b/templating/PHP.rst index f38b994587e..a2aa364ee16 100644 --- a/templating/PHP.rst +++ b/templating/PHP.rst @@ -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, )); } diff --git a/templating/templating_service.rst b/templating/templating_service.rst index 0a86a8a324d..dc1ac32e25c 100644 --- a/templating/templating_service.rst +++ b/templating/templating_service.rst @@ -59,7 +59,6 @@ configuration file: // app/config/config.php $container->loadFromExtension('framework', array( // ... - 'templating' => array( 'engines' => array('twig'), ),