@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use Illuminate\Support\Facades\Route; |
4 | 4 | |
5 | -if (! config('aws-ses-bounce-complaint-handler.via_sqs')) { |
|
5 | +if (!config('aws-ses-bounce-complaint-handler.via_sqs')) { |
|
6 | 6 | Route::post('amazon-sns/notifications', '\ag84ark\AwsSesBounceComplaintHandler\AwsSesBounceComplaintHandler@handleBounceOrComplaint')->middleware('api'); |
7 | 7 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | ->get(); |
22 | 22 | |
23 | 23 | foreach ($emails as $wrongEmail) { |
24 | - if (! $wrongEmail->canBouncedSend()) { |
|
24 | + if (!$wrongEmail->canBouncedSend()) { |
|
25 | 25 | return false; |
26 | 26 | } |
27 | 27 | } |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | |
32 | 32 | public function handleBounceOrComplaint(Request $request): JsonResponse |
33 | 33 | { |
34 | - if (! $request->json()) { |
|
34 | + if (!$request->json()) { |
|
35 | 35 | return Response::json(['status' => 422, 'message' => 'error'], 422); |
36 | 36 | } |
37 | 37 | |
38 | - if (! $this->canPass($request)) { |
|
38 | + if (!$this->canPass($request)) { |
|
39 | 39 | return Response::json(['status' => 403, 'message' => 'error'], 403); |
40 | 40 | } |
41 | 41 | |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | |
50 | 50 | $message = $this->getMessageData($request, $data); |
51 | 51 | |
52 | - if (! count($message)) { |
|
52 | + if (!count($message)) { |
|
53 | 53 | return Response::json(['status' => 422, 'data' => $data], 422); |
54 | 54 | } |
55 | 55 | |
56 | - if (! isset($message['notificationType'])) { |
|
56 | + if (!isset($message['notificationType'])) { |
|
57 | 57 | return Response::json(['status' => 200, 'message' => 'no data']); |
58 | 58 | } |
59 | 59 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | $secret = config('aws-ses-bounce-complaint-handler.route_secret'); |
72 | - if (! $secret) { |
|
72 | + if (!$secret) { |
|
73 | 73 | return true; |
74 | 74 | } |
75 | 75 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | public function handleSubscriptionConfirmation(array $data): ?string |
93 | 93 | { |
94 | 94 | try { |
95 | - if (! isset($data['Type']) || 'SubscriptionConfirmation' !== $data['Type'] || ! config('aws-ses-bounce-complaint-handler.auto_subscribe')) { |
|
95 | + if (!isset($data['Type']) || 'SubscriptionConfirmation' !== $data['Type'] || !config('aws-ses-bounce-complaint-handler.auto_subscribe')) { |
|
96 | 96 | return null; |
97 | 97 | } |
98 | 98 | Log::info('SubscriptionConfirmation came at: '.$data['Timestamp']); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $this->mergeConfigFrom(__DIR__.'/../config/aws-ses-bounce-complaint-handler.php', 'aws-ses-bounce-complaint-handler'); |
33 | 33 | |
34 | 34 | // Register the service the package provides. |
35 | - $this->app->singleton('aws-ses-bounce-complaint-handler', function ($app) { |
|
35 | + $this->app->singleton('aws-ses-bounce-complaint-handler', function($app) { |
|
36 | 36 | return new AwsSesBounceComplaintHandler(); |
37 | 37 | }); |
38 | 38 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | __DIR__.'/../config/aws-ses-bounce-complaint-handler.php' => config_path('aws-ses-bounce-complaint-handler.php'), |
56 | 56 | ], 'aws-ses-bounce-complaint-handler.config'); |
57 | 57 | |
58 | - if (! class_exists('CreateWrongEmailsTable')) { |
|
58 | + if (!class_exists('CreateWrongEmailsTable')) { |
|
59 | 59 | $this->publishes([ |
60 | 60 | __DIR__.'/../database/migrations/create_wrong_emails_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_wrong_emails_table.php'), |
61 | 61 | ], 'migrations'); |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use ag84ark\AwsSesBounceComplaintHandler\Models\WrongEmail; |
4 | 4 | use Faker\Generator; |
5 | 5 | |
6 | -$factory->define(WrongEmail::class, static function (Generator $faker) { |
|
6 | +$factory->define(WrongEmail::class, static function(Generator $faker) { |
|
7 | 7 | return [ |
8 | 8 | 'email' => $faker->email, |
9 | 9 | 'repeated_attempts' => $faker->randomNumber(1), |