| @@ -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), | 
| @@ -16,7 +16,7 @@ | ||
| 16 | 16 | ->get(); | 
| 17 | 17 | |
| 18 | 18 |          foreach ($emails as $wrongEmail) { | 
| 19 | -            if (! $wrongEmail->canBouncedSend()) { | |
| 19 | +            if (!$wrongEmail->canBouncedSend()) { | |
| 20 | 20 | return false; | 
| 21 | 21 | } | 
| 22 | 22 | } | 
| @@ -13,11 +13,11 @@ discard block | ||
| 13 | 13 |  { | 
| 14 | 14 | public function handleBounceOrComplaint(Request $request): JsonResponse | 
| 15 | 15 |      { | 
| 16 | -        if (! $request->json()) { | |
| 16 | +        if (!$request->json()) { | |
| 17 | 17 | return Response::json(['status' => 422, 'message' => 'error'], 422); | 
| 18 | 18 | } | 
| 19 | 19 | |
| 20 | -        if (! $this->canPass($request)) { | |
| 20 | +        if (!$this->canPass($request)) { | |
| 21 | 21 | return Response::json(['status' => 403, 'message' => 'error'], 403); | 
| 22 | 22 | } | 
| 23 | 23 | |
| @@ -31,11 +31,11 @@ discard block | ||
| 31 | 31 | |
| 32 | 32 | $message = $this->getMessageData($request, $data); | 
| 33 | 33 | |
| 34 | -        if (! count($message)) { | |
| 34 | +        if (!count($message)) { | |
| 35 | 35 | return Response::json(['status' => 422, 'data' => $data], 422); | 
| 36 | 36 | } | 
| 37 | 37 | |
| 38 | -        if (! isset($message['notificationType'])) { | |
| 38 | +        if (!isset($message['notificationType'])) { | |
| 39 | 39 | return Response::json(['status' => 200, 'message' => 'no data']); | 
| 40 | 40 | } | 
| 41 | 41 | |
| @@ -51,7 +51,7 @@ discard block | ||
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | 53 |          $secret = config('aws-ses-bounce-complaint-handler.route_secret'); | 
| 54 | -        if (! $secret) { | |
| 54 | +        if (!$secret) { | |
| 55 | 55 | return true; | 
| 56 | 56 | } | 
| 57 | 57 | |
| @@ -74,7 +74,7 @@ discard block | ||
| 74 | 74 | private function handleSubscriptionConfirmation(array $data): ?string | 
| 75 | 75 |      { | 
| 76 | 76 |          try { | 
| 77 | -            if (! isset($data['Type']) || 'SubscriptionConfirmation' !== $data['Type'] || ! config('aws-ses-bounce-complaint-handler.auto_subscribe')) { | |
| 77 | +            if (!isset($data['Type']) || 'SubscriptionConfirmation' !== $data['Type'] || !config('aws-ses-bounce-complaint-handler.auto_subscribe')) { | |
| 78 | 78 | return null; | 
| 79 | 79 | } | 
| 80 | 80 |              Log::info('SubscriptionConfirmation came at: '.$data['Timestamp']); | 
| @@ -3,6 +3,6 @@ | ||
| 3 | 3 | use ag84ark\AwsSesBounceComplaintHandler\Http\Controllers\PackageController; | 
| 4 | 4 | use Illuminate\Support\Facades\Route; | 
| 5 | 5 | |
| 6 | -if (! config('aws-ses-bounce-complaint-handler.via_sqs')) { | |
| 6 | +if (!config('aws-ses-bounce-complaint-handler.via_sqs')) { | |
| 7 | 7 |      Route::post('amazon-sns/notifications', [PackageController::class, 'handleBounceOrComplaint'])->middleware('api'); | 
| 8 | 8 | } |