Completed
Pull Request — master (#1350)
by
unknown
02:37
created
src/Form/Builder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     public function field($name)
261 261
     {
262
-        return $this->fields()->first(function (Field $field) use ($name) {
262
+        return $this->fields()->first(function(Field $field) use ($name) {
263 263
             return $field->column() == $name;
264 264
         });
265 265
     }
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
             $this->form->model()->getUpdatedAtColumn(),
503 503
         ];
504 504
 
505
-        $this->fields = $this->fields()->reject(function (Field $field) use ($reservedColumns) {
505
+        $this->fields = $this->fields()->reject(function(Field $field) use ($reservedColumns) {
506 506
             return in_array($field->column(), $reservedColumns);
507 507
         });
508 508
 
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
     {
529 529
         $rules = [];
530 530
         foreach ($this->fields() as $item) {
531
-            if(!empty($item->getRules())){
531
+            if (!empty($item->getRules())) {
532 532
                 $rules[$item->id] = $item->getRules();
533 533
             }
534 534
         }
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
     public function getRuleMessages()
545 545
     {
546 546
         $rules = [];
547
-        foreach ($this->fields() as $item ) {
547
+        foreach ($this->fields() as $item) {
548 548
             foreach ($item->validationMessages as $key => $value) {
549 549
                 $rules[$key] = $value;
550 550
             }
Please login to merge, or discard this patch.
src/Form/Field.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     {
245 245
         $column = is_array($this->column) ? current($this->column) : $this->column;
246 246
 
247
-        $trans_key = 'validation.attributes.' . strtolower($column);
247
+        $trans_key = 'validation.attributes.'.strtolower($column);
248 248
         if (isset($arguments[0])) {
249 249
             $label = $arguments[0];
250 250
         } else if (Lang::has($trans_key)) {
@@ -619,9 +619,9 @@  discard block
 block discarded – undo
619 619
                 if (!array_key_exists($column, $input)) {
620 620
                     continue;
621 621
                 }
622
-                $input[$column . $key] = array_get($input, $column);
623
-                $rules[$column . $key] = $fieldRules;
624
-                $attributes[$column . $key] = $this->label . "[$column]";
622
+                $input[$column.$key] = array_get($input, $column);
623
+                $rules[$column.$key] = $fieldRules;
624
+                $attributes[$column.$key] = $this->label."[$column]";
625 625
             }
626 626
         }
627 627
 
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
         if (is_array($attribute)) {
660 660
             $this->attributes = array_merge($this->attributes, $attribute);
661 661
         } else {
662
-            $this->attributes[$attribute] = (string)$value;
662
+            $this->attributes[$attribute] = (string) $value;
663 663
         }
664 664
 
665 665
         return $this;
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
      */
697 697
     public function getPlaceholder()
698 698
     {
699
-        return $this->placeholder ?: trans('admin.input') . ' ' . $this->label;
699
+        return $this->placeholder ?: trans('admin.input').' '.$this->label;
700 700
     }
701 701
 
702 702
     /**
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
         $html = [];
722 722
 
723 723
         foreach ($this->attributes as $name => $value) {
724
-            $html[] = $name . '="' . e($value) . '"';
724
+            $html[] = $name.'="'.e($value).'"';
725 725
         }
726 726
 
727 727
         return implode(' ', $html);
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
      */
767 767
     public function setElementClass($class)
768 768
     {
769
-        $this->elementClass = (array)$class;
769
+        $this->elementClass = (array) $class;
770 770
 
771 771
         return $this;
772 772
     }
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
         if (!$this->elementClass) {
782 782
             $name = $this->elementName ?: $this->formatName($this->column);
783 783
 
784
-            $this->elementClass = (array)str_replace([
784
+            $this->elementClass = (array) str_replace([
785 785
                 '[',
786 786
                 ']'
787 787
             ], '_', $name);
@@ -825,13 +825,13 @@  discard block
 block discarded – undo
825 825
             $classes = [];
826 826
 
827 827
             foreach ($elementClass as $index => $class) {
828
-                $classes[$index] = '.' . (is_array($class) ? implode('.', $class) : $class);
828
+                $classes[$index] = '.'.(is_array($class) ? implode('.', $class) : $class);
829 829
             }
830 830
 
831 831
             return $classes;
832 832
         }
833 833
 
834
-        return '.' . implode('.', $elementClass);
834
+        return '.'.implode('.', $elementClass);
835 835
     }
836 836
 
837 837
     /**
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
     public function addElementClass($class)
845 845
     {
846 846
         if (is_array($class) || is_string($class)) {
847
-            $this->elementClass = array_merge($this->elementClass, (array)$class);
847
+            $this->elementClass = array_merge($this->elementClass, (array) $class);
848 848
 
849 849
             $this->elementClass = array_unique($this->elementClass);
850 850
         }
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
         $delClass = [];
865 865
 
866 866
         if (is_string($class) || is_array($class)) {
867
-            $delClass = (array)$class;
867
+            $delClass = (array) $class;
868 868
         }
869 869
 
870 870
         foreach ($delClass as $del) {
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 
912 912
         $class = explode('\\', get_called_class());
913 913
 
914
-        return 'admin::form.' . strtolower(end($class));
914
+        return 'admin::form.'.strtolower(end($class));
915 915
     }
916 916
 
917 917
     /**
Please login to merge, or discard this patch.
src/Admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -235,10 +235,10 @@
 block discarded – undo
235 235
             'middleware' => config('admin.route.middleware'),
236 236
         ];
237 237
 
238
-        Route::group($attributes, function ($router) {
238
+        Route::group($attributes, function($router) {
239 239
 
240 240
             /* @var \Illuminate\Routing\Router $router */
241
-            $router->group([], function ($router) {
241
+            $router->group([], function($router) {
242 242
 
243 243
                 /* @var \Illuminate\Routing\Router $router */
244 244
                 $router->resource('auth/users', 'UserController');
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
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     {
77 77
         parent::boot();
78 78
 
79
-        static::deleting(function ($model) {
79
+        static::deleting(function($model) {
80 80
             $model->roles()->detach();
81 81
         });
82 82
     }
Please login to merge, or discard this patch.