Completed
Pull Request — master (#60)
by
unknown
03:29 queued 01:27
created
src/SortableTrait.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 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(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
 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.