Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Feb 14, 2024
1 parent 8353dcb commit 4d7d72e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Http/Middleware/MailboxBasicAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function handle($request, Closure $next)
$user = $request->getUser();
$password = $request->getPassword();

if (($user === config('mailbox.basic_auth.username') && $password === config('mailbox.basic_auth.password'))) {
if ($user === config('mailbox.basic_auth.username') && $password === config('mailbox.basic_auth.password')) {
return $next($request);
}

Expand Down
10 changes: 5 additions & 5 deletions src/Routing/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,24 @@ protected function gatherMatchSubjectsFromMessage(InboundEmail $message)
switch ($this->subject) {
case self::FROM:
return [$message->from()];
break;
break;
case self::TO:
return $this->convertMessageAddresses($message->to());
break;
break;
case self::CC:
return $this->convertMessageAddresses($message->cc());
break;
break;
case self::BCC:
return $this->convertMessageAddresses($message->bcc());
break;
case self::SUBJECT:
return [$message->subject()];
break;
break;
}
}

/**
* @param $addresses AddressPart[]
* @param $addresses AddressPart[]
* @return array
*/
protected function convertMessageAddresses($addresses): array
Expand Down
5 changes: 5 additions & 0 deletions tests/MailboxRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public function emailDataProvider()

/**
* @test
*
* @dataProvider emailDataProvider
*/
public function it_matches_from_mails($fromMail, $successfulPattern, $failingPattern)
Expand All @@ -36,6 +37,7 @@ public function it_matches_from_mails($fromMail, $successfulPattern, $failingPat

/**
* @test
*
* @dataProvider emailDataProvider
*/
public function it_matches_to_mails($toMail, $successfulPattern, $failingPattern)
Expand All @@ -54,6 +56,7 @@ public function it_matches_to_mails($toMail, $successfulPattern, $failingPattern

/**
* @test
*
* @dataProvider emailDataProvider
*/
public function it_matches_cc_mails($ccMail, $successfulPattern, $failingPattern)
Expand All @@ -72,6 +75,7 @@ public function it_matches_cc_mails($ccMail, $successfulPattern, $failingPattern

/**
* @test
*
* @dataProvider emailDataProvider
*/
public function it_matches_bcc_mails($bccMail, $successfulPattern, $failingPattern)
Expand All @@ -90,6 +94,7 @@ public function it_matches_bcc_mails($bccMail, $successfulPattern, $failingPatte

/**
* @test
*
* @dataProvider subjectDataProvider
*/
public function it_matches_subjects($subject, $successfulPattern, $failingPattern)
Expand Down

0 comments on commit 4d7d72e

Please sign in to comment.