Passed
Push — master ( b481ec...1efa17 )
by George
04:44
created
routes/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/AwsSesBounceComplaintHandler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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']);
Please login to merge, or discard this patch.
src/AwsSesBounceComplaintHandlerServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.
database/factories/WrongEmailFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
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),
Please login to merge, or discard this patch.