Passed
Push — 2.x ( 3c2c3a...2e5784 )
by Quentin
05:27
created
src/Http/Controllers/Admin/ModuleController.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
             "$this->viewPrefix.index",
330 330
             "twill::$this->moduleName.index",
331 331
             "twill::layouts.listing",
332
-        ])->first(function ($view) {
332
+        ])->first(function($view) {
333 333
             return View::exists($view);
334 334
         });
335 335
 
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
             "$this->viewPrefix.form",
421 421
             "twill::$this->moduleName.form",
422 422
             "twill::layouts.form",
423
-        ])->first(function ($view) {
423
+        ])->first(function($view) {
424 424
             return View::exists($view);
425 425
         });
426 426
 
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
             "$this->viewPrefix.form",
537 537
             "twill::$this->moduleName.form",
538 538
             "twill::layouts.form",
539
-        ])->first(function ($view) {
539
+        ])->first(function($view) {
540 540
             return View::exists($view);
541 541
         });
542 542
 
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
         $query = $this->request->input('q');
784 784
         $tags = $this->repository->getTags($query);
785 785
 
786
-        return Response::json(['items' => $tags->map(function ($tag) {
786
+        return Response::json(['items' => $tags->map(function($tag) {
787 787
             return $tag->name;
788 788
         })], 200);
789 789
     }
@@ -870,8 +870,8 @@  discard block
 block discarded – undo
870 870
     protected function getIndexTableData($items)
871 871
     {
872 872
         $translated = $this->moduleHas('translations');
873
-        return $items->map(function ($item) use ($translated) {
874
-            $columnsData = Collection::make($this->indexColumns)->mapWithKeys(function ($column) use ($item) {
873
+        return $items->map(function($item) use ($translated) {
874
+            $columnsData = Collection::make($this->indexColumns)->mapWithKeys(function($column) use ($item) {
875 875
                 return $this->getItemColumnData($item, $column);
876 876
             })->toArray();
877 877
 
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
             'feature',
1131 1131
             'bulkFeature',
1132 1132
             'bulkDelete',
1133
-        ])->mapWithKeys(function ($endpoint) {
1133
+        ])->mapWithKeys(function($endpoint) {
1134 1134
             return [
1135 1135
                 $endpoint . 'Url' => $this->getIndexOption($endpoint) ? moduleRoute(
1136 1136
                     $this->moduleName, $this->routePrefix, $endpoint,
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
      */
1147 1147
     protected function getIndexOption($option)
1148 1148
     {
1149
-        return once(function () use ($option) {
1149
+        return once(function() use ($option) {
1150 1150
             $customOptionNamesMapping = [
1151 1151
                 'store' => 'create',
1152 1152
             ];
@@ -1202,8 +1202,8 @@  discard block
 block discarded – undo
1202 1202
     {
1203 1203
         $withImage = $this->moduleHas('medias');
1204 1204
 
1205
-        return $items->map(function ($item) use ($withImage) {
1206
-            $columnsData = Collection::make($this->browserColumns)->mapWithKeys(function ($column) use ($item) {
1205
+        return $items->map(function($item) use ($withImage) {
1206
+            $columnsData = Collection::make($this->browserColumns)->mapWithKeys(function($column) use ($item) {
1207 1207
                 return $this->getItemColumnData($item, $column);
1208 1208
             })->toArray();
1209 1209
 
@@ -1269,7 +1269,7 @@  discard block
 block discarded – undo
1269 1269
                     $fieldSplitted = explode('|', $field);
1270 1270
                     if (count($fieldSplitted) > 1) {
1271 1271
                         $requestValue = $requestFilters[$key];
1272
-                        Collection::make($fieldSplitted)->each(function ($scopeKey) use (&$scope, $requestValue) {
1272
+                        Collection::make($fieldSplitted)->each(function($scopeKey) use (&$scope, $requestValue) {
1273 1273
                             $scope[$scopeKey] = $requestValue;
1274 1274
                         });
1275 1275
                     } else {
@@ -1435,11 +1435,11 @@  discard block
 block discarded – undo
1435 1435
      */
1436 1436
     protected function validateFormRequest()
1437 1437
     {
1438
-        $unauthorizedFields = Collection::make($this->fieldsPermissions)->filter(function ($permission, $field) {
1438
+        $unauthorizedFields = Collection::make($this->fieldsPermissions)->filter(function($permission, $field) {
1439 1439
             return Auth::guard('twill_users')->user()->cannot($permission);
1440 1440
         })->keys();
1441 1441
 
1442
-        $unauthorizedFields->each(function ($field) {
1442
+        $unauthorizedFields->each(function($field) {
1443 1443
             $this->request->offsetUnset($field);
1444 1444
         });
1445 1445
 
@@ -1515,7 +1515,7 @@  discard block
 block discarded – undo
1515 1515
         $appUrl = Config::get('app.url');
1516 1516
 
1517 1517
         if (blank(parse_url($appUrl)['scheme'] ?? null)) {
1518
-            $appUrl =  $this->request->getScheme() . '://' . $appUrl;
1518
+            $appUrl = $this->request->getScheme() . '://' . $appUrl;
1519 1519
         }
1520 1520
 
1521 1521
         return $appUrl . '/'
Please login to merge, or discard this patch.