Skip to content

Commit b93a117

Browse files
committed
Use php-symfony code block type for method-level examples
The ``::`` shorthand creates PHP code blocks that fail syntax validation because ``public function`` without a class context is invalid PHP.
1 parent 4e57428 commit b93a117

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

reference/events.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ even to change the controller entirely::
7070
}
7171

7272
You can also use ``getAttributes()`` to retrieve PHP attributes declared on the
73-
controller::
73+
controller:
74+
75+
.. code-block:: php-symfony
7476
7577
use Symfony\Component\HttpKernel\Event\ControllerEvent;
7678
@@ -188,7 +190,9 @@ before sending it back (e.g. add/modify HTTP headers, add cookies, etc.)::
188190
}
189191

190192
You can use ``getControllerAttributes()`` to retrieve PHP attributes declared
191-
on the controller that handled the request::
193+
on the controller that handled the request:
194+
195+
.. code-block:: php-symfony
192196
193197
use Symfony\Component\HttpKernel\Event\ResponseEvent;
194198

0 commit comments

Comments
 (0)