Completed
Pull Request — master (#12)
by Pascal
02:27
created
src/SortableServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
tests/TestCase.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,16 +34,16 @@
 block discarded – undo
34 34
         $app['config']->set('database.default', 'sqlite');
35 35
         $app['config']->set('database.connections.sqlite', [
36 36
             'driver' => 'sqlite',
37
-            'database' => __DIR__.'/database.sqlite',
37
+            'database' => __DIR__ . '/database.sqlite',
38 38
             'prefix' => '',
39 39
         ]);
40 40
     }
41 41
 
42 42
     protected function setUpDatabase()
43 43
     {
44
-        file_put_contents(__DIR__.'/database.sqlite', null);
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');
Please login to merge, or discard this patch.
src/SortableTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
      */
151 151
     protected function swapOrderWithModel(self $model)
152 152
     {
153
-        $orderColumnName  = $this->determineOrderColumnName();
153
+        $orderColumnName = $this->determineOrderColumnName();
154 154
         $oldOrderOfOtherModel = $model->$orderColumnName;
155 155
 
156 156
         $model->$orderColumnName = $this->$orderColumnName;
Please login to merge, or discard this patch.