Completed
Pull Request — master (#39)
by
unknown
01:59
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
             }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function getHighestOrderNumber(): int
35 35
     {
36
-        return (int)$this->buildSortQuery()->max($this->determineOrderColumnName());
36
+        return (int) $this->buildSortQuery()->max($this->determineOrderColumnName());
37 37
     }
38 38
 
39 39
     /**
@@ -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
 
Please login to merge, or discard this patch.