@@ -56,15 +56,15 @@ discard block |
||
56 | 56 | |
57 | 57 | $email = $this->renderer->render($message); |
58 | 58 | |
59 | - if ($email->getFrom() === []) { |
|
59 | + if ($email->getFrom() === []){ |
|
60 | 60 | $email->from(Address::create($this->config->getFromAddress())); |
61 | 61 | } |
62 | 62 | |
63 | 63 | $recipients = $this->getRecipients($email); |
64 | 64 | |
65 | - try { |
|
65 | + try{ |
|
66 | 66 | $this->mailer->send($email); |
67 | - } catch (TransportExceptionInterface $e) { |
|
67 | + }catch (TransportExceptionInterface $e){ |
|
68 | 68 | $this->getLogger()->error( |
69 | 69 | sprintf( |
70 | 70 | 'Failed to send `%s` to "%s": %s', |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $addresses = array_merge($message->getTo(), $message->getCc(), $message->getBcc()); |
100 | 100 | |
101 | - foreach ($addresses as $address) { |
|
101 | + foreach ($addresses as $address){ |
|
102 | 102 | $emails[] = $address->toString(); |
103 | 103 | } |
104 | 104 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | */ |
8 | 8 | $_msg_->subject(\Spiral\SendIt\Renderer\ViewRenderer::escapeSubject(inject('subject'))); |
9 | 9 | |
10 | -if (injected('from')) { |
|
10 | +if (injected('from')){ |
|
11 | 11 | $_msg_->from(\Symfony\Component\Mime\Address::create(inject('from'))); |
12 | 12 | } |
13 | 13 | |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | |
20 | 20 | ob_start(); ?>${html}<?php $_html_ = ob_get_clean(); |
21 | 21 | |
22 | -if (!empty($_html_)) { |
|
22 | +if (!empty($_html_)){ |
|
23 | 23 | $_msg_->html($_html_); |
24 | 24 | } |
25 | 25 | |
26 | 26 | ob_start(); ?>${text}<?php $_text_ = ob_get_clean(); |
27 | 27 | |
28 | -if (!empty($_text_)) { |
|
28 | +if (!empty($_text_)){ |
|
29 | 29 | $_msg_->text($_text_); |
30 | 30 | } |
31 | 31 | ?> |
@@ -7,4 +7,4 @@ |
||
7 | 7 | * @author Anton Titov (Wolfy-J) |
8 | 8 | */ |
9 | 9 | |
10 | -return ; |
|
10 | +return; |
@@ -178,24 +178,24 @@ discard block |
||
178 | 178 | public function validProvider(): array |
179 | 179 | { |
180 | 180 | return [ |
181 | - [true, time() - 1000,], |
|
182 | - [true, time(),], |
|
183 | - [true, date('u'),], |
|
184 | - [true, time() + 1000,], |
|
185 | - [true, '',], |
|
186 | - [true, 'tomorrow +2hours',], |
|
187 | - [true, 'yesterday -2hours',], |
|
188 | - [true, 'now',], |
|
189 | - [true, 'now + 1000 seconds',], |
|
190 | - [true, 'now - 1000 seconds',], |
|
191 | - [true, 0,], |
|
192 | - [true, 1.1,], |
|
193 | - [false, [],], |
|
194 | - [false, false,], |
|
195 | - [false, true,], |
|
196 | - [false, null,], |
|
197 | - [false, [],], |
|
198 | - [false, new \stdClass(),], |
|
181 | + [true, time() - 1000, ], |
|
182 | + [true, time(), ], |
|
183 | + [true, date('u'), ], |
|
184 | + [true, time() + 1000, ], |
|
185 | + [true, '', ], |
|
186 | + [true, 'tomorrow +2hours', ], |
|
187 | + [true, 'yesterday -2hours', ], |
|
188 | + [true, 'now', ], |
|
189 | + [true, 'now + 1000 seconds', ], |
|
190 | + [true, 'now - 1000 seconds', ], |
|
191 | + [true, 0, ], |
|
192 | + [true, 1.1, ], |
|
193 | + [false, [], ], |
|
194 | + [false, false, ], |
|
195 | + [false, true, ], |
|
196 | + [false, null, ], |
|
197 | + [false, [], ], |
|
198 | + [false, new \stdClass(), ], |
|
199 | 199 | ]; |
200 | 200 | } |
201 | 201 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | { |
204 | 204 | $checker = new DatetimeChecker(); |
205 | 205 | |
206 | - foreach (\DateTimeZone::listIdentifiers() as $identifier) { |
|
206 | + foreach (\DateTimeZone::listIdentifiers() as $identifier){ |
|
207 | 207 | $this->assertTrue($checker->timezone($identifier)); |
208 | 208 | $this->assertFalse($checker->timezone(str_rot13($identifier))); |
209 | 209 | } |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | |
339 | 339 | private function now(): \Closure |
340 | 340 | { |
341 | - return static function () { |
|
341 | + return static function (){ |
|
342 | 342 | return \time(); |
343 | 343 | }; |
344 | 344 | } |