Completed
Pull Request — master (#3884)
by
unknown
02:22
created
src/Grid/Filter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
      */
286 286
     public function removeFilterByID($id)
287 287
     {
288
-        $this->filters = array_filter($this->filters, function (AbstractFilter $filter) use ($id) {
288
+        $this->filters = array_filter($this->filters, function(AbstractFilter $filter) use ($id) {
289 289
             return $filter->getId() != $id;
290 290
         });
291 291
     }
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     {
300 300
         $inputs = Arr::dot(request()->all());
301 301
 
302
-        $inputs = array_filter($inputs, function ($input) {
302
+        $inputs = array_filter($inputs, function($input) {
303 303
             return $input !== '' && !is_null($input);
304 304
         });
305 305
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
             }
328 328
         }
329 329
 
330
-        return tap(array_filter($conditions), function ($conditions) {
330
+        return tap(array_filter($conditions), function($conditions) {
331 331
             if (!empty($conditions)) {
332 332
                 $this->expand();
333 333
             }
@@ -345,9 +345,9 @@  discard block
 block discarded – undo
345 345
             return $inputs;
346 346
         }
347 347
 
348
-        $inputs = collect($inputs)->filter(function ($input, $key) {
348
+        $inputs = collect($inputs)->filter(function($input, $key) {
349 349
             return Str::startsWith($key, "{$this->name}_");
350
-        })->mapWithKeys(function ($val, $key) {
350
+        })->mapWithKeys(function($val, $key) {
351 351
             $key = str_replace("{$this->name}_", '', $key);
352 352
 
353 353
             return [$key => $val];
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
      */
418 418
     public function scope($key, $label = '')
419 419
     {
420
-        return tap(new Scope($key, $label), function (Scope $scope) {
420
+        return tap(new Scope($key, $label), function(Scope $scope) {
421 421
             return $this->scopes->push($scope);
422 422
         });
423 423
     }
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
     {
442 442
         $key = request(Scope::QUERY_NAME);
443 443
 
444
-        return $this->scopes->first(function ($scope) use ($key) {
444
+        return $this->scopes->first(function($scope) use ($key) {
445 445
             return $scope->key == $key;
446 446
         });
447 447
     }
@@ -566,9 +566,9 @@  discard block
 block discarded – undo
566 566
 
567 567
         $columns->push($pageKey);
568 568
 
569
-        $groupNames = collect($this->filters)->filter(function ($filter) {
569
+        $groupNames = collect($this->filters)->filter(function($filter) {
570 570
             return $filter instanceof Filter\Group;
571
-        })->map(function (AbstractFilter $filter) {
571
+        })->map(function(AbstractFilter $filter) {
572 572
             return "{$filter->getId()}_group";
573 573
         });
574 574
 
Please login to merge, or discard this patch.
src/Extension.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
         if ($menu = $extension->menu()) {
237 237
             if ($extension->validateMenu($menu)) {
238
-                DB::transaction(function () use ($menu) {
238
+                DB::transaction(function() use ($menu) {
239 239
                     extract($menu);
240 240
                     $children = Arr::get($menu, 'children', []);
241 241
                     static::createMenu($title, $path, $icon, 0, $children);
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             if (null !== $name) {
249 249
                 $permission = [$permission];
250 250
             }
251
-            DB::transaction(function () use ($extension, $permission) {
251
+            DB::transaction(function() use ($extension, $permission) {
252 252
                 foreach ($permission as $item) {
253 253
                     if ($extension->validatePermission($item)) {
254 254
                         extract($item);
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
             return true;
277 277
         }
278 278
 
279
-        $message = "Invalid menu:\r\n" . implode("\r\n", Arr::flatten($validator->errors()->messages()));
279
+        $message = "Invalid menu:\r\n".implode("\r\n", Arr::flatten($validator->errors()->messages()));
280 280
 
281 281
         throw new \Exception($message);
282 282
     }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
             return true;
298 298
         }
299 299
 
300
-        $message = "Invalid permission:\r\n" . implode("\r\n", Arr::flatten($validator->errors()->messages()));
300
+        $message = "Invalid permission:\r\n".implode("\r\n", Arr::flatten($validator->errors()->messages()));
301 301
 
302 302
         throw new \Exception($message);
303 303
     }
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             foreach ($children as $child) {
334 334
                 if ($extension->validateMenu($child)) {
335 335
                     $subTitle    = Arr::get($child, 'title');
336
-                    $subUri      = $uri . '/' . Arr::get($child, 'path');
336
+                    $subUri      = $uri.'/'.Arr::get($child, 'path');
337 337
                     $subIcon     = Arr::get($child, 'icon');
338 338
                     $subChildren = Arr::get($child, 'children', []);
339 339
                     static::createMenu($subTitle, $subUri, $subIcon, $menu->getKey(), $subChildren);
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
         $permissionModel::create([
359 359
             'name'      => $name,
360 360
             'slug'      => $slug,
361
-            'http_path' => '/' . trim($path, '/'),
361
+            'http_path' => '/'.trim($path, '/'),
362 362
         ]);
363 363
     }
364 364
 
Please login to merge, or discard this patch.