@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | parent::boot(); |
| 31 | 31 | |
| 32 | - static::creating(function ($model) { |
|
| 32 | + static::creating(function($model) { |
|
| 33 | 33 | $model->message_id = $model->id(); |
| 34 | 34 | }); |
| 35 | 35 | } |
@@ -152,11 +152,11 @@ discard block |
||
| 152 | 152 | $usesSymfonyMailer = version_compare(app()->version(), '9.0.0', '>'); |
| 153 | 153 | |
| 154 | 154 | if ($usesSymfonyMailer) { |
| 155 | - $mailable->withSymfonyMessage(function (\Symfony\Component\Mime\Email $email) { |
|
| 155 | + $mailable->withSymfonyMessage(function(\Symfony\Component\Mime\Email $email) { |
|
| 156 | 156 | $email->getHeaders()->addIdHeader('In-Reply-To', $this->id()); |
| 157 | 157 | }); |
| 158 | 158 | } else { |
| 159 | - $mailable->withSwiftMessage(function (\Swift_Message $message) { |
|
| 159 | + $mailable->withSwiftMessage(function(\Swift_Message $message) { |
|
| 160 | 160 | $message->getHeaders()->addIdHeader('In-Reply-To', $this->id()); |
| 161 | 161 | }); |
| 162 | 162 | } |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | public function forward($recipients) |
| 169 | 169 | { |
| 170 | - return Mail::send([], [], function ($message) use ($recipients) { |
|
| 170 | + return Mail::send([], [], function($message) use ($recipients) { |
|
| 171 | 171 | $message->to($recipients) |
| 172 | 172 | ->subject($this->subject()) |
| 173 | 173 | ->setBody($this->body(), $this->message()->getContentType()); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | public function boot() |
| 17 | 17 | { |
| 18 | - if (! class_exists('CreateMailboxInboundEmailsTable')) { |
|
| 18 | + if ( ! class_exists('CreateMailboxInboundEmailsTable')) { |
|
| 19 | 19 | $this->publishes([ |
| 20 | 20 | __DIR__.'/../database/migrations/create_mailbox_inbound_emails_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_mailbox_inbound_emails_table.php'), |
| 21 | 21 | ], 'migrations'); |
@@ -41,11 +41,11 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | $this->mergeConfigFrom(__DIR__.'/../config/mailbox.php', 'mailbox'); |
| 43 | 43 | |
| 44 | - $this->app->singleton('mailbox', function () { |
|
| 44 | + $this->app->singleton('mailbox', function() { |
|
| 45 | 45 | return new Router($this->app); |
| 46 | 46 | }); |
| 47 | 47 | |
| 48 | - $this->app->singleton(MailboxManager::class, function () { |
|
| 48 | + $this->app->singleton(MailboxManager::class, function() { |
|
| 49 | 49 | return new MailboxManager($this->app); |
| 50 | 50 | }); |
| 51 | 51 | } |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | public function callMailboxes(InboundEmail $email) |
| 85 | 85 | { |
| 86 | 86 | if ($email->isValid()) { |
| 87 | - $matchedRoutes = $this->routes->match($email)->map(function (Route $route) use ($email) { |
|
| 87 | + $matchedRoutes = $this->routes->match($email)->map(function(Route $route) use ($email) { |
|
| 88 | 88 | $route->run($email); |
| 89 | 89 | }); |
| 90 | 90 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | $subjects = $this->gatherMatchSubjectsFromMessage($message); |
| 75 | 75 | |
| 76 | - return Collection::make($subjects)->first(function (string $subject) { |
|
| 76 | + return Collection::make($subjects)->first(function(string $subject) { |
|
| 77 | 77 | return $this->matchesRegularExpression($subject); |
| 78 | 78 | }) !== null; |
| 79 | 79 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | protected function convertMessageAddresses($addresses): array |
| 107 | 107 | { |
| 108 | 108 | return Collection::make($addresses) |
| 109 | - ->map(function (AddressPart $address) { |
|
| 109 | + ->map(function(AddressPart $address) { |
|
| 110 | 110 | return $address->getEmail(); |
| 111 | 111 | })->toArray(); |
| 112 | 112 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | public function getMailbox() |
| 151 | 151 | { |
| 152 | - if (! $this->mailbox) { |
|
| 152 | + if ( ! $this->mailbox) { |
|
| 153 | 153 | $class = $this->parseMailboxCallback()[0]; |
| 154 | 154 | |
| 155 | 155 | $this->mailbox = $this->container->make(ltrim($class, '\\')); |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | public function match(InboundEmail $message): Collection |
| 18 | 18 | { |
| 19 | - return Collection::make($this->routes)->filter(function ($route) use ($message) { |
|
| 19 | + return Collection::make($this->routes)->filter(function($route) use ($message) { |
|
| 20 | 20 | return $route->matches($message); |
| 21 | 21 | }); |
| 22 | 22 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | { |
| 9 | 9 | preg_match_all('/\{(.*?)\}/', $this->pattern, $matches); |
| 10 | 10 | |
| 11 | - return array_map(function ($m) { |
|
| 11 | + return array_map(function($m) { |
|
| 12 | 12 | return trim($m, '?'); |
| 13 | 13 | }, $matches[1]); |
| 14 | 14 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | public function parametersWithoutNulls() |
| 22 | 22 | { |
| 23 | - return array_filter($this->parameters(), function ($p) { |
|
| 23 | + return array_filter($this->parameters(), function($p) { |
|
| 24 | 24 | return ! is_null($p); |
| 25 | 25 | }); |
| 26 | 26 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $parameters = array_intersect_key($matches, array_flip($parameterNames)); |
| 35 | 35 | |
| 36 | - return array_filter($parameters, function ($value) { |
|
| 36 | + return array_filter($parameters, function($value) { |
|
| 37 | 37 | return is_string($value) && strlen($value) > 0; |
| 38 | 38 | }); |
| 39 | 39 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | 'signature' => 'required', |
| 19 | 19 | ]); |
| 20 | 20 | |
| 21 | - $validator->after(function () { |
|
| 21 | + $validator->after(function() { |
|
| 22 | 22 | $this->verifySignature(); |
| 23 | 23 | }); |
| 24 | 24 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public function register() |
| 11 | 11 | { |
| 12 | - Route::prefix(config('mailbox.path'))->group(function () { |
|
| 12 | + Route::prefix(config('mailbox.path'))->group(function() { |
|
| 13 | 13 | Route::post('/mailcare', MailCareController::class); |
| 14 | 14 | }); |
| 15 | 15 | } |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public function register() |
| 11 | 11 | { |
| 12 | - Route::prefix(config('mailbox.path'))->group(function () { |
|
| 12 | + Route::prefix(config('mailbox.path'))->group(function() { |
|
| 13 | 13 | Route::post('/sendgrid', SendGridController::class); |
| 14 | 14 | }); |
| 15 | 15 | } |