Completed
Push — master ( f3c688...30a2df )
by Song
02:43
created
src/Grid/Filter/Scope.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     public function condition()
57 57
     {
58
-        return $this->queries->map(function ($query) {
58
+        return $this->queries->map(function($query) {
59 59
             return [$query['method'] => $query['arguments']];
60 60
         })->toArray();
61 61
     }
Please login to merge, or discard this patch.
src/Form/Tools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@
 block discarded – undo
288 288
             return '';
289 289
         }
290 290
 
291
-        return $tools->map(function ($tool) {
291
+        return $tools->map(function($tool) {
292 292
             if ($tool instanceof Renderable) {
293 293
                 return $tool->render();
294 294
             }
Please login to merge, or discard this patch.
src/Show/Tools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -275,7 +275,7 @@
 block discarded – undo
275 275
      */
276 276
     protected function renderCustomTools($tools)
277 277
     {
278
-        return $tools->map(function ($tool) {
278
+        return $tools->map(function($tool) {
279 279
             if ($tool instanceof Renderable) {
280 280
                 return $tool->render();
281 281
             }
Please login to merge, or discard this patch.
src/Show/Field.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function using(array $values, $default = null)
152 152
     {
153
-        return $this->as(function ($value) use ($values, $default) {
153
+        return $this->as(function($value) use ($values, $default) {
154 154
             if (is_null($value)) {
155 155
                 return $default;
156 156
             }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function image($server = '', $width = 200, $height = 200)
172 172
     {
173
-        return $this->as(function ($path) use ($server, $width, $height) {
173
+        return $this->as(function($path) use ($server, $width, $height) {
174 174
             if (url()->isValidUrl($path)) {
175 175
                 $src = $path;
176 176
             } elseif ($server) {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      */
194 194
     public function link($href = '', $target = '_blank')
195 195
     {
196
-        return $this->as(function ($link) use ($href, $target) {
196
+        return $this->as(function($link) use ($href, $target) {
197 197
             $href = $href ?: $link;
198 198
 
199 199
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public function label($style = 'success')
211 211
     {
212
-        return $this->as(function ($value) use ($style) {
212
+        return $this->as(function($value) use ($style) {
213 213
             if ($value instanceof Arrayable) {
214 214
                 $value = $value->toArray();
215 215
             }
216 216
 
217
-            return collect((array) $value)->map(function ($name) use ($style) {
217
+            return collect((array) $value)->map(function($name) use ($style) {
218 218
                 return "<span class='label label-{$style}'>$name</span>";
219 219
             })->implode('&nbsp;');
220 220
         });
@@ -229,12 +229,12 @@  discard block
 block discarded – undo
229 229
      */
230 230
     public function badge($style = 'blue')
231 231
     {
232
-        return $this->as(function ($value) use ($style) {
232
+        return $this->as(function($value) use ($style) {
233 233
             if ($value instanceof Arrayable) {
234 234
                 $value = $value->toArray();
235 235
             }
236 236
 
237
-            return collect((array) $value)->map(function ($name) use ($style) {
237
+            return collect((array) $value)->map(function($name) use ($style) {
238 238
                 return "<span class='badge bg-{$style}'>$name</span>";
239 239
             })->implode('&nbsp;');
240 240
         });
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     {
250 250
         $field = $this;
251 251
 
252
-        return $this->as(function ($value) use ($field) {
252
+        return $this->as(function($value) use ($field) {
253 253
 
254 254
             $content = json_decode($value, true);
255 255
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     public function render()
339 339
     {
340 340
         if ($this->showAs->isNotEmpty()) {
341
-            $this->showAs->each(function ($callable) {
341
+            $this->showAs->each(function($callable) {
342 342
                 $this->value = $callable->call(
343 343
                     $this->parent->getModel(),
344 344
                     $this->value
Please login to merge, or discard this patch.
src/Form.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -306,9 +306,9 @@  discard block
 block discarded – undo
306 306
         $data = $this->model->with($this->getRelations())
307 307
             ->findOrFail($id)->toArray();
308 308
 
309
-        $this->builder->fields()->filter(function ($field) {
309
+        $this->builder->fields()->filter(function($field) {
310 310
             return $field instanceof Field\File;
311
-        })->each(function (File $file) use ($data) {
311
+        })->each(function(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) {
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
             return $response;
521 521
         }
522 522
 
523
-        DB::transaction(function () {
523
+        DB::transaction(function() {
524 524
             $updates = $this->prepareUpdate($this->updates);
525 525
 
526 526
             foreach ($updates as $column => $value) {
@@ -582,10 +582,10 @@  discard block
 block discarded – undo
582 582
     {
583 583
         if (request('after-save') == 1) {
584 584
             // continue editing
585
-            $url = rtrim($resourcesPath, '/') . "/{$key}/edit";
585
+            $url = rtrim($resourcesPath, '/')."/{$key}/edit";
586 586
         } elseif (request('after-save') == 2) {
587 587
             // view resource
588
-            $url = rtrim($resourcesPath, '/') . "/{$key}";
588
+            $url = rtrim($resourcesPath, '/')."/{$key}";
589 589
         } else {
590 590
             $url = request(Builder::PREVIOUS_URL_KEY) ?: $resourcesPath;
591 591
         }
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
     protected function getFieldByColumn($column)
950 950
     {
951 951
         return $this->builder->fields()->first(
952
-            function (Field $field) use ($column) {
952
+            function(Field $field) use ($column) {
953 953
                 if (is_array($field->column())) {
954 954
                     return in_array($column, $field->column());
955 955
                 }
@@ -970,7 +970,7 @@  discard block
 block discarded – undo
970 970
 
971 971
         $values = $this->model->toArray();
972 972
 
973
-        $this->builder->fields()->each(function (Field $field) use ($values) {
973
+        $this->builder->fields()->each(function(Field $field) use ($values) {
974 974
             $field->setOriginal($values);
975 975
         });
976 976
     }
@@ -992,7 +992,7 @@  discard block
 block discarded – undo
992 992
 
993 993
         $data = $this->model->toArray();
994 994
 
995
-        $this->builder->fields()->each(function (Field $field) use ($data) {
995
+        $this->builder->fields()->each(function(Field $field) use ($data) {
996 996
             if (!in_array($field->column(), $this->ignored)) {
997 997
                 $field->fill($data);
998 998
             }
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
      */
1114 1114
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
1115 1115
     {
1116
-        $this->builder()->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1116
+        $this->builder()->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1117 1117
             /* @var Field $field  */
1118 1118
             $field->setWidth($fieldWidth, $labelWidth);
1119 1119
         });
Please login to merge, or discard this patch.