Passed
Push — master ( 369c5b...a8694d )
by Sheldon
28:35 queued 23:06
created
app/Transformers/AdminMenuTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     public function getRolesAttr(AdminMenu $model)
37 37
     {
38 38
         $roles = "<div style='margin-bottom: 5px;'>";
39
-        $roles .= collect($model->roles)->map(function ($role, $index) {
39
+        $roles .= collect($model->roles)->map(function($role, $index) {
40 40
             $br = $index && $index % 3 == 0 ? '</div><div style=\'margin-bottom: 5px;\'>' : '';
41 41
 
42 42
             return "<span class='label label-success'>{$role->name}</span>{$br}";
Please login to merge, or discard this patch.
app/Transformers/AdminUserTransformer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function getRolesAttr(AdminUser $model)
41 41
     {
42 42
         $roles = "<div style='margin-bottom: 5px;'>";
43
-        $roles .= collect($model->roles)->map(function ($role, $index) {
43
+        $roles .= collect($model->roles)->map(function($role, $index) {
44 44
             $br = $index && $index % 3 == 0 ? '</div><div style=\'margin-bottom: 5px;\'>' : '';
45 45
 
46 46
             return "<span class='label label-success'>{$role->name}</span>{$br}";
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     public function getPermissionsAttr(AdminUser $model)
54 54
     {
55 55
         $permissions = "<div style='margin-bottom: 5px;'>";
56
-        $permissions .= collect($model->permissions)->map(function ($permission, $index) {
56
+        $permissions .= collect($model->permissions)->map(function($permission, $index) {
57 57
             $br = $index && $index % 3 == 0 ? '</div><div style=\'margin-bottom: 5px;\'>' : '';
58 58
 
59 59
             return "<span class='label label-success'>{$permission->name}</span>{$br}";
Please login to merge, or discard this patch.
app/Services/Image/YeelightImageService.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         try {
215 215
             $image = Image::make($source);
216 216
         } catch (StoreImageException $e) {
217
-            throw new StoreImageException('YeelightImageService: Unable to make image [' + (string) $e + ']');
217
+            throw new StoreImageException('YeelightImageService: Unable to make image [' +(string) $e + ']');
218 218
         }
219 219
 
220 220
         $is_allowed_animated_gif = $isAllowGIF && $isGIF;
@@ -374,21 +374,21 @@  discard block
 block discarded – undo
374 374
         }
375 375
 
376 376
         // convert to image
377
-        $img = Image::cache(function ($image) use ($file_path, $imageTemplate) {
377
+        $img = Image::cache(function($image) use ($file_path, $imageTemplate) {
378 378
             /* @var \Intervention\Image\Image $image */
379 379
             $image->make($file_path);
380 380
 
381 381
             // resize
382 382
             if (!$imageTemplate->isOriginal()) {
383 383
                 if ($imageTemplate->isHeighten()) {
384
-                    $image->heighten($imageTemplate->getHeight(), function ($constraint) use ($imageTemplate) {
384
+                    $image->heighten($imageTemplate->getHeight(), function($constraint) use ($imageTemplate) {
385 385
                         if ($imageTemplate->isRatio()) {
386 386
                             $constraint->aspectRatio();
387 387
                         }
388 388
                         $constraint->upsize();
389 389
                     });
390 390
                 } elseif ($imageTemplate->isWiden()) {
391
-                    $image->widen($imageTemplate->getWidth(), function ($constraint) use ($imageTemplate) {
391
+                    $image->widen($imageTemplate->getWidth(), function($constraint) use ($imageTemplate) {
392 392
                         if ($imageTemplate->isRatio()) {
393 393
                             $constraint->aspectRatio();
394 394
                         }
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
                         $image->fit($imageTemplate->getWidth(), $imageTemplate->getHeight());
401 401
                     } else {
402 402
                         $image->resize($imageTemplate->getWidth(), $imageTemplate->getHeight(),
403
-                            function ($constraint) use ($imageTemplate) {
403
+                            function($constraint) use ($imageTemplate) {
404 404
                                 if ($imageTemplate->isRatio()) {
405 405
                                     $constraint->aspectRatio();
406 406
                                 }
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             }
488 488
 
489 489
             // resize
490
-            $image->resize($newWidth, $newHeight, function ($constraint) {
490
+            $image->resize($newWidth, $newHeight, function($constraint) {
491 491
                 $constraint->aspectRatio();
492 492
                 $constraint->upsize();
493 493
             });
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 
563 563
             return $image_data;
564 564
         } catch (StoreImageException $e) {
565
-            \Log::error('YeelightImageService: Unable to convert to image [' + (string) $e + ']');
565
+            \Log::error('YeelightImageService: Unable to convert to image [' +(string) $e + ']');
566 566
 
567 567
             return;
568 568
         }
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
 
577 577
             return $is_gif;
578 578
         } catch (StoreImageException $e) {
579
-            \Log::error('YeelightImageService: Unable to convert to image [' + (string) $e + ']');
579
+            \Log::error('YeelightImageService: Unable to convert to image [' +(string) $e + ']');
580 580
 
581 581
             return false;
582 582
         }
Please login to merge, or discard this patch.
app/Services/Exporters/CsvExporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
             'Content-Disposition' => "attachment; filename=\"$filename\"",
28 28
         ];
29 29
 
30
-        response()->stream(function () {
30
+        response()->stream(function() {
31 31
             $handle = fopen('php://output', 'w');
32 32
 
33 33
             $titles = [];
34 34
 
35
-            $this->chunk(function ($records) use ($handle, &$titles) {
35
+            $this->chunk(function($records) use ($handle, &$titles) {
36 36
                 if (empty($titles)) {
37 37
                     $titles = $this->getHeaderRowFromRecords($records);
38 38
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     public function getHeaderRowFromRecords(Collection $records): array
61 61
     {
62 62
         $titles = collect(array_dot($records->first()->toArray()))->keys()->map(
63
-            function ($key) {
63
+            function($key) {
64 64
                 $key = str_replace('.', ' ', $key);
65 65
 
66 66
                 return Str::ucfirst($key);
Please login to merge, or discard this patch.
app/Services/Exporters/ExcelExporter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function export()
23 23
     {
24
-        Excel::create($this->getTable().date('YmdHis'), function ($excel) {
25
-            $excel->sheet($this->getTable(), function ($sheet) {
24
+        Excel::create($this->getTable().date('YmdHis'), function($excel) {
25
+            $excel->sheet($this->getTable(), function($sheet) {
26 26
                 $titles = [];
27 27
 
28
-                $this->chunk(function ($records) use ($sheet, &$titles) {
28
+                $this->chunk(function($records) use ($sheet, &$titles) {
29 29
                     if (empty($titles)) {
30 30
                         $titles = $this->getHeaderRowFromRecords($records);
31 31
                         $sheet->prependRow($titles);
32 32
                     }
33
-                    $rows = collect($records->toArray())->map(function ($item) {
33
+                    $rows = collect($records->toArray())->map(function($item) {
34 34
                         $return = [];
35 35
                         foreach ($item as $in => $it) {
36 36
                             if (is_array($it)) {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function getHeaderRowFromRecords(Collection $records): array
57 57
     {
58 58
         $titles = collect(array_dot($records->first()->toArray()))->keys()->map(
59
-            function ($key) {
59
+            function($key) {
60 60
                 $key = str_replace('.', ' ', $key);
61 61
 
62 62
                 return Str::ucfirst($key);
Please login to merge, or discard this patch.
app/Services/Tree/Tree.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     protected function initBranchCallback()
113 113
     {
114 114
         if (is_null($this->branchCallback)) {
115
-            $this->branchCallback = function ($branch) {
115
+            $this->branchCallback = function($branch) {
116 116
                 $key = $branch[$this->model->getKeyName()];
117 117
                 $title = $branch[$this->model->getTitleColumn()];
118 118
 
Please login to merge, or discard this patch.
app/Services/Tree/Tools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      */
63 63
     public function render()
64 64
     {
65
-        return $this->tools->map(function ($tool) {
65
+        return $this->tools->map(function($tool) {
66 66
             if ($tool instanceof Renderable) {
67 67
                 return $tool->render();
68 68
             }
Please login to merge, or discard this patch.
app/Generators/Migrations/RulesParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
     {
92 92
         return array_first(
93 93
             explode('=>', $rules),
94
-            function ($key/*, $value*/) {
94
+            function($key/*, $value*/) {
95 95
                 return $key;
96 96
             }
97 97
         );
Please login to merge, or discard this patch.
app/Generators/Migrations/SchemaParser.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     {
126 126
         return array_first(
127 127
             explode(':', $schema),
128
-            function ($key/*, $value*/) {
128
+            function($key/*, $value*/) {
129 129
                 return $key;
130 130
             }
131 131
         );
@@ -144,8 +144,7 @@  discard block
 block discarded – undo
144 144
         $fields = str_replace($column.':', '', $schema);
145 145
 
146 146
         return $this->hasCustomAttribute($column) ?
147
-            $this->getCustomAttribute($column) :
148
-            explode(':', $fields);
147
+            $this->getCustomAttribute($column) : explode(':', $fields);
149 148
     }
150 149
 
151 150
     /**
Please login to merge, or discard this patch.