@@ -19,11 +19,11 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | public function handleBounceOrComplaint(Request $request): JsonResponse |
| 21 | 21 | { |
| 22 | - if (! $request->json()) { |
|
| 22 | + if (!$request->json()) { |
|
| 23 | 23 | return Response::json(['status' => 422, 'message' => 'error'], 422); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - if (! $this->canPass($request)) { |
|
| 26 | + if (!$this->canPass($request)) { |
|
| 27 | 27 | return Response::json(['status' => 403, 'message' => 'error'], 403); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -35,11 +35,11 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | $message = $this->getMessageData($request, $data); |
| 37 | 37 | |
| 38 | - if (! count($message)) { |
|
| 38 | + if (!count($message)) { |
|
| 39 | 39 | return Response::json(['status' => 422, 'data' => $data], 422); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - if (! isset($message['notificationType'])) { |
|
| 42 | + if (!isset($message['notificationType'])) { |
|
| 43 | 43 | return Response::json(['status' => 200, 'message' => 'no data']); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | ->get(); |
| 58 | 58 | |
| 59 | 59 | foreach ($emails as $wrongEmail) { |
| 60 | - if (! $wrongEmail->canBouncedSend()) { |
|
| 60 | + if (!$wrongEmail->canBouncedSend()) { |
|
| 61 | 61 | return false; |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $secret = config('aws-ses-bounce-complaint-handler.route_secret'); |
| 99 | - if (! $secret) { |
|
| 99 | + if (!$secret) { |
|
| 100 | 100 | return true; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | if ($request->json('Type') !== 'SubscriptionConfirmation') { |
| 117 | 117 | return; |
| 118 | 118 | } |
| 119 | - Log::info('SubscriptionConfirmation came at: ' . $data['Timestamp']); |
|
| 119 | + Log::info('SubscriptionConfirmation came at: '.$data['Timestamp']); |
|
| 120 | 120 | |
| 121 | 121 | $client = new Client(); |
| 122 | 122 | $res = $client->get($data['SubscribeURL']); |
@@ -5,10 +5,10 @@ |
||
| 5 | 5 | |
| 6 | 6 | $factory->define(WrongEmail::class, function (Generator $faker) { |
| 7 | 7 | return [ |
| 8 | - 'email' => $faker->email, |
|
| 9 | - 'repeated_attempts' => $faker->randomNumber(1), |
|
| 10 | - 'problem_type' => $faker->randomElement(['Bounce', 'Complaint']), |
|
| 11 | - 'problem_subtype' => $faker->randomElement(['Permanent', 'abuse', 'General']), |
|
| 12 | - 'ignore' => false, |
|
| 13 | - ]; |
|
| 8 | + 'email' => $faker->email, |
|
| 9 | + 'repeated_attempts' => $faker->randomNumber(1), |
|
| 10 | + 'problem_type' => $faker->randomElement(['Bounce', 'Complaint']), |
|
| 11 | + 'problem_subtype' => $faker->randomElement(['Permanent', 'abuse', 'General']), |
|
| 12 | + 'ignore' => false, |
|
| 13 | + ]; |
|
| 14 | 14 | }); |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use ag84ark\AwsSesBounceComplaintHandler\Models\WrongEmail; |
| 4 | 4 | use \Faker\Generator; |
| 5 | 5 | |
| 6 | -$factory->define(WrongEmail::class, function (Generator $faker) { |
|
| 6 | +$factory->define(WrongEmail::class, function(Generator $faker) { |
|
| 7 | 7 | return [ |
| 8 | 8 | 'email' => $faker->email, |
| 9 | 9 | 'repeated_attempts' => $faker->randomNumber(1), |