Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #121

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading