@@ -42,7 +42,7 @@ |
||
42 | 42 | * @param \Illuminate\Database\Eloquent\Builder $query |
43 | 43 | * @param string $direction |
44 | 44 | * |
45 | - * @return \Illuminate\Database\Query\Builder |
|
45 | + * @return Builder |
|
46 | 46 | */ |
47 | 47 | public function scopeOrdered(Builder $query, string $direction = 'asc'): Builder |
48 | 48 | { |
@@ -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 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public static function setNewOrder(array $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 |
||
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 |
||
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 |
||
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 |