Skip to content

Commit a2f3571

Browse files
committed
Merge branch 'updates' of https://github.com/beyondcode/helo-laravel into updates
2 parents 7e8d6bc + 550efcf commit a2f3571

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed

src/CreatesMailers.php

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ protected function createLaravel6Mailer($app)
1616
// on the mailer. This allows us to resolve mailer classes via containers
1717
// for maximum testability on said classes instead of passing Closures.
1818
$mailer = new Mailer(
19-
$app['view'], $app['swift.mailer'], $app['events']
19+
$app['view'],
20+
$app['swift.mailer'],
21+
$app['events']
2022
);
2123

2224
if ($app->bound('queue')) {
@@ -45,7 +47,10 @@ protected function createLaravel7Mailer($app)
4547
// on the mailer. This allows us to resolve mailer classes via containers
4648
// for maximum testability on said classes instead of passing Closures.
4749
$mailer = new Laravel7Mailer(
48-
'smtp', $app['view'], $swiftMailer, $app['events']
50+
'smtp',
51+
$app['view'],
52+
$swiftMailer,
53+
$app['events']
4954
);
5055

5156
if ($app->bound('queue')) {
@@ -78,7 +83,10 @@ protected function createLaravel9Mailer($app)
7883
// on the mailer. This allows us to resolve mailer classes via containers
7984
// for maximum testability on said classes instead of passing Closures.
8085
$mailer = new Laravel7Mailer(
81-
'smtp', $app['view'], $symfonyTransport, $app['events']
86+
'smtp',
87+
$app['view'],
88+
$symfonyTransport,
89+
$app['events']
8290
);
8391

8492
if ($app->bound('queue')) {
@@ -105,9 +113,10 @@ protected function getConfig($name = 'smtp')
105113
/**
106114
* Set a global address on the mailer by type.
107115
*
108-
* @param \Illuminate\Mail\Mailer $mailer
109-
* @param array $config
110-
* @param string $type
116+
* @param \Illuminate\Mail\Mailer $mailer
117+
* @param array $config
118+
* @param string $type
119+
*
111120
* @return void
112121
*/
113122
protected function setGlobalAddress($mailer, array $config, $type)

src/HeloLaravelServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class HeloLaravelServiceProvider extends ServiceProvider
1616
*/
1717
public function boot()
1818
{
19-
if ($this->app->runningUnitTests() || ! $this->app['config']['helo.is_enabled']) {
19+
if ($this->app->runningUnitTests() || !$this->app['config']['helo.is_enabled']) {
2020
return;
2121
}
2222

@@ -73,7 +73,7 @@ protected function bootMailable()
7373

7474
private function version($app = null): int
7575
{
76-
if (! $app) {
76+
if (!$app) {
7777
$app = $this->app;
7878
}
7979

src/MailManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class MailManager extends LaravelMailManager implements FactoryContract
1111

1212
public function mailer($name = null)
1313
{
14-
if (! $name) {
14+
if (!$name) {
1515
return $this->createLaravel9Mailer($this->app);
1616
}
1717

src/Mailer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Mailer extends LaravelMailer implements MailerContract
1616
public function send($view, array $data = [], $callback = null)
1717
{
1818
if ($view instanceof Mailable
19-
&& ! $view instanceof ShouldQueue
19+
&& !$view instanceof ShouldQueue
2020
) {
2121
$this->applyDebugHeaders($view);
2222
}
@@ -33,7 +33,7 @@ protected function applyDebugHeaders(Mailable $mailable)
3333

3434
$viewFile = $this->getMailableViewFile($mailable);
3535

36-
if (! is_null($viewFile)) {
36+
if (!is_null($viewFile)) {
3737
$view = $this->getMailableView($viewFile);
3838
$viewContent = $this->getMailableViewContent($view);
3939
$viewData = $this->getMailableViewData($mailable);
@@ -62,7 +62,7 @@ protected function getMailableProperty($mailable, string $property)
6262

6363
protected function getMailableViewFile(Mailable $mailable)
6464
{
65-
if (! is_null($markdown = $this->getMailableProperty($mailable, 'markdown'))) {
65+
if (!is_null($markdown = $this->getMailableProperty($mailable, 'markdown'))) {
6666
return $markdown;
6767
}
6868

@@ -86,7 +86,7 @@ protected function getMailableViewData(Mailable $mailable)
8686
$clonedData = $cloner->cloneVar($mailable->buildViewData());
8787

8888
return $dumper->dump($clonedData, true, [
89-
'maxDepth' => 3,
89+
'maxDepth' => 3,
9090
'maxStringLength' => 160,
9191
]);
9292
}

tests/HeloTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
Mail::assertSent(TestMail::class);
1919
});
2020

21-
test('plain text mails work correctly', function ()
22-
{
21+
test('plain text mails work correctly', function () {
2322
Mail::fake();
2423

2524
Mail::to('[email protected]')->send(new TestMail(true));

0 commit comments

Comments
 (0)