@@ -41,20 +41,20 @@ |
||
| 41 | 41 | |
| 42 | 42 | protected function setUpDatabase() |
| 43 | 43 | { |
| 44 | - $this->app['db']->connection()->getSchemaBuilder()->create('dummies', function (Blueprint $table) { |
|
| 44 | + $this->app['db']->connection()->getSchemaBuilder()->create('dummies', function(Blueprint $table) { |
|
| 45 | 45 | $table->increments('id'); |
| 46 | 46 | $table->string('name'); |
| 47 | 47 | $table->integer('order_column'); |
| 48 | 48 | }); |
| 49 | 49 | |
| 50 | - collect(range(1, 20))->each(function (int $i) { |
|
| 50 | + collect(range(1, 20))->each(function(int $i) { |
|
| 51 | 51 | Dummy::create(['name' => $i]); |
| 52 | 52 | }); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | protected function setUpSoftDeletes() |
| 56 | 56 | { |
| 57 | - $this->app['db']->connection()->getSchemaBuilder()->table('dummies', function (Blueprint $table) { |
|
| 57 | + $this->app['db']->connection()->getSchemaBuilder()->table('dummies', function(Blueprint $table) { |
|
| 58 | 58 | $table->softDeletes(); |
| 59 | 59 | }); |
| 60 | 60 | } |
@@ -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 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public static function setNewOrder($ids, int $startOrder = 1) |
| 69 | 69 | { |
| 70 | - if (! is_array($ids) && ! $ids instanceof ArrayAccess) { |
|
| 70 | + if (!is_array($ids) && !$ids instanceof ArrayAccess) { |
|
| 71 | 71 | throw new InvalidArgumentException('You must pass an array or ArrayAccess object to setNewOrder'); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | { |
| 91 | 91 | if ( |
| 92 | 92 | isset($this->sortable['order_column_name']) && |
| 93 | - ! empty($this->sortable['order_column_name']) |
|
| 93 | + !empty($this->sortable['order_column_name']) |
|
| 94 | 94 | ) { |
| 95 | 95 | return $this->sortable['order_column_name']; |
| 96 | 96 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | $swapWithModel = $swapWithModel->first(); |
| 144 | 144 | |
| 145 | - if (! $swapWithModel) { |
|
| 145 | + if (!$swapWithModel) { |
|
| 146 | 146 | return $this; |
| 147 | 147 | } |
| 148 | 148 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | $swapWithModel = $swapWithModel->first(); |
| 169 | 169 | |
| 170 | - if (! $swapWithModel) { |
|
| 170 | + if (!$swapWithModel) { |
|
| 171 | 171 | return $this; |
| 172 | 172 | } |
| 173 | 173 | |