10000 minor #8068 Wrap the instantiation in parenthesis, and chain away (yc… · symfony/symfony-docs@ecde568 · GitHub
[go: up one dir, main page]

Skip to content

Commit ecde568

Browse files
committed
minor #8068 Wrap the instantiation in parenthesis, and chain away (yceruto)
This PR was merged into the 2.7 branch. Discussion ---------- Wrap the instantiation in parenthesis, and chain away Commits ------- 10bd80b Wrap the instantiation in parenthesis, and chain away
2 parents 5f3c35b + 10bd80b commit ecde568

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

email.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ an email is pretty straightforward::
103103

104104
public function indexAction($name)
105105
{
106-
$message = new \Swift_Message('Hello Email')
106+
$message = (new \Swift_Message('Hello Email'))
107107
->setFrom('send@example.com')
108108
->setTo('recipient@example.com')
109109
->setBody(
@@ -125,6 +125,7 @@ an email is pretty straightforward::
125125
)
126126
*/
127127
;
128+
128129
$this->get('mailer')->send($message);
129130

130131
return $this->render(...);

email/dev_environment.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Now, suppose you're sending an email to ``recipient@example.com``.
100100
101101
public function indexAction($name)
102102
{
103-
$message = new \Swift_Message('Hello Email')
103+
$message = (new \Swift_Message('Hello Email'))
104104
->setFrom('send@example.com')
105105
->setTo('recipient@example.com')
106106
->setBody(
@@ -110,6 +110,7 @@ Now, suppose you're sending an email to ``recipient@example.com``.
110110
)
111111
)
112112
;
113+
113114
$this->get('mailer')->send($message);
114115
115116
return $this->render(...);

email/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Start with an easy controller action that sends an email::
1414

1515
public function sendEmailAction($name)
1616
{
17-
$message = new \Swift_Message('Hello Email')
17+
$message = (new \Swift_Message('Hello Email'))
1818
->setFrom('send@example.com')
1919
->setTo('recipient@example.com')
2020
->setBody('You should see me from the profiler!')

0 commit comments

Comments
 (0)
0