Completed
Pull Request — master (#2254)
by
unknown
12:23 queued 09:50
created
src/Widgets/Form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
      */
163 163
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
164 164
     {
165
-        collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) {
165
+        collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) {
166 166
             /* @var Field $field  */
167 167
             $field->setWidth($fieldWidth, $labelWidth);
168 168
         });
Please login to merge, or discard this patch.
resources/views/partials/error.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 @if(Session::has('error'))
2
-    <?php $error = Session::get('error');?>
2
+    <?php $error = Session::get('error'); ?>
3 3
     <div class="alert alert-danger alert-dismissable">
4 4
         <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
5 5
         <h4><i class="icon fa fa-ban"></i>{{ array_get($error->get('title'), 0) }}</h4>
6 6
         <p>{!!  array_get($error->get('message'), 0) !!}</p>
7 7
     </div>
8 8
 @elseif (Session::has('errors'))
9
-    <?php $errors = Session::get('errors');?>
9
+    <?php $errors = Session::get('errors'); ?>
10 10
     @if ($errors->hasBag('error'))
11 11
       <div class="alert alert-danger alert-dismissable">
12 12
 
Please login to merge, or discard this patch.
src/Middleware/Permission.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             return $next($request);
34 34
         }
35 35
 
36
-        if (!Admin::user()->allPermissions()->first(function ($permission) use ($request) {
36
+        if (!Admin::user()->allPermissions()->first(function($permission) use ($request) {
37 37
             return $permission->shouldPassThrough($request);
38 38
         })) {
39 39
             Checker::error();
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function checkRoutePermission(Request $request)
54 54
     {
55
-        if (!$middleware = collect($request->route()->middleware())->first(function ($middleware) {
55
+        if (!$middleware = collect($request->route()->middleware())->first(function($middleware) {
56 56
             return Str::startsWith($middleware, $this->middlewarePrefix);
57 57
         })) {
58 58
             return false;
Please login to merge, or discard this patch.
src/Auth/Database/Role.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
     {
87 87
         parent::boot();
88 88
 
89
-        static::deleting(function ($model) {
89
+        static::deleting(function($model) {
90 90
             $model->administrators()->detach();
91 91
 
92 92
             $model->permissions()->detach();
Please login to merge, or discard this patch.
src/Auth/Database/Permission.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         $method = $this->http_method;
68 68
 
69
-        $matches = array_map(function ($path) use ($method) {
69
+        $matches = array_map(function($path) use ($method) {
70 70
             $path = trim(config('admin.route.prefix'), '/').$path;
71 71
 
72 72
             if (Str::contains($path, ':')) {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             return false;
101 101
         }
102 102
 
103
-        $method = collect($match['method'])->filter()->map(function ($method) {
103
+        $method = collect($match['method'])->filter()->map(function($method) {
104 104
             return strtoupper($method);
105 105
         });
106 106
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         parent::boot();
142 142
 
143
-        static::deleting(function ($model) {
143
+        static::deleting(function($model) {
144 144
             $model->roles()->detach();
145 145
         });
146 146
     }
Please login to merge, or discard this patch.
src/Auth/Database/HasPermissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
     {
156 156
         parent::boot();
157 157
 
158
-        static::deleting(function ($model) {
158
+        static::deleting(function($model) {
159 159
             $model->roles()->detach();
160 160
 
161 161
             $model->permissions()->detach();
Please login to merge, or discard this patch.
src/Auth/Database/Menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     {
79 79
         static::treeBoot();
80 80
 
81
-        static::deleting(function ($model) {
81
+        static::deleting(function($model) {
82 82
             $model->roles()->detach();
83 83
         });
84 84
     }
Please login to merge, or discard this patch.
src/Grid/Model.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -225,9 +225,9 @@  discard block
 block discarded – undo
225 225
 
226 226
         $this->setSort();
227 227
 
228
-        $this->queries->reject(function ($query) {
228
+        $this->queries->reject(function($query) {
229 229
             return $query['method'] == 'paginate';
230
-        })->each(function ($query) {
230
+        })->each(function($query) {
231 231
             $this->model = $this->model->{$query['method']}(...$query['arguments']);
232 232
         });
233 233
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
         $this->setSort();
275 275
         $this->setPaginate();
276 276
 
277
-        $this->queries->unique()->each(function ($query) {
277
+        $this->queries->unique()->each(function($query) {
278 278
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
279 279
         });
280 280
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
     {
319 319
         $paginate = $this->findQueryByMethod('paginate');
320 320
 
321
-        $this->queries = $this->queries->reject(function ($query) {
321
+        $this->queries = $this->queries->reject(function($query) {
322 322
             return $query['method'] == 'paginate';
323 323
         });
324 324
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
      */
373 373
     protected function findQueryByMethod($method)
374 374
     {
375
-        return $this->queries->first(function ($query) use ($method) {
375
+        return $this->queries->first(function($query) use ($method) {
376 376
             return $query['method'] == $method;
377 377
         });
378 378
     }
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
     {
417 417
         list($relationName, $relationColumn) = explode('.', $column);
418 418
 
419
-        if ($this->queries->contains(function ($query) use ($relationName) {
419
+        if ($this->queries->contains(function($query) use ($relationName) {
420 420
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
421 421
         })) {
422 422
             $relation = $this->model->$relationName();
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
      */
446 446
     public function resetOrderBy()
447 447
     {
448
-        $this->queries = $this->queries->reject(function ($query) {
448
+        $this->queries = $this->queries->reject(function($query) {
449 449
             return $query['method'] == 'orderBy' || $query['method'] == 'orderByDesc';
450 450
         });
451 451
     }
Please login to merge, or discard this patch.
src/Form.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
         $data = $this->model->with($this->getRelations())
306 306
             ->findOrFail($id)->toArray();
307 307
 
308
-        $this->builder->fields()->filter(function ($field) {
308
+        $this->builder->fields()->filter(function($field) {
309 309
             return $field instanceof Field\File;
310
-        })->each(function (File $file) use ($data) {
310
+        })->each(function(File $file) use ($data) {
311 311
             $file->setOriginal($data);
312 312
 
313 313
             $file->destroy();
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
             return $response;
333 333
         }
334 334
 
335
-        DB::transaction(function () {
335
+        DB::transaction(function() {
336 336
             $inserts = $this->prepareInsert($this->updates);
337 337
 
338 338
             foreach ($inserts as $column => $value) {
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
             return $response;
534 534
         }
535 535
 
536
-        DB::transaction(function () {
536
+        DB::transaction(function() {
537 537
             $updates = $this->prepareUpdate($this->updates);
538 538
 
539 539
             foreach ($updates as $column => $value) {
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
     protected function getFieldByColumn($column)
926 926
     {
927 927
         return $this->builder->fields()->first(
928
-            function (Field $field) use ($column) {
928
+            function(Field $field) use ($column) {
929 929
                 if (is_array($field->column())) {
930 930
                     return in_array($column, $field->column());
931 931
                 }
@@ -946,7 +946,7 @@  discard block
 block discarded – undo
946 946
 
947 947
         $values = $this->model->toArray();
948 948
 
949
-        $this->builder->fields()->each(function (Field $field) use ($values) {
949
+        $this->builder->fields()->each(function(Field $field) use ($values) {
950 950
             $field->setOriginal($values);
951 951
         });
952 952
     }
@@ -968,7 +968,7 @@  discard block
 block discarded – undo
968 968
 
969 969
         $data = $this->model->toArray();
970 970
 
971
-        $this->builder->fields()->each(function (Field $field) use ($data) {
971
+        $this->builder->fields()->each(function(Field $field) use ($data) {
972 972
             if (!in_array($field->column(), $this->ignored)) {
973 973
                 $field->fill($data);
974 974
             }
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
      */
1090 1090
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
1091 1091
     {
1092
-        $this->builder()->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1092
+        $this->builder()->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1093 1093
             /* @var Field $field  */
1094 1094
             $field->setWidth($fieldWidth, $labelWidth);
1095 1095
         });
Please login to merge, or discard this patch.