@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | { |
11 | 11 | public static function bootSortableTrait() |
12 | 12 | { |
13 | - static::creating(function ($model) { |
|
13 | + static::creating(function($model) { |
|
14 | 14 | if ($model instanceof Sortable && $model->shouldSortWhenCreating()) { |
15 | 15 | $model->setHighestOrderNumber(); |
16 | 16 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public static function setNewOrder($ids, int $startOrder = 1) |
61 | 61 | { |
62 | - if (! is_array($ids) && ! $ids instanceof ArrayAccess) { |
|
62 | + if (!is_array($ids) && !$ids instanceof ArrayAccess) { |
|
63 | 63 | throw new InvalidArgumentException('You must pass an array or ArrayAccess object to setNewOrder'); |
64 | 64 | } |
65 | 65 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | { |
81 | 81 | if ( |
82 | 82 | isset($this->sortable['order_column_name']) && |
83 | - ! empty($this->sortable['order_column_name']) |
|
83 | + !empty($this->sortable['order_column_name']) |
|
84 | 84 | ) { |
85 | 85 | return $this->sortable['order_column_name']; |
86 | 86 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | ->where($orderColumnName, '>', $this->$orderColumnName) |
111 | 111 | ->first(); |
112 | 112 | |
113 | - if (! $swapWithModel) { |
|
113 | + if (!$swapWithModel) { |
|
114 | 114 | return $this; |
115 | 115 | } |
116 | 116 | |
@@ -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 |
@@ -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 | } |