Passed
Push — master ( c29086...8fb5ed )
by Chubarov
07:29
created
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 1 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.
src/Modes/OneToAll.php 1 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.
src/Modes/Each.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@
 block discarded – undo
16 16
     public function postEmail(SheduleEmail $tasks)
17 17
     {
18 18
         $template = config('postman.templates.'.get_class($this));
19
-        Mail::send($template['name_template'], [$template['variable'] => $tasks->email->text], function($message)  use ($tasks) {
19
+        Mail::send($template[ 'name_template' ], [ $template[ 'variable' ] => $tasks->email->text ], function($message)  use ($tasks) {
20 20
             $message->subject($tasks->email->theme);
21 21
             $message->from(config('mail.from.address'));
22
-            $message->to($tasks->email->users->map(function($value){ return $value->email;})->toArray());
22
+            $message->to($tasks->email->users->map(function($value) { return $value->email; })->toArray());
23 23
         });
24 24
 
25 25
         // if to reached the sender
Please login to merge, or discard this patch.