Test Setup Failed
Branch master (5c926f)
by Song
09:45
created
src/Form.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -224,9 +224,9 @@  discard block
 block discarded – undo
224 224
         $data = $this->model->with($this->getRelations())
225 225
             ->findOrFail($id)->toArray();
226 226
 
227
-        $this->builder->fields()->filter(function ($field) {
227
+        $this->builder->fields()->filter(function($field) {
228 228
             return $field instanceof Field\File;
229
-        })->each(function (File $file) use ($data) {
229
+        })->each(function(File $file) use ($data) {
230 230
             $file->setOriginal($data);
231 231
 
232 232
             $file->destroy();
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
         $this->prepare($data, $this->saving);
250 250
 
251
-        DB::transaction(function () {
251
+        DB::transaction(function() {
252 252
             $inserts = $this->prepareInsert($this->updates);
253 253
 
254 254
             foreach ($inserts as $column => $value) {
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             $callback($this);
280 280
         }
281 281
 
282
-        $this->updates = array_filter($this->inputs, function ($val) {
282
+        $this->updates = array_filter($this->inputs, function($val) {
283 283
             return is_string($val) or ($val instanceof UploadedFile);
284 284
         });
285 285
 
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
         $this->prepare($data, $this->saving);
355 355
 
356
-        DB::transaction(function () {
356
+        DB::transaction(function() {
357 357
             $updates = $this->prepareUpdate($this->updates);
358 358
 
359 359
             foreach ($updates as $column => $value) {
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
     protected function getFieldByColumn($column)
540 540
     {
541 541
         return $this->builder->fields()->first(
542
-            function ($index, Field $field) use ($column) {
542
+            function($index, Field $field) use ($column) {
543 543
                 if (is_array($field->column())) {
544 544
                     return in_array($column, $field->column());
545 545
                 }
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
     {
559 559
         $values = $this->model->toArray();
560 560
 
561
-        $this->builder->fields()->each(function (Field $field) use ($values) {
561
+        $this->builder->fields()->each(function(Field $field) use ($values) {
562 562
             $field->setOriginal($values);
563 563
         });
564 564
     }
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 
579 579
         $data = $this->model->toArray();
580 580
 
581
-        $this->builder->fields()->each(function (Field $field) use ($data) {
581
+        $this->builder->fields()->each(function(Field $field) use ($data) {
582 582
             $field->fill($data);
583 583
         });
584 584
     }
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
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
         $this->value = array_get($inputs, $this->column);
56 56
 
57
-        $value = array_filter($this->value, function ($val) {
57
+        $value = array_filter($this->value, function($val) {
58 58
             return $val !== '';
59 59
         });
60 60
 
Please login to merge, or discard this patch.
src/Grid/Filter/AbstractFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
 
159 159
         list($relation, $args[0]) = explode('.', $this->column);
160 160
 
161
-        return ['whereHas' => [$relation, function ($relation) use ($args) {
161
+        return ['whereHas' => [$relation, function($relation) use ($args) {
162 162
             call_user_func_array([$relation, $this->query], $args);
163 163
         }]];
164 164
     }
Please login to merge, or discard this patch.
src/Grid/Model.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $this->setSort();
112 112
         $this->setPaginate();
113 113
 
114
-        $this->queries->each(function ($query) {
114
+        $this->queries->each(function($query) {
115 115
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
116 116
         });
117 117
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     {
128 128
         $paginate = $this->findQueryByMethod('paginate')->first();
129 129
 
130
-        $this->queries = $this->queries->reject(function ($query) {
130
+        $this->queries = $this->queries->reject(function($query) {
131 131
             return $query['method'] == 'paginate';
132 132
         });
133 133
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     protected function findQueryByMethod($method)
148 148
     {
149
-        return $this->queries->filter(function ($query) use ($method) {
149
+        return $this->queries->filter(function($query) use ($method) {
150 150
             return $query['method'] == $method;
151 151
         });
152 152
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     {
189 189
         list($relationName, $relationColumn) = explode('.', $column);
190 190
 
191
-        if ($this->queries->contains(function ($key, $query) use ($relationName) {
191
+        if ($this->queries->contains(function($key, $query) use ($relationName) {
192 192
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
193 193
         })) {
194 194
             $relation = $this->model->$relationName();
Please login to merge, or discard this patch.
src/Grid/Row.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     public function style($style)
135 135
     {
136 136
         if (is_array($style)) {
137
-            $style = implode('', array_map(function ($key, $val) {
137
+            $style = implode('', array_map(function($key, $val) {
138 138
                 return "$key:$val";
139 139
             }, array_keys($style), array_values($style)));
140 140
         }
Please login to merge, or discard this patch.
src/Grid/Column.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     public function button($style = 'default')
211 211
     {
212 212
         if (is_array($style)) {
213
-            $style = array_map(function ($style) {
213
+            $style = array_map(function($style) {
214 214
                 return 'btn-'.$style;
215 215
             }, $style);
216 216
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     public function progressBar($style = 'primary', $size = 'sm', $max = 100)
239 239
     {
240 240
         if (is_array($style)) {
241
-            $style = array_map(function ($style) {
241
+            $style = array_map(function($style) {
242 242
                 return 'progress-bar-'.$style;
243 243
             }, $style);
244 244
 
Please login to merge, or discard this patch.
src/Grid/Filter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     public function conditions()
48 48
     {
49
-        $inputs = array_filter(Input::all(), function ($input) {
49
+        $inputs = array_filter(Input::all(), function($input) {
50 50
             return $input !== '';
51 51
         });
52 52
 
Please login to merge, or discard this patch.
src/Routing/Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $attributes = $this->attributes;
66 66
         $attributes['namespace'] = 'Encore\Admin\Controllers';
67 67
 
68
-        $this->router->group($attributes, function ($router) {
68
+        $this->router->group($attributes, function($router) {
69 69
             $router->resources([
70 70
                 'auth/users'       => 'UserController',
71 71
                 'auth/roles'       => 'RoleController',
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function register()
87 87
     {
88
-        $this->router->group($this->attributes, function ($router) {
88
+        $this->router->group($this->attributes, function($router) {
89 89
             foreach ($this->routes as $method => $arguments) {
90 90
                 foreach ($arguments as $argument) {
91 91
                     call_user_func_array([$router, $method], $argument);
Please login to merge, or discard this patch.
src/Providers/AdminServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function register()
62 62
     {
63
-        $this->app->booting(function () {
63
+        $this->app->booting(function() {
64 64
             $loader = AliasLoader::getInstance();
65 65
 
66 66
             $loader->alias('Admin', \Encore\Admin\Facades\Admin::class);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
     public function registerRouter()
116 116
     {
117
-        $this->app->singleton('admin.router', function ($app) {
117
+        $this->app->singleton('admin.router', function($app) {
118 118
             return new Router($app['router']);
119 119
         });
120 120
     }
Please login to merge, or discard this patch.