Completed
Pull Request — master (#48)
by
unknown
02:22 queued 51s
created
src/SortableTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public static function bootSortableTrait()
13 13
     {
14
-        static::creating(function ($model) {
14
+        static::creating(function($model) {
15 15
             if ($model instanceof Sortable && $model->shouldSortWhenCreating()) {
16 16
                 $model->setHighestOrderNumber();
17 17
             }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public static function setNewOrder($ids, int $startOrder = 1)
62 62
     {
63
-        if (! is_array($ids) && ! $ids instanceof ArrayAccess) {
63
+        if (!is_array($ids) && !$ids instanceof ArrayAccess) {
64 64
             throw new InvalidArgumentException('You must pass an array or ArrayAccess object to setNewOrder');
65 65
         }
66 66
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         if (
85 85
             isset($this->sortable['order_column_name']) &&
86
-            ! empty($this->sortable['order_column_name'])
86
+            !empty($this->sortable['order_column_name'])
87 87
         ) {
88 88
             return $this->sortable['order_column_name'];
89 89
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             ->where($orderColumnName, '>', $this->$orderColumnName)
114 114
             ->first();
115 115
 
116
-        if (! $swapWithModel) {
116
+        if (!$swapWithModel) {
117 117
             return $this;
118 118
         }
119 119
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             ->where($orderColumnName, '<', $this->$orderColumnName)
135 135
             ->first();
136 136
 
137
-        if (! $swapWithModel) {
137
+        if (!$swapWithModel) {
138 138
             return $this;
139 139
         }
140 140
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
         if (
240 240
             isset($this->sortable['order_unique']) &&
241
-            ! empty($this->sortable['order_unique'])
241
+            !empty($this->sortable['order_unique'])
242 242
         ) {
243 243
             if (is_array($this->sortable['order_unique'])) {
244 244
                 foreach ($this->sortable['order_unique'] as $key) {
Please login to merge, or discard this patch.