Passed
Push — master ( 718b7a...cab810 )
by George
04:41
created
database/factories/WrongEmailFactory.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 use \Faker\Generator;
5 5
 
6 6
 $factory->define(WrongEmail::class, function (Generator $faker){
7
-   return [
8
-       'email' => $faker->email,
9
-       'repeated_attempts' => $faker->randomNumber(1),
10
-       'problem_type' => $faker->randomElement(['Bounce', 'Complaint']),
11
-       'problem_subtype' => $faker->sentence(2),
12
-       'ignore' => false,
13
-   ];
7
+    return [
8
+        'email' => $faker->email,
9
+        'repeated_attempts' => $faker->randomNumber(1),
10
+        'problem_type' => $faker->randomElement(['Bounce', 'Complaint']),
11
+        'problem_subtype' => $faker->sentence(2),
12
+        'ignore' => false,
13
+    ];
14 14
 });
Please login to merge, or discard this 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, 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),
Please login to merge, or discard this patch.
src/AwsSesBounceComplaintHandler.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,14 +116,14 @@  discard block
 block discarded – undo
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']);
123 123
 
124
-        if ($res->getStatusCode() === 200){
124
+        if ($res->getStatusCode() === 200) {
125 125
             Log::info("SubscriptionConfirmation was auto confirmed!");
126
-        }else{
126
+        } else {
127 127
             Log::warning("SubscriptionConfirmation could not be auto confirmed!");
128 128
             Log::info($data['SubscribeURL']);
129 129
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
 
124 124
         if ($res->getStatusCode() === 200){
125 125
             Log::info("SubscriptionConfirmation was auto confirmed!");
126
-        }else{
126
+        } else{
127 127
             Log::warning("SubscriptionConfirmation could not be auto confirmed!");
128 128
             Log::info($data['SubscribeURL']);
129 129
         }
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
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'ag84ark');
17 17
         // $this->loadViewsFrom(__DIR__.'/../resources/views', 'ag84ark');
18 18
         $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
19
-        $this->loadRoutesFrom(__DIR__ . '/../routes/routes.php');
19
+        $this->loadRoutesFrom(__DIR__.'/../routes/routes.php');
20 20
 
21 21
         // Publishing is only necessary when using the CLI.
22 22
         if ($this->app->runningInConsole()) {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $this->mergeConfigFrom(__DIR__.'/../config/aws-ses-bounce-complaint-handler.php', 'aws-ses-bounce-complaint-handler');
35 35
 
36 36
         // Register the service the package provides.
37
-        $this->app->singleton('aws-ses-bounce-complaint-handler', function ($app) {
37
+        $this->app->singleton('aws-ses-bounce-complaint-handler', function($app) {
38 38
             return new AwsSesBounceComplaintHandler;
39 39
         });
40 40
     }
Please login to merge, or discard this patch.