Skip to content

Commit 0a7d8bb

Browse files
committed
minor #6528 Fixed a minor indentation issue (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- Fixed a minor indentation issue Lists are always tricky because you must indent with 3 white spaces instead of 4: ### Before ![before_syntax](https://cloud.githubusercontent.com/assets/73419/14988687/4e8322cc-1155-11e6-923d-cf961898eda8.png) ### After ![after_syntax](https://cloud.githubusercontent.com/assets/73419/14988689/514154fc-1155-11e6-985c-160fa8570fcb.png) Commits ------- e03d69f Fixed a minor indentation issue
2 parents 1e1ab96 + e03d69f commit 0a7d8bb

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

book/controller.rst

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -321,42 +321,42 @@ Keep the following guidelines in mind while you develop.
321321

322322
#. **The order of the controller arguments does not matter**
323323

324-
Symfony matches the parameter **names** from the route to the variable
325-
**names** of the controller. The arguments of the controller could be
326-
totally reordered and still work perfectly::
324+
Symfony matches the parameter **names** from the route to the variable
325+
**names** of the controller. The arguments of the controller could be
326+
totally reordered and still work perfectly::
327327

328-
public function indexAction($lastName, $firstName)
329-
{
330-
// ...
331-
}
328+
public function indexAction($lastName, $firstName)
329+
{
330+
// ...
331+
}
332332

333333
#. **Each required controller argument must match up with a routing parameter**
334334

335-
The following would throw a ``RuntimeException`` because there is no
336-
``foo`` parameter defined in the route::
335+
The following would throw a ``RuntimeException`` because there is no
336+
``foo`` parameter defined in the route::
337337

338-
public function indexAction($firstName, $lastName, $foo)
339-
{
340-
// ...
341-
}
338+
public function indexAction($firstName, $lastName, $foo)
339+
{
340+
// ...
341+
}
342342

343-
Making the argument optional, however, is perfectly ok. The following
344-
example would not throw an exception::
343+
Making the argument optional, however, is perfectly ok. The following
344+
example would not throw an exception::
345345

346-
public function indexAction($firstName, $lastName, $foo = 'bar')
347-
{
348-
// ...
349-
}
346+
public function indexAction($firstName, $lastName, $foo = 'bar')
347+
{
348+
// ...
349+
}
350350

351351
#. **Not all routing parameters need to be arguments on your controller**
352352

353-
If, for example, the ``lastName`` weren't important for your controller,
354-
you could omit it entirely::
353+
If, for example, the ``lastName`` weren't important for your controller,
354+
you could omit it entirely::
355355

356-
public function indexAction($firstName)
357-
{
358-
// ...
359-
}
356+
public function indexAction($firstName)
357+
{
358+
// ...
359+
}
360360

361361
.. tip::
362362

0 commit comments

Comments
 (0)