Skip to content

Commit 50c8385

Browse files
committed
minor #7016 Add empty parentheses to method names (bocharsky-bw)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #7016). Discussion ---------- Add empty parentheses to method names Method name is clearer with empty parentheses at the end Commits ------- 04c44e9 Add empty parentheses to the method name
2 parents 8ae46d2 + 04c44e9 commit 50c8385

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

routing.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Thanks to these two routes:
120120

121121
* If the user goes to ``/blog/*``, the second route is matched and ``showAction()``
122122
is executed. Because the route path is ``/blog/{slug}``, a ``$slug`` variable is
123-
passed to ``showAction`` matching that value. For example, if the user goes to
123+
passed to ``showAction()`` matching that value. For example, if the user goes to
124124
``/blog/yay-routing``, then ``$slug`` will equal ``yay-routing``.
125125

126126
Whenever you have a ``{placeholder}`` in your route path, that portion becomes a
@@ -502,11 +502,11 @@ The pattern has three parts, each separated by a colon:
502502

503503
For example, a ``_controller`` value of ``AppBundle:Blog:show`` means:
504504

505-
============= ================== ==============
505+
============= ================== ================
506506
Bundle Controller Class Method Name
507-
============= ================== ==============
508-
``AppBundle`` ``BlogController`` ``showAction``
509-
============= ================== ==============
507+
============= ================== ================
508+
``AppBundle`` ``BlogController`` ``showAction()``
509+
============= ================== ================
510510

511511
The controller might look like this::
512512

@@ -524,7 +524,7 @@ The controller might look like this::
524524
}
525525

526526
Notice that Symfony adds the string ``Controller`` to the class name (``Blog``
527-
=> ``BlogController``) and ``Action`` to the method name (``show`` => ``showAction``).
527+
=> ``BlogController``) and ``Action`` to the method name (``show`` => ``showAction()``).
528528

529529
You could also refer to this controller using its fully-qualified class name
530530
and method: ``AppBundle\Controller\BlogController::showAction``. But if you

0 commit comments

Comments
 (0)