Skip to content

Commit 2828093

Browse files
committed
Fix code examples in PHPDoc
1 parent 79d26eb commit 2828093

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

Kernel/MicroKernelTrait.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ abstract protected function configureRoutes(RouteCollectionBuilder $routes);
3838
*
3939
* You can register extensions:
4040
*
41-
* $c->loadFromExtension('framework', array(
42-
* 'secret' => '%secret%'
43-
* ));
41+
* $c->loadFromExtension('framework', array(
42+
* 'secret' => '%secret%'
43+
* ));
4444
*
4545
* Or services:
4646
*
47-
* $c->register('halloween', 'FooBundle\HalloweenProvider');
47+
* $c->register('halloween', 'FooBundle\HalloweenProvider');
4848
*
4949
* Or parameters:
5050
*
51-
* $c->setParameter('halloween', 'lot of fun');
51+
* $c->setParameter('halloween', 'lot of fun');
5252
*
5353
* @param ContainerBuilder $c
5454
* @param LoaderInterface $loader

Templating/Helper/FormHelper.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,14 @@ public function block(FormView $view, $blockName, array $variables = array())
232232
* Use this helper for CSRF protection without the overhead of creating a
233233
* form.
234234
*
235-
* <code>
236-
* echo $view['form']->csrfToken('rm_user_'.$user->getId());
237-
* </code>
235+
* echo $view['form']->csrfToken('rm_user_'.$user->getId());
238236
*
239237
* Check the token in your action using the same intention.
240238
*
241-
* <code>
242-
* $csrfProvider = $this->get('security.csrf.token_generator');
243-
* if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) {
244-
* throw new \RuntimeException('CSRF attack detected.');
245-
* }
246-
* </code>
239+
* $csrfProvider = $this->get('security.csrf.token_generator');
240+
* if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) {
241+
* throw new \RuntimeException('CSRF attack detected.');
242+
* }
247243
*
248244
* @param string $intention The intention of the protected action
249245
*

0 commit comments

Comments
 (0)