Completed
Pull Request — master (#5319)
by
unknown
03:48
created
src/Middleware/Authenticate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
         return collect($excepts)
45 45
             ->map('admin_base_path')
46
-            ->contains(function ($except) use ($request) {
46
+            ->contains(function($except) use ($request) {
47 47
                 if ($except !== '/') {
48 48
                     $except = trim($except, '/');
49 49
                 }
Please login to merge, or discard this patch.
src/Grid/Exporters/ExcelExporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
             $eagerLoads = array_keys($this->getQuery()->getEagerLoads());
51 51
 
52
-            $columns = collect($columns)->reject(function ($column) use ($eagerLoads) {
52
+            $columns = collect($columns)->reject(function($column) use ($eagerLoads) {
53 53
                 return Str::contains($column, '.') || in_array($column, $eagerLoads);
54 54
             });
55 55
 
Please login to merge, or discard this patch.
src/Grid/Displayers/Table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
             $columns = $titles;
24 24
         }
25 25
 
26
-        $data = array_map(function ($item) use ($columns) {
26
+        $data = array_map(function($item) use ($columns) {
27 27
             $sorted = [];
28 28
 
29 29
             $arr = Arr::only($item, $columns);
Please login to merge, or discard this patch.
src/Grid/Filter/Between.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 
66 66
         $this->value = Arr::get($inputs, $this->column);
67 67
 
68
-        $value = array_filter($this->value, function ($val) {
68
+        $value = array_filter($this->value, function($val) {
69 69
             return $val !== '';
70 70
         });
71 71
 
Please login to merge, or discard this patch.
src/Traits/ModelTree.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     {
198 198
         static::$branchOrder = array_flip(Arr::flatten($order));
199 199
 
200
-        static::$branchOrder = array_map(function ($item) {
200
+        static::$branchOrder = array_map(function($item) {
201 201
             return ++$item;
202 202
         }, static::$branchOrder);
203 203
     }
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     {
295 295
         parent::boot();
296 296
 
297
-        static::saving(function (Model $branch) {
297
+        static::saving(function(Model $branch) {
298 298
             $parentColumn = $branch->getParentColumn();
299 299
 
300 300
             if (Request::has($parentColumn) && Request::input($parentColumn) == $branch->getKey()) {
Please login to merge, or discard this patch.
src/Controllers/Dashboard.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -21,20 +21,20 @@
 block discarded – undo
21 21
     public static function environment()
22 22
     {
23 23
         $envs = [
24
-            ['name' => 'PHP version',       'value' => 'PHP/'.PHP_VERSION],
25
-            ['name' => 'Laravel version',   'value' => app()->version()],
26
-            ['name' => 'CGI',               'value' => php_sapi_name()],
27
-            ['name' => 'Uname',             'value' => php_uname()],
28
-            ['name' => 'Server',            'value' => Arr::get($_SERVER, 'SERVER_SOFTWARE')],
24
+            ['name' => 'PHP version', 'value' => 'PHP/'.PHP_VERSION],
25
+            ['name' => 'Laravel version', 'value' => app()->version()],
26
+            ['name' => 'CGI', 'value' => php_sapi_name()],
27
+            ['name' => 'Uname', 'value' => php_uname()],
28
+            ['name' => 'Server', 'value' => Arr::get($_SERVER, 'SERVER_SOFTWARE')],
29 29
 
30
-            ['name' => 'Cache driver',      'value' => config('cache.default')],
31
-            ['name' => 'Session driver',    'value' => config('session.driver')],
32
-            ['name' => 'Queue driver',      'value' => config('queue.default')],
30
+            ['name' => 'Cache driver', 'value' => config('cache.default')],
31
+            ['name' => 'Session driver', 'value' => config('session.driver')],
32
+            ['name' => 'Queue driver', 'value' => config('queue.default')],
33 33
 
34
-            ['name' => 'Timezone',          'value' => config('app.timezone')],
35
-            ['name' => 'Locale',            'value' => config('app.locale')],
36
-            ['name' => 'Env',               'value' => config('app.env')],
37
-            ['name' => 'URL',               'value' => config('app.url')],
34
+            ['name' => 'Timezone', 'value' => config('app.timezone')],
35
+            ['name' => 'Locale', 'value' => config('app.locale')],
36
+            ['name' => 'Env', 'value' => config('app.env')],
37
+            ['name' => 'URL', 'value' => config('app.url')],
38 38
         ];
39 39
 
40 40
         return view('admin::dashboard.environment', compact('envs'));
Please login to merge, or discard this patch.
src/Form/Field/Table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@
 block discarded – undo
65 65
 
66 66
         $prepare = $form->prepare($input);
67 67
 
68
-        return collect($prepare)->reject(function ($item) {
68
+        return collect($prepare)->reject(function($item) {
69 69
             return $item[NestedForm::REMOVE_FLAG_NAME] == 1;
70
-        })->map(function ($item) {
70
+        })->map(function($item) {
71 71
             unset($item[NestedForm::REMOVE_FLAG_NAME]);
72 72
 
73 73
             return $item;
Please login to merge, or discard this patch.
src/Form.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
      *
437 437
      * @param array $data
438 438
      *
439
-     * @return mixed
439
+     * @return Response|null
440 440
      */
441 441
     protected function prepare($data = [])
442 442
     {
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
     /**
577 577
      * Get RedirectResponse after update.
578 578
      *
579
-     * @param mixed $key
579
+     * @param integer $key
580 580
      *
581 581
      * @return \Illuminate\Http\RedirectResponse
582 582
      */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
18 18
 use Illuminate\Database\Eloquent\Model;
19 19
 use Illuminate\Database\Eloquent\Relations;
20 20
 use Illuminate\Database\Eloquent\SoftDeletes;
21
-use Illuminate\Http\Request;
22 21
 use Illuminate\Support\Arr;
23 22
 use Illuminate\Support\Facades\DB;
24 23
 use Illuminate\Support\MessageBag;
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                 return $ret;
254 254
             }
255 255
 
256
-            collect(explode(',', $id))->filter()->each(function ($id) {
256
+            collect(explode(',', $id))->filter()->each(function($id) {
257 257
                 $builder = $this->model()->newQuery();
258 258
 
259 259
                 if ($this->isSoftDeletes) {
@@ -306,9 +306,9 @@  discard block
 block discarded – undo
306 306
 
307 307
         $data = $model->toArray();
308 308
 
309
-        $this->fields()->filter(function ($field) {
309
+        $this->fields()->filter(function($field) {
310 310
             return $field instanceof Field\File;
311
-        })->each(function (Field\File $file) use ($data) {
311
+        })->each(function(Field\File $file) use ($data) {
312 312
             $file->setOriginal($data);
313 313
 
314 314
             $file->destroy();
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             return $response;
334 334
         }
335 335
 
336
-        DB::transaction(function () {
336
+        DB::transaction(function() {
337 337
             $inserts = $this->prepareInsert($this->updates);
338 338
 
339 339
             foreach ($inserts as $column => $value) {
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
             return $response;
538 538
         }
539 539
 
540
-        DB::transaction(function () {
540
+        DB::transaction(function() {
541 541
             $updates = $this->prepareUpdate($this->updates);
542 542
 
543 543
             foreach ($updates as $column => $value) {
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
     protected function getFieldByColumn($column)
988 988
     {
989 989
         return $this->fields()->first(
990
-            function (Field $field) use ($column) {
990
+            function(Field $field) use ($column) {
991 991
                 if (is_array($field->column())) {
992 992
                     return in_array($column, $field->column());
993 993
                 }
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
     {
1007 1007
         $values = $this->model->toArray();
1008 1008
 
1009
-        $this->fields()->each(function (Field $field) use ($values) {
1009
+        $this->fields()->each(function(Field $field) use ($values) {
1010 1010
             $field->setOriginal($values);
1011 1011
         });
1012 1012
     }
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
     {
1021 1021
         $relations = $this->getRelations();
1022 1022
 
1023
-        $this->fields()->each(function (Field $field) use ($relations) {
1023
+        $this->fields()->each(function(Field $field) use ($relations) {
1024 1024
             if ($field->getSnakeAttributes()) {
1025 1025
                 return;
1026 1026
             }
@@ -1062,7 +1062,7 @@  discard block
 block discarded – undo
1062 1062
 
1063 1063
         $data = $this->model->toArray();
1064 1064
 
1065
-        $this->fields()->each(function (Field $field) use ($data) {
1065
+        $this->fields()->each(function(Field $field) use ($data) {
1066 1066
             if (!in_array($field->column(), $this->ignored, true)) {
1067 1067
                 $field->fill($data);
1068 1068
             }
@@ -1193,7 +1193,7 @@  discard block
 block discarded – undo
1193 1193
      */
1194 1194
     public function setWidth($fieldWidth = 8, $labelWidth = 2): self
1195 1195
     {
1196
-        $this->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1196
+        $this->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1197 1197
             /* @var Field $field  */
1198 1198
             $field->setWidth($fieldWidth, $labelWidth);
1199 1199
         });
Please login to merge, or discard this patch.
src/Console/MinifyCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     protected function minifyCSS()
79 79
     {
80 80
         $css = collect(array_merge(Admin::$css, Admin::baseCss()))
81
-            ->unique()->map(function ($css) {
81
+            ->unique()->map(function($css) {
82 82
 
83 83
                 if (url()->isValidUrl($css)) {
84 84
                     $this->assets['css'][] = $css;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     protected function minifyJS()
103 103
     {
104 104
         $js = collect(array_merge(Admin::$js, Admin::baseJs()))
105
-            ->unique()->map(function ($js) {
105
+            ->unique()->map(function($js) {
106 106
 
107 107
                 if (url()->isValidUrl($js)) {
108 108
                     $this->assets['js'][] = $js;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
     protected function generateManifest()
127 127
     {
128
-        $min = collect(Admin::$min)->mapWithKeys(function ($path, $type) {
128
+        $min = collect(Admin::$min)->mapWithKeys(function($path, $type) {
129 129
             return [$type => sprintf('%s?id=%s', $path, md5(uniqid()))];
130 130
         });
131 131
 
Please login to merge, or discard this patch.