Completed
Push — master ( 9c7b17...2ce128 )
by Freek
04:25
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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
src/SortableTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public static function setNewOrder($ids, $startOrder = 1)
53 53
     {
54
-        if (! is_array($ids) && ! $ids instanceof ArrayAccess) {
54
+        if (!is_array($ids) && !$ids instanceof ArrayAccess) {
55 55
             throw new SortableException('You must pass an array or ArrayAccess object to setNewOrder');
56 56
         }
57 57
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         if (
76 76
             isset($this->sortable['order_column_name']) &&
77
-            ! empty($this->sortable['order_column_name'])
77
+            !empty($this->sortable['order_column_name'])
78 78
         ) {
79 79
             return $this->sortable['order_column_name'];
80 80
         }
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function shouldSortWhenCreating()
91 91
     {
92
-        if (! isset($this->sortable)) {
92
+        if (!isset($this->sortable)) {
93 93
             return true;
94 94
         }
95 95
 
96
-        if (! isset($this->sortable['sort_when_creating'])) {
96
+        if (!isset($this->sortable['sort_when_creating'])) {
97 97
             return true;
98 98
         }
99 99
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             ->where($orderColumnName, '>', $this->$orderColumnName)
115 115
             ->first();
116 116
 
117
-        if (! $swapWithModel) {
117
+        if (!$swapWithModel) {
118 118
             return $this;
119 119
         }
120 120
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             ->where($orderColumnName, '<', $this->$orderColumnName)
136 136
             ->first();
137 137
 
138
-        if (! $swapWithModel) {
138
+        if (!$swapWithModel) {
139 139
             return $this;
140 140
         }
141 141
 
Please login to merge, or discard this patch.