Completed
Push — master ( bc3f80...57eaea )
by Lars
02:13
created
src/IncrementDecrementServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function register()
30 30
     {
31
-        $this->app->bind('order', function () {
31
+        $this->app->bind('order', function() {
32 32
             return new Order(new OrderRepository());
33 33
         });
34 34
     }
Please login to merge, or discard this patch.
tests/core/DecrementTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     /** @test */
24 24
     public function a_row_does_not_decrement()
25 25
     {
26
-        $this->app['config']->set('increment-decrement.last_row_can_decrement', false);
26
+        $this->app[ 'config' ]->set('increment-decrement.last_row_can_decrement', false);
27 27
 
28 28
         $row = TestModel::where('order', 5)->first();
29 29
 
Please login to merge, or discard this patch.
tests/core/IncrementTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     /** @test */
25 25
     public function a_row_does_not_increments()
26 26
     {
27
-        $this->app['config']->set('increment-decrement.first_row_can_increment', false);
27
+        $this->app[ 'config' ]->set('increment-decrement.first_row_can_increment', false);
28 28
 
29 29
         $row = TestModel::first();
30 30
 
Please login to merge, or discard this patch.
tests/TestCase.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected function getEnvironmentSetUp($app)
35 35
     {
36
-        $app['config']->set('database.default', 'sqlite');
37
-        $app['config']->set('database.connections.sqlite', [
36
+        $app[ 'config' ]->set('database.default', 'sqlite');
37
+        $app[ 'config' ]->set('database.connections.sqlite', [
38 38
             'driver'   => 'sqlite',
39 39
             'database' => ':memory:',
40 40
             'prefix'   => '',
41 41
         ]);
42 42
 
43
-        $app['config']->set('app.key', '6rE9Nz59bGRbeMATftriyQjrpF7DcOQm');
43
+        $app[ 'config' ]->set('app.key', '6rE9Nz59bGRbeMATftriyQjrpF7DcOQm');
44 44
     }
45 45
 
46 46
     /**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     protected function setUpDatabase($app)
50 50
     {
51
-        $app['db']->connection()->getSchemaBuilder()->create('forum', function (Blueprint $table) {
51
+        $app[ 'db' ]->connection()->getSchemaBuilder()->create('forum', function(Blueprint $table) {
52 52
             $table->increments('id');
53 53
             $table->string('name');
54 54
             $table->integer('order');
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
             $table->timestamps();
57 57
         });
58 58
 
59
-        TestModel::create(['name' => 'food',        'order' => 1]);
60
-        TestModel::create(['name' => 'work',        'order' => 2]);
61
-        TestModel::create(['name' => 'children',    'order' => 3]);
62
-        TestModel::create(['name' => 'ict',         'order' => 4]);
63
-        TestModel::create(['name' => 'people',      'order' => 5]);
59
+        TestModel::create([ 'name' => 'food', 'order' => 1 ]);
60
+        TestModel::create([ 'name' => 'work', 'order' => 2 ]);
61
+        TestModel::create([ 'name' => 'children', 'order' => 3 ]);
62
+        TestModel::create([ 'name' => 'ict', 'order' => 4 ]);
63
+        TestModel::create([ 'name' => 'people', 'order' => 5 ]);
64 64
     }
65 65
 }
Please login to merge, or discard this patch.
tests/TestModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,5 +8,5 @@
 block discarded – undo
8 8
 {
9 9
     protected $table = 'forum';
10 10
 
11
-    protected $guarded = [];
11
+    protected $guarded = [ ];
12 12
 }
Please login to merge, or discard this patch.
src/Repository/OrderRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function delete(Model $model)
61 61
     {
62
-        $toDecrement = $model::where($this->column, '>',  $model->{$this->column})->get();
63
-        if(count($toDecrement)) {
62
+        $toDecrement = $model::where($this->column, '>', $model->{$this->column})->get();
63
+        if (count($toDecrement)) {
64 64
             $toDecrement->each->decrement($this->column);
65 65
             true;
66 66
         }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function toMiddle(Model $model)
117 117
     {
118 118
         $middle = number_format($this->count($model) / 2);
119
-        $between = [$model->{$this->column}, $middle];
119
+        $between = [ $model->{$this->column}, $middle ];
120 120
 
121 121
         if ($model->{$this->column} != $middle) {
122 122
             if ($model->{$this->column} > $middle) {
Please login to merge, or discard this patch.