Skip to content

Commit 9a7485c

Browse files
committed
Remove usages of the code block shortcut in rST
Github does not highlight those as PHP code.
1 parent 8c9fde0 commit 9a7485c

File tree

5 files changed

+36
-12
lines changed

5 files changed

+36
-12
lines changed

docs/adding_invitation_registration.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Invitation model
99
----------------
1010

1111
First we need to add the invitation entity. An invitation is represented
12-
by a unique code/identifier generated in the constructor::
12+
by a unique code/identifier generated in the constructor:
13+
14+
.. code-block:: php
1315
1416
<?php
1517
// src/AppBundle/Entity/Invitation.php
@@ -68,7 +70,9 @@ by a unique code/identifier generated in the constructor::
6870
}
6971
}
7072
71-
Next we map our ``Invitation`` entity to our ``User`` with a one-to-one association::
73+
Next we map our ``Invitation`` entity to our ``User`` with a one-to-one association:
74+
75+
.. code-block:: php
7276
7377
<?php
7478
// src/AppBundel/Entity/User.php
@@ -105,7 +109,9 @@ Next we map our ``Invitation`` entity to our ``User`` with a one-to-one associat
105109
Add invitation to RegistrationFormType
106110
--------------------------------------
107111

108-
Override the default registration form with your own::
112+
Override the default registration form with your own:
113+
114+
.. code-block:: php
109115
110116
<?php
111117
// src/AppBundle/Form/RegistrationFormType.php
@@ -134,7 +140,9 @@ Override the default registration form with your own::
134140
}
135141
}
136142
137-
Create the invitation field::
143+
Create the invitation field:
144+
145+
.. code-block:: php
138146
139147
<?php
140148
// src/AppBundle/Form/InvitationFormType.php
@@ -182,7 +190,9 @@ Create the invitation field::
182190
}
183191
}
184192
185-
Create the custom data transformer::
193+
Create the custom data transformer:
194+
195+
.. code-block:: php
186196
187197
<?php
188198
// src/AppBundle/Form/DataTransformer/InvitationToCodeTransformer.php

docs/controller_events.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ Controllers with a form also dispatch an ``INITIALIZE`` event after the entity i
2020
fetched, but before the form is created.
2121

2222
For instance, this listener will change the redirection after the password
23-
resetting to go to the homepage instead of the profile::
23+
resetting to go to the homepage instead of the profile:
24+
25+
.. code-block:: php
2426
2527
// src/Acme/UserBundle/EventListener/PasswordResettingListener.php
2628
@@ -89,7 +91,9 @@ Registration success listener with enabled confirmation at the same time
8991

9092
When you have registration confirmation and you want to hook up to
9193
``FOSUserEvents::REGISTRATION_SUCCESS`` event you will have to prioritize this listener to be called
92-
before ``FOS\UserBundle\EventListener\EmailConfirmationListener::onRegistrationSuccess``::
94+
before ``FOS\UserBundle\EventListener\EmailConfirmationListener::onRegistrationSuccess``:
95+
96+
.. code-block:: php
9397
9498
public static function getSubscribedEvents()
9599
{

docs/form_type.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ The username Form Type
33

44
FOSUserBundle provides a convenient username form type, named ``fos_user_username``.
55
It appears as a text input, accepts usernames and convert them to a User
6-
instance::
6+
instance:
7+
8+
.. code-block:: php
79
810
class MessageFormType extends AbstractType
911
{

docs/index.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ If you encounter installation errors pointing at a lack of configuration paramet
6161
Step 2: Enable the bundle
6262
~~~~~~~~~~~~~~~~~~~~~~~~~
6363

64-
Enable the bundle in the kernel::
64+
Enable the bundle in the kernel:
65+
66+
.. code-block:: php
6567
6668
<?php
6769
// app/AppKernel.php
@@ -186,7 +188,9 @@ b) MongoDB User class
186188

187189
If you're persisting your users via the Doctrine MongoDB ODM, then your ``User``
188190
class should live in the ``Document`` namespace of your bundle and look like
189-
this to start::
191+
this to start:
192+
193+
.. code-block:: php
190194
191195
<?php
192196
// src/AppBundle/Document/User.php
@@ -218,7 +222,9 @@ c) CouchDB User class
218222

219223
If you're persisting your users via the Doctrine CouchDB ODM, then your ``User``
220224
class should live in the ``CouchDocument`` namespace of your bundle and look
221-
like this to start::
225+
like this to start:
226+
227+
.. code-block:: php
222228
223229
<?php
224230
// src/AppBundle/CouchDocument/User.php

docs/user_manager.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ Updating a User object
105105
This will then be equivalent to calling ``updateCanonicalFields`` and
106106
``updatePassword``.
107107

108-
An ORM example::
108+
An ORM example:
109+
110+
.. code-block:: php
109111
110112
class MainController extends Controller
111113
{

0 commit comments

Comments
 (0)