Passed
Branch master (ae98e8)
by Chubarov
04:40
created
database/migrations/2017_09_13_155313_create_email_user_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('email_user', function (Blueprint $table) {
16
+        Schema::create('email_user', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->integer('user_id')->unsigned();
19 19
             $table->foreign('user_id')->references('id')->on('users');
Please login to merge, or discard this patch.
database/factories/EmailUserFactory.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\EmailUser::class, function (Faker $faker) {
4
+$factory->define(agoalofalife\postman\Models\EmailUser::class, function(Faker $faker) {
5 5
     return [
6 6
         'email_id' => factory(agoalofalife\postman\Models\Email::class)->create()->id,
7 7
         'user_id' => factory(agoalofalife\postman\Models\User::class)->create()->id,
Please login to merge, or discard this patch.
database/factories/ModePostFactory.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\ModePostEmail::class, function (Faker $faker) {
4
+$factory->define(agoalofalife\postman\Models\ModePostEmail::class, function(Faker $faker) {
5 5
     return [
6 6
         'name' => $faker->name,
7 7
         'description' => $faker->text,
Please login to merge, or discard this patch.
database/factories/UserFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-$factory->define(agoalofalife\postman\Models\User::class, function (Faker $faker) {
16
+$factory->define(agoalofalife\postman\Models\User::class, function(Faker $faker) {
17 17
     static $password;
18 18
 
19 19
     return [
Please login to merge, or discard this patch.
database/factories/EmailFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use Faker\Generator as Faker;
4 4
 
5
-$factory->define(agoalofalife\postman\Models\Email::class, function (Faker $faker) {
5
+$factory->define(agoalofalife\postman\Models\Email::class, function(Faker $faker) {
6 6
     return [
7 7
         'theme' => $faker->text,
8 8
         'text' => $faker->text,
Please login to merge, or discard this patch.
database/factories/SheduleEmailFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 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,
8 8
         'mode_id' => factory(agoalofalife\postman\Models\ModePostEmail::class)->create()->id,
9
-        'status_action' => $faker->randomElement([0,1]),
9
+        'status_action' => $faker->randomElement([ 0, 1 ]),
10 10
     ];
11 11
 });
Please login to merge, or discard this patch.
resources/lang/en/requestMessage.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-      // CreateTaskRequest
4
-      'createTask.date.required' => 'Field date is required',
5
-      'createTask.date.date_format' => 'Field date format date Y-m-d H:i:s',
6
-      'createTask.theme.required' => 'Field theme is required',
7
-      'createTask.text.required' => 'Field text is required',
8
-      'createTask.mode.required' => 'Field mode is required',
9
-      'createTask.mode.exists' => 'Field mode is not exist in table',
10
-      'createTask.users.required' => 'Field users is required',
11
-      'createTask.users.array' => 'Field users is many',
12
-      'createTask.users.*.required' => 'Field users is required',
13
-      'createTask.users.*.exists' => 'Field users is not exist in table',
3
+        // CreateTaskRequest
4
+        'createTask.date.required' => 'Field date is required',
5
+        'createTask.date.date_format' => 'Field date format date Y-m-d H:i:s',
6
+        'createTask.theme.required' => 'Field theme is required',
7
+        'createTask.text.required' => 'Field text is required',
8
+        'createTask.mode.required' => 'Field mode is required',
9
+        'createTask.mode.exists' => 'Field mode is not exist in table',
10
+        'createTask.users.required' => 'Field users is required',
11
+        'createTask.users.array' => 'Field users is many',
12
+        'createTask.users.*.required' => 'Field users is required',
13
+        'createTask.users.*.exists' => 'Field users is not exist in table',
14 14
 
15 15
 
16 16
 ];
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
resources/lang/ru/requestMessage.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 return [
3
-      // CreateTaskRequest
4
-      'createTask.date.required' => 'Поле дата обязательно',
5
-      'createTask.date.date_format' => 'Формат даты должен быть Y-m-d H:i:s',
6
-      'createTask.theme.required' => 'Поле тема обязательно',
7
-      'createTask.text.required' => 'Поле текст обязательно',
8
-      'createTask.mode.required' => 'Поле тип отправки обязательно',
9
-      'createTask.mode.exists' => 'Тип отправки не найден в таблице',
10
-      'createTask.users.required' => 'Не меньше одного пользователя',
11
-      'createTask.users.array' => 'Поле пользователи должен быть массивом',
12
-      'createTask.users.*.required' => 'Не меньше одного пользователя',
13
-      'createTask.users.*.exists' => 'Пользователь не найден в таблице',
3
+        // CreateTaskRequest
4
+        'createTask.date.required' => 'Поле дата обязательно',
5
+        'createTask.date.date_format' => 'Формат даты должен быть Y-m-d H:i:s',
6
+        'createTask.theme.required' => 'Поле тема обязательно',
7
+        'createTask.text.required' => 'Поле текст обязательно',
8
+        'createTask.mode.required' => 'Поле тип отправки обязательно',
9
+        'createTask.mode.exists' => 'Тип отправки не найден в таблице',
10
+        'createTask.users.required' => 'Не меньше одного пользователя',
11
+        'createTask.users.array' => 'Поле пользователи должен быть массивом',
12
+        'createTask.users.*.required' => 'Не меньше одного пользователя',
13
+        'createTask.users.*.exists' => 'Пользователь не найден в таблице',
14 14
 
15 15
 
16 16
 ];
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
src/Http/Controllers/DashboardController.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
     public function index() : Collection
21 21
     {
22 22
         $preData = SheduleEmail::with(['email.users', 'mode'])->get()->map(function ($value) {
23
-             $value->status_action_human = $value->status_action_human;
24
-             return $value;
23
+                $value->status_action_human = $value->status_action_human;
24
+                return $value;
25 25
         });
26 26
 
27 27
         return $preData;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function formColumn()
76 76
     {
77 77
         $forms = [
78
-           'date' =>  [
78
+            'date' =>  [
79 79
                 'label' => trans('postman::dashboard.date'),
80 80
                 'rule' => [
81 81
                     'required'=> true, 'message'=> 'Please input Activity name', 'trigger'=> 'blur',
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
                 'cancel' => trans('postman::dashboard.form.button.cancel'),
101 101
             ],
102 102
             'popup' => [
103
-              'question' => trans('postman::dashboard.popup.question'),
104
-              'title' => trans('postman::dashboard.popup.title'),
105
-              'confirmButtonText' => trans('postman::dashboard.popup.confirmButtonText'),
106
-              'cancelButtonText' => trans('postman::dashboard.popup.cancelButtonText'),
107
-              'success.message' => trans('postman::dashboard.popup.success.message'),
108
-              'info.message' => trans('postman::dashboard.popup.info.message'),
103
+                'question' => trans('postman::dashboard.popup.question'),
104
+                'title' => trans('postman::dashboard.popup.title'),
105
+                'confirmButtonText' => trans('postman::dashboard.popup.confirmButtonText'),
106
+                'cancelButtonText' => trans('postman::dashboard.popup.cancelButtonText'),
107
+                'success.message' => trans('postman::dashboard.popup.success.message'),
108
+                'info.message' => trans('postman::dashboard.popup.info.message'),
109 109
             ],
110 110
         ];
111 111
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function index() : Collection
21 21
     {
22
-        $preData = SheduleEmail::with(['email.users', 'mode'])->get()->map(function ($value) {
22
+        $preData = SheduleEmail::with([ 'email.users', 'mode' ])->get()->map(function($value) {
23 23
              $value->status_action_human = $value->status_action_human;
24 24
              return $value;
25 25
         });
@@ -50,17 +50,17 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function tableColumn() : JsonResponse
52 52
     {
53
-        $response = [];
53
+        $response = [ ];
54 54
 
55 55
         foreach (config('postman.ui.table') as $column => $size) {
56
-            $response['columns'][] = [
56
+            $response[ 'columns' ][ ] = [
57 57
                 'prop' => $column,
58 58
                 'size' => $size,
59 59
                 'label' => trans("postman::dashboard.{$column}")
60 60
             ];
61 61
         }
62 62
         
63
-        $response['button'] = [
63
+        $response[ 'button' ] = [
64 64
             'edit' => trans('postman::dashboard.button.edit'),
65 65
             'remove' => trans('postman::dashboard.button.remove'),
66 66
         ];
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             'mode_id' => $request->mode,
138 138
             'status_action' => 0
139 139
         ]);
140
-        return response()->json(['status' => true]);
140
+        return response()->json([ 'status' => true ]);
141 141
     }
142 142
 
143 143
     /**
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
         $goalList->whereIn('user_id', $removal)->delete();
164 164
 
165 165
         collect($request->users)->each(function($user_id) use($task, &$usersToEmail) {
166
-            EmailUser::firstOrCreate(['email_id' => $task->email->id, 'user_id' => $user_id]);
166
+            EmailUser::firstOrCreate([ 'email_id' => $task->email->id, 'user_id' => $user_id ]);
167 167
         });
168
-        return response()->json(['status' => true]);
168
+        return response()->json([ 'status' => true ]);
169 169
     }
170 170
     /**
171 171
      * @param $id
Please login to merge, or discard this patch.