Completed
Pull Request — master (#3862)
by
unknown
02:45
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/Exporters/CsvExporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
             'Content-Disposition' => "attachment; filename=\"$filename\"",
23 23
         ];
24 24
 
25
-        response()->stream(function () {
25
+        response()->stream(function() {
26 26
             $handle = fopen('php://output', 'w');
27 27
 
28 28
             $titles = [];
29 29
 
30
-            $this->chunk(function ($records) use ($handle, &$titles) {
30
+            $this->chunk(function($records) use ($handle, &$titles) {
31 31
                 if (empty($titles)) {
32 32
                     $titles = $this->getHeaderRowFromRecords($records);
33 33
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function getHeaderRowFromRecords(Collection $records): array
56 56
     {
57 57
         $titles = collect(Arr::dot($records->first()->toArray()))->keys()->map(
58
-            function ($key) {
58
+            function($key) {
59 59
                 $key = str_replace('.', ' ', $key);
60 60
 
61 61
                 return Str::ucfirst($key);
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 2 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.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
                 return $ret;
366 366
             }
367 367
 
368
-            collect(explode(',', $id))->filter()->each(function ($id) {
368
+            collect(explode(',', $id))->filter()->each(function($id) {
369 369
                 $builder = $this->model()->newQuery();
370 370
 
371 371
                 if ($this->isSoftDeletes) {
@@ -418,9 +418,9 @@  discard block
 block discarded – undo
418 418
 
419 419
         $data = $model->toArray();
420 420
 
421
-        $this->builder->fields()->filter(function ($field) {
421
+        $this->builder->fields()->filter(function($field) {
422 422
             return $field instanceof Field\File;
423
-        })->each(function (Field\File $file) use ($data) {
423
+        })->each(function(Field\File $file) use ($data) {
424 424
             $file->setOriginal($data);
425 425
 
426 426
             $file->destroy();
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
             return $response;
446 446
         }
447 447
 
448
-        DB::transaction(function () {
448
+        DB::transaction(function() {
449 449
             $inserts = $this->prepareInsert($this->updates);
450 450
 
451 451
             foreach ($inserts as $column => $value) {
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
             return $response;
615 615
         }
616 616
 
617
-        DB::transaction(function () {
617
+        DB::transaction(function() {
618 618
             $updates = $this->prepareUpdate($this->updates);
619 619
 
620 620
             foreach ($updates as $column => $value) {
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
     protected function getFieldByColumn($column)
1095 1095
     {
1096 1096
         return $this->builder->fields()->first(
1097
-            function (Field $field) use ($column) {
1097
+            function(Field $field) use ($column) {
1098 1098
                 if (is_array($field->column())) {
1099 1099
                     return in_array($column, $field->column());
1100 1100
                 }
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
 
1116 1116
         $values = $this->model->toArray();
1117 1117
 
1118
-        $this->builder->fields()->each(function (Field $field) use ($values) {
1118
+        $this->builder->fields()->each(function(Field $field) use ($values) {
1119 1119
             $field->setOriginal($values);
1120 1120
         });
1121 1121
     }
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
         // resolve CamelCase Model relation method name
1149 1149
         $data = $this->solveCamelCaseModelRelationMethodNames($data, $relations);
1150 1150
 
1151
-        $this->builder->fields()->each(function (Field $field) use ($data) {
1151
+        $this->builder->fields()->each(function(Field $field) use ($data) {
1152 1152
             if (!in_array($field->column(), $this->ignored)) {
1153 1153
                 $field->fill($data);
1154 1154
             }
@@ -1292,7 +1292,7 @@  discard block
 block discarded – undo
1292 1292
      */
1293 1293
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
1294 1294
     {
1295
-        $this->builder()->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1295
+        $this->builder()->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1296 1296
             /* @var Field $field  */
1297 1297
             $field->setWidth($fieldWidth, $labelWidth);
1298 1298
         });
@@ -1705,12 +1705,12 @@  discard block
 block discarded – undo
1705 1705
      */
1706 1706
     protected function solveCamelCaseModelRelationMethodNames($data, $relations)
1707 1707
     {
1708
-        $relationsUnderScored = array_map(function ($s) {
1708
+        $relationsUnderScored = array_map(function($s) {
1709 1709
             return strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $s));
1710 1710
         }, $relations);
1711 1711
         $relationsDict = array_combine($relations, $relationsUnderScored);
1712 1712
 
1713
-        function replaceKeys (array $input, array $relationsDict) {
1713
+        function replaceKeys(array $input, array $relationsDict) {
1714 1714
             $return = [];
1715 1715
             foreach ($input as $key => $value) {
1716 1716
                 if (is_array($value)) {
Please login to merge, or discard this patch.