Test Setup Failed
Push — master ( 5ac555...44e9b2 )
by Ben
06:32
created
src/Management/AbstractManager.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function saveCreateFields(Request $request): void
80 80
     {
81
-        if($this->isManualSortable() && !$request->has('order')) {
82
-            $this->model->order = $this->modelInstance()::orderBy('order', 'desc')->first()->order + 1;
81
+        if ($this->isManualSortable() && !$request->has('order')) {
82
+            $this->model->order = $this->modelInstance()::orderBy('order', 'desc')->first()->order+1;
83 83
         }
84 84
 
85 85
         $this->saveFields($request, $this->createFields());
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             return $this->indexPagination($builder);
107 107
         }
108 108
 
109
-        return $builder->get()->map(function ($model) {
109
+        return $builder->get()->map(function($model) {
110 110
             return (new static($this->registration))->manage($model);
111 111
         });
112 112
     }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
     protected function indexSorting(Builder $builder): Builder
127 127
     {
128
-        if($this->isManualSortable()) {
128
+        if ($this->isManualSortable()) {
129 129
             $builder->sortedManually();
130 130
         }
131 131
 
@@ -145,12 +145,12 @@  discard block
 block discarded – undo
145 145
     {
146 146
         $paginator = $builder->paginate($this->pageCount);
147 147
 
148
-        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function ($model) {
148
+        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function($model) {
149 149
             return (new static($this->registration))->manage($model);
150 150
         });
151 151
 
152
-        foreach(request()->query() as $key => $value) {
153
-            if($key == 'page') continue;
152
+        foreach (request()->query() as $key => $value) {
153
+            if ($key == 'page') continue;
154 154
             $paginator->appends($key, $value);
155 155
         }
156 156
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     {
275 275
         $fields = $this->fieldsWithAssistantFields();
276 276
 
277
-        if($this->isManualSortable() && !$fields->offsetExists('order')) {
277
+        if ($this->isManualSortable() && !$fields->offsetExists('order')) {
278 278
             $fields = $fields->add(NumberField::make('order'));
279 279
         }
280 280
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
     public function editFields(): Fields
285 285
     {
286
-        return $this->fieldsWithAssistantFields()->map(function (Field $field) {
286
+        return $this->fieldsWithAssistantFields()->map(function(Field $field) {
287 287
             return $field->model($this->model);
288 288
         });
289 289
     }
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
             static::$bootedTraitMethods[$baseMethod] = [];
377 377
 
378 378
             foreach (class_uses_recursive($class) as $trait) {
379
-                $method = class_basename($trait) . ucfirst($baseMethod);
379
+                $method = class_basename($trait).ucfirst($baseMethod);
380 380
 
381 381
                 if (method_exists($class, $method) && !in_array($method, static::$bootedTraitMethods[$baseMethod])) {
382 382
                     static::$bootedTraitMethods[$baseMethod][] = lcfirst($method);
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,9 @@
 block discarded – undo
150 150
         });
151 151
 
152 152
         foreach(request()->query() as $key => $value) {
153
-            if($key == 'page') continue;
153
+            if($key == 'page') {
154
+                continue;
155
+            }
154 156
             $paginator->appends($key, $value);
155 157
         }
156 158
 
Please login to merge, or discard this patch.