Passed
Push — master ( c29086...8fb5ed )
by Chubarov
07:29
created
src/Http/Controllers/DashboardController.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function formColumn()
80 80
     {
81 81
         $forms = [
82
-           'date' =>  [
82
+            'date' =>  [
83 83
                 'label' => trans('postman::dashboard.date'),
84 84
                 'rule' => [
85 85
                     'required'=> true, 'message'=> 'Please input Activity name', 'trigger'=> 'blur',
@@ -99,21 +99,21 @@  discard block
 block discarded – undo
99 99
                 'label' => trans('postman::dashboard.users.name'),
100 100
                 'placeholder' => trans('postman::dashboard.users.placeholder'),
101 101
             ],
102
-           'statuses' => [
103
-               'label' => trans('postman::dashboard.statuses.name'),
104
-               'placeholder' => trans('postman::dashboard.statuses.placeholder'),
105
-           ],
102
+            'statuses' => [
103
+                'label' => trans('postman::dashboard.statuses.name'),
104
+                'placeholder' => trans('postman::dashboard.statuses.placeholder'),
105
+            ],
106 106
             'button' => [
107 107
                 'success' => trans('postman::dashboard.form.button.success'),
108 108
                 'cancel' => trans('postman::dashboard.form.button.cancel'),
109 109
             ],
110 110
             'popup' => [
111
-              'question' => trans('postman::dashboard.popup.question'),
112
-              'title' => trans('postman::dashboard.popup.title'),
113
-              'confirmButtonText' => trans('postman::dashboard.popup.confirmButtonText'),
114
-              'cancelButtonText' => trans('postman::dashboard.popup.cancelButtonText'),
115
-              'success.message' => trans('postman::dashboard.popup.success.message'),
116
-              'info.message' => trans('postman::dashboard.popup.info.message'),
111
+                'question' => trans('postman::dashboard.popup.question'),
112
+                'title' => trans('postman::dashboard.popup.title'),
113
+                'confirmButtonText' => trans('postman::dashboard.popup.confirmButtonText'),
114
+                'cancelButtonText' => trans('postman::dashboard.popup.cancelButtonText'),
115
+                'success.message' => trans('postman::dashboard.popup.success.message'),
116
+                'info.message' => trans('postman::dashboard.popup.info.message'),
117 117
             ],
118 118
         ];
119 119
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function index() : Collection
22 22
     {
23
-        return SheduleEmail::with(['email.users', 'mode', 'status'])->get();
23
+        return SheduleEmail::with([ 'email.users', 'mode', 'status' ])->get();
24 24
     }
25 25
 
26 26
     /**
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function tableColumn() : JsonResponse
56 56
     {
57
-        $response = [];
57
+        $response = [ ];
58 58
 
59 59
         foreach (config('postman.ui.table') as $column => $size) {
60
-            $response['columns'][] = [
60
+            $response[ 'columns' ][ ] = [
61 61
                 'prop' => $column,
62 62
                 'size' => $size,
63 63
                 'label' => trans("postman::dashboard.{$column}")
64 64
             ];
65 65
         }
66 66
         
67
-        $response['button'] = [
67
+        $response[ 'button' ] = [
68 68
             'edit' => trans('postman::dashboard.button.edit'),
69 69
             'remove' => trans('postman::dashboard.button.remove'),
70 70
         ];
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             'status_id' => $request->statuses
147 147
         ]);
148 148
 
149
-        return response()->json(['status' => true]);
149
+        return response()->json([ 'status' => true ]);
150 150
     }
151 151
 
152 152
     /**
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
         $goalList->whereIn('user_id', $removal)->delete();
176 176
 
177 177
         collect($request->users)->each(function($user_id) use($task, &$usersToEmail) {
178
-            EmailUser::firstOrCreate(['email_id' => $task->email->id, 'user_id' => $user_id]);
178
+            EmailUser::firstOrCreate([ 'email_id' => $task->email->id, 'user_id' => $user_id ]);
179 179
         });
180
-        return response()->json(['status' => true]);
180
+        return response()->json([ 'status' => true ]);
181 181
     }
182 182
     /**
183 183
      * @param $id
Please login to merge, or discard this patch.
database/factories/StatusesFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 use Faker\Generator as Faker;
3 3
 
4
-$factory->define(agoalofalife\postman\Models\Status::class, function (Faker $faker) {
4
+$factory->define(agoalofalife\postman\Models\Status::class, function(Faker $faker) {
5 5
     return [
6 6
         'name' => $faker->word,
7 7
         'description' => $faker->text,
Please login to merge, or discard this patch.
database/factories/SheduleEmailFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 use Faker\Generator as Faker;
3 3
 
4
-$factory->define(agoalofalife\postman\Models\SheduleEmail::class, function (Faker $faker) {
4
+$factory->define(agoalofalife\postman\Models\SheduleEmail::class, function(Faker $faker) {
5 5
     return [
6 6
         'date' => $faker->date('Y-m-d'),
7 7
         'email_id' => factory(agoalofalife\postman\Models\Email::class)->create()->id,
Please login to merge, or discard this patch.
database/seeds/StatusesSeeder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
     {
18 18
         foreach (trans('postman::statuses') as $status) {
19 19
             Status::firstOrCreate([
20
-                'name' => $status['name'],
21
-                'description' => $status['description'],
22
-                'color_rgb' => $status['color_rgb'],
23
-                Status::COLUMN_UNIQUE_NAME => $status['unique_name'],
20
+                'name' => $status[ 'name' ],
21
+                'description' => $status[ 'description' ],
22
+                'color_rgb' => $status[ 'color_rgb' ],
23
+                Status::COLUMN_UNIQUE_NAME => $status[ 'unique_name' ],
24 24
             ]);
25 25
         }
26 26
     }
Please login to merge, or discard this patch.
src/Parser.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 {
15 15
     public static function parse() : void
16 16
     {
17
-         SheduleEmail::whereRaw('CAST(date AS Datetime) <= ? AND status_id = ?', [Carbon::now(), Status::inProcess()])->get()
17
+            SheduleEmail::whereRaw('CAST(date AS Datetime) <= ? AND status_id = ?', [Carbon::now(), Status::inProcess()])->get()
18 18
                     ->each(function ($value) {
19 19
                         $value->mode->owner->postEmail($value);
20 20
                     });
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 {
15 15
     public static function parse() : void
16 16
     {
17
-         SheduleEmail::whereRaw('CAST(date AS Datetime) <= ? AND status_id = ?', [Carbon::now(), Status::inProcess()])->get()
18
-                    ->each(function ($value) {
17
+         SheduleEmail::whereRaw('CAST(date AS Datetime) <= ? AND status_id = ?', [ Carbon::now(), Status::inProcess() ])->get()
18
+                    ->each(function($value) {
19 19
                         $value->mode->owner->postEmail($value);
20 20
                     });
21 21
     }
Please login to merge, or discard this patch.
src/Models/Status.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     const DONE = 'done';
11 11
     const COLUMN_UNIQUE_NAME = 'unique_name';
12 12
 
13
-    protected $fillable = ['name', 'description', 'color_rgb', self::COLUMN_UNIQUE_NAME];
13
+    protected $fillable = [ 'name', 'description', 'color_rgb', self::COLUMN_UNIQUE_NAME ];
14 14
 
15 15
     /**
16 16
      * Get id status "In process"
Please login to merge, or discard this patch.
resources/lang/en/statuses.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@
 block discarded – undo
2 2
 use agoalofalife\postman\Models\Status;
3 3
 
4 4
 return [
5
-   [
6
-       'name' => 'In process',
7
-       'description' => 'This task is in the process',
8
-       'color_rgb' => '#c9e5f5',
9
-       Status::COLUMN_UNIQUE_NAME => Status::IN_PROCESS,
10
-   ],
5
+    [
6
+        'name' => 'In process',
7
+        'description' => 'This task is in the process',
8
+        'color_rgb' => '#c9e5f5',
9
+        Status::COLUMN_UNIQUE_NAME => Status::IN_PROCESS,
10
+    ],
11 11
     [
12 12
         'name' => 'Done',
13 13
         'description' => 'It is the task finished',
Please login to merge, or discard this patch.
resources/lang/ru/statuses.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@
 block discarded – undo
2 2
 use agoalofalife\postman\Models\Status;
3 3
 
4 4
 return [
5
-   [
6
-       'name' => 'В процессе',
7
-       'description' => 'Это задача находится в процессе',
8
-       'color_rgb' => '#c9e5f5',
9
-       Status::COLUMN_UNIQUE_NAME => Status::IN_PROCESS,
10
-   ],
5
+    [
6
+        'name' => 'В процессе',
7
+        'description' => 'Это задача находится в процессе',
8
+        'color_rgb' => '#c9e5f5',
9
+        Status::COLUMN_UNIQUE_NAME => Status::IN_PROCESS,
10
+    ],
11 11
     [
12 12
         'name' => 'Выполнена',
13 13
         'description' => 'Эта задача закончена.',
Please login to merge, or discard this patch.
src/Modes/OneToAll.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             $tasks->email->users->each(function ($value) use ($message) {
27 27
                 $message->bcc($value->email);
28 28
             });
29
-         });
29
+            });
30 30
 
31 31
         // if to reached the sender
32 32
         if (empty(Mail::failures())) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
      */
20 20
     public function postEmail(SheduleEmail $tasks) : void
21 21
     {
22
-        Mail::send('postman::email', ['html' => $tasks->email->text], function($message)  use ($tasks) {
22
+        Mail::send('postman::email', [ 'html' => $tasks->email->text ], function($message)  use ($tasks) {
23 23
             $message->subject($tasks->email->theme);
24 24
             $message->from(config('mail.from.address'));
25 25
             $message->to(config('mail.from.address'));
26
-            $tasks->email->users->each(function ($value) use ($message) {
26
+            $tasks->email->users->each(function($value) use ($message) {
27 27
                 $message->bcc($value->email);
28 28
             });
29 29
          });
Please login to merge, or discard this patch.