Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkSide666 authored and StyleCIBot committed Apr 28, 2020
1 parent 43e9cdf commit c1553c0
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Mailer/AbstractMailer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox\Mailer;
Expand Down Expand Up @@ -107,7 +108,6 @@ function ($address): void {

// save successful MailResponse
$mail_response->save(["email_id"=> $mail->id]);

} catch (\PHPMailer\PHPMailer\Exception $exception) {
$mail->set('status', Mail::STATUS_ERROR);
$mail->save();
Expand Down
1 change: 1 addition & 0 deletions src/Mailer/Gmail.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox\Mailer;
Expand Down
1 change: 1 addition & 0 deletions src/Mailer/SMTP.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox\Mailer;
Expand Down
1 change: 1 addition & 0 deletions src/MailerInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox;
Expand Down
1 change: 1 addition & 0 deletions src/Model/Mail.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox\Model;
Expand Down
1 change: 1 addition & 0 deletions src/Model/MailAddress.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox\Model;
Expand Down
1 change: 1 addition & 0 deletions src/Model/MailAttachment.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox\Model;
Expand Down
1 change: 1 addition & 0 deletions src/Model/MailResponse.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox\Model;
Expand Down
1 change: 1 addition & 0 deletions src/Model/MailTemplate.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox\Model;
Expand Down
1 change: 1 addition & 0 deletions src/Model/MailTemplateToken.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox\Model;
Expand Down
1 change: 1 addition & 0 deletions src/Outbox.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

namespace atk4\outbox;
Expand Down
17 changes: 8 additions & 9 deletions tests/OutboxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/
class OutboxTest extends \PHPUnit_Framework_TestCase
{
public function getApp() : App {

public function getApp(): App
{
$app = new App();
$app->add([
Outbox::class,
Expand All @@ -40,7 +40,7 @@ public function testSend()
/** @var Mail $mail */
$mail = $outbox->new()
->withTemplateIdentifier('test')
->replaceContent('test','testing')
->replaceContent('test', 'testing')
;

$outbox->send($mail);
Expand All @@ -55,15 +55,14 @@ public function testSendCallable()
$outbox = $app->getOutbox();

/** @var Mail $mail */
$outbox->callableSend(static function(Mail $mail) use ($user_model) {

$mail->withTemplateIdentifier('test')
->replaceContent('test','testing')
$outbox->callableSend(static function (Mail $mail) use ($user_model) {
$mail->withTemplateIdentifier('test')
->replaceContent('test', 'testing')
->replaceContent([
'array_token_1' => 'token_content_1',
'array_token_2' => 'token_content_2',
],'testing')
->replaceContent( $user_model, 'user');
], 'testing')
->replaceContent($user_model, 'user');

return $mail;
});
Expand Down

0 comments on commit c1553c0

Please sign in to comment.