@@ -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 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public static function setNewOrder($ids, int $startOrder = 1, string $primaryKeyColumn = null) |
| 63 | 63 | { |
| 64 | - if (! is_array($ids) && ! $ids instanceof ArrayAccess) { |
|
| 64 | + if (!is_array($ids) && !$ids instanceof ArrayAccess) { |
|
| 65 | 65 | throw new InvalidArgumentException('You must pass an array or ArrayAccess object to setNewOrder'); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * @param array|\ArrayAccess $ids |
| 91 | 91 | * @param int $startOrder |
| 92 | 92 | */ |
| 93 | - public static function setNewOrderByCustomColumn(string $primaryKeyColumn, $ids, int $startOrder = 1){ |
|
| 93 | + public static function setNewOrderByCustomColumn(string $primaryKeyColumn, $ids, int $startOrder = 1) { |
|
| 94 | 94 | self::setNewOrder($ids, $startOrder, $primaryKeyColumn); |
| 95 | 95 | } |
| 96 | 96 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | { |
| 102 | 102 | if ( |
| 103 | 103 | isset($this->sortable['order_column_name']) && |
| 104 | - ! empty($this->sortable['order_column_name']) |
|
| 104 | + !empty($this->sortable['order_column_name']) |
|
| 105 | 105 | ) { |
| 106 | 106 | return $this->sortable['order_column_name']; |
| 107 | 107 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | ->where($orderColumnName, '>', $this->$orderColumnName) |
| 132 | 132 | ->first(); |
| 133 | 133 | |
| 134 | - if (! $swapWithModel) { |
|
| 134 | + if (!$swapWithModel) { |
|
| 135 | 135 | return $this; |
| 136 | 136 | } |
| 137 | 137 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | ->where($orderColumnName, '<', $this->$orderColumnName) |
| 153 | 153 | ->first(); |
| 154 | 154 | |
| 155 | - if (! $swapWithModel) { |
|
| 155 | + if (!$swapWithModel) { |
|
| 156 | 156 | return $this; |
| 157 | 157 | } |
| 158 | 158 | |