@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function bootEvents() |
| 35 | 35 | { |
| 36 | - $this->app['events']->listen('eloquent.creating*', function ($model) { |
|
| 36 | + $this->app['events']->listen('eloquent.creating*', function($model) { |
|
| 37 | 37 | |
| 38 | 38 | if ($model instanceof Sortable && $model->shouldSortWhenCreating()) { |
| 39 | 39 | $model->setHighestOrderNumber(); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | { |
| 44 | 44 | file_put_contents(__DIR__.'/database.sqlite', null); |
| 45 | 45 | |
| 46 | - $this->app['db']->connection()->getSchemaBuilder()->create('dummies', function (Blueprint $table) { |
|
| 46 | + $this->app['db']->connection()->getSchemaBuilder()->create('dummies', function(Blueprint $table) { |
|
| 47 | 47 | $table->increments('id'); |
| 48 | 48 | $table->string('name'); |
| 49 | 49 | $table->integer('order_column'); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public static function setNewOrder($ids, $startOrder = 1) |
| 51 | 51 | { |
| 52 | - if (! is_array($ids)) { |
|
| 52 | + if (!is_array($ids)) { |
|
| 53 | 53 | throw new SortableException('You must pass an array to setNewOrder'); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | { |
| 71 | 71 | if ( |
| 72 | 72 | isset($this->sortable['order_column_name']) && |
| 73 | - ! empty($this->sortable['order_column_name']) |
|
| 73 | + !empty($this->sortable['order_column_name']) |
|
| 74 | 74 | ) { |
| 75 | 75 | return $this->sortable['order_column_name']; |
| 76 | 76 | } |
@@ -85,11 +85,11 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function shouldSortWhenCreating() |
| 87 | 87 | { |
| 88 | - if (! isset($this->sortable)) { |
|
| 88 | + if (!isset($this->sortable)) { |
|
| 89 | 89 | return true; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if (! isset($this->sortable['sort_when_creating'])) { |
|
| 92 | + if (!isset($this->sortable['sort_when_creating'])) { |
|
| 93 | 93 | return true; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -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 | |