8000 Wrap the instantiation in parenthesis, and chain away by yceruto · Pull Request #8068 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Wrap the instantiation in parenthesis, and chain away #8068

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

Merged
merged 1 commit into from
Jul 1, 2017
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion email.rst 8000
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ an email is pretty straightforward::

public function indexAction($name)
{
$message = new \Swift_Message('Hello Email')
$message = (new \Swift_Message('Hello Email'))
->setFrom('send@example.com')
->setTo('recipient@example.com')
->setBody(
Expand All @@ -125,6 +125,7 @@ an email is pretty straightforward::
)
*/
;

$this->get('mailer')->send($message);

return $this->render(...);
Expand Down
3 changes: 2 additions & 1 deletion email/dev_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Now, suppose you're sending an email to ``recipient@example.com``.
public function indexAction($name)
{
$message = new \Swift_Message('Hello Email')
$message = (new \Swift_Message('Hello Email'))
->setFrom('send@example.com')
->setTo('recipient@example.com')
->setBody(
Expand All @@ -110,6 +110,7 @@ Now, suppose you're sending an email to ``recipient@example.com``.
)
)
;
$this->get('mailer')->send($message);
return $this->render(...);
Expand Down
2 changes: 1 addition & 1 deletion email/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Start with an easy controller action that sends an email::

public function sendEmailAction($name)
{
$message = new \Swift_Message('Hello Email')
$message = (new \Swift_Message('Hello Email'))
->setFrom('send@example.com')
->setTo('recipient@example.com')
->setBody('You should see me from the profiler!')
Expand Down
0