@@ -11,7 +11,7 @@ discard block |
||
| 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 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function setOrderAfter($id) |
| 39 | 39 | { |
| 40 | - if (! $afterModel = $this->buildSortQuery()->find($id)) { |
|
| 40 | + if (!$afterModel = $this->buildSortQuery()->find($id)) { |
|
| 41 | 41 | throw new InvalidArgumentException('You must pass an existing model id'); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | public static function setNewOrder($ids, int $startOrder = 1, string $primaryKeyColumn = null) |
| 76 | 76 | { |
| 77 | - if (! is_array($ids) && ! $ids instanceof ArrayAccess) { |
|
| 77 | + if (!is_array($ids) && !$ids instanceof ArrayAccess) { |
|
| 78 | 78 | throw new InvalidArgumentException('You must pass an array or ArrayAccess object to setNewOrder'); |
| 79 | 79 | } |
| 80 | 80 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | { |
| 103 | 103 | if ( |
| 104 | 104 | isset($this->sortable['order_column_name']) && |
| 105 | - ! empty($this->sortable['order_column_name']) |
|
| 105 | + !empty($this->sortable['order_column_name']) |
|
| 106 | 106 | ) { |
| 107 | 107 | return $this->sortable['order_column_name']; |
| 108 | 108 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | ->where($orderColumnName, '>', $this->$orderColumnName) |
| 128 | 128 | ->first(); |
| 129 | 129 | |
| 130 | - if (! $swapWithModel) { |
|
| 130 | + if (!$swapWithModel) { |
|
| 131 | 131 | return $this; |
| 132 | 132 | } |
| 133 | 133 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | ->where($orderColumnName, '<', $this->$orderColumnName) |
| 144 | 144 | ->first(); |
| 145 | 145 | |
| 146 | - if (! $swapWithModel) { |
|
| 146 | + if (!$swapWithModel) { |
|
| 147 | 147 | return $this; |
| 148 | 148 | } |
| 149 | 149 | |