Skip to content

Change to comply with documentation standards #9088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ If you're serving HTML, you'll want to render a template. The ``render()``
method renders a template **and** puts that content into a ``Response``
object for you::

// renders templates/lucky/number.html.twig
// render templates/lucky/number.html.twig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the previous style. @javiereguiluz explained that quite well. This comment explains what the code below does, not what you as a developer should do.

return $this->render('lucky/number.html.twig', array('name' => $name));

Templating and Twig are explained more in the
Expand Down Expand Up @@ -537,7 +537,7 @@ the ``Request`` class::
// retrieve SERVER variables
$request->server->get('HTTP_HOST');

// retrieves an instance of UploadedFile identified by foo
// retrieve an instance of UploadedFile identified by foo
$request->files->get('foo');

// retrieve a COOKIE value
Expand Down Expand Up @@ -581,7 +581,7 @@ special ``JsonResponse`` object that encodes the data automatically::
// ...
public function indexAction()
{
// returns '{"username":"jane.doe"}' and sets the proper Content-Type header
// return '{"username":"jane.doe"}' and set the proper Content-Type header
return $this->json(array('username' => 'jane.doe'));

// the shortcut defines three optional arguments
Expand Down