| @@ -31,21 +31,21 @@ discard block | ||
| 31 | 31 | */ | 
| 32 | 32 | protected function getEnvironmentSetUp($app) | 
| 33 | 33 |      { | 
| 34 | -        $app['config']->set('database.default', 'sqlite'); | |
| 35 | -        $app['config']->set('database.connections.sqlite', [ | |
| 34 | +        $app[ 'config' ]->set('database.default', 'sqlite'); | |
| 35 | +        $app[ 'config' ]->set('database.connections.sqlite', [ | |
| 36 | 36 | 'driver' => 'sqlite', | 
| 37 | 37 | 'database' => ':memory:', | 
| 38 | 38 | 'prefix' => '', | 
| 39 | 39 | ]); | 
| 40 | 40 | |
| 41 | -        $app['config']->set('app.key', '6rE9Nz59bGRbeMATftriyQjrpF7DcOQm'); | |
| 41 | +        $app[ 'config' ]->set('app.key', '6rE9Nz59bGRbeMATftriyQjrpF7DcOQm'); | |
| 42 | 42 | } | 
| 43 | 43 | /** | 
| 44 | 44 | * @param \Illuminate\Foundation\Application $app | 
| 45 | 45 | */ | 
| 46 | 46 | protected function setUpDatabase($app) | 
| 47 | 47 |      { | 
| 48 | -        $app['db']->connection()->getSchemaBuilder()->create('forum', function (Blueprint $table) { | |
| 48 | +        $app[ 'db' ]->connection()->getSchemaBuilder()->create('forum', function(Blueprint $table) { | |
| 49 | 49 |              $table->increments('id'); | 
| 50 | 50 |              $table->string('name'); | 
| 51 | 51 |              $table->integer('order'); | 
| @@ -53,10 +53,10 @@ discard block | ||
| 53 | 53 | $table->timestamps(); | 
| 54 | 54 | }); | 
| 55 | 55 | |
| 56 | - TestModel::create(['name' => 'food', 'order' => 1]); | |
| 57 | - TestModel::create(['name' => 'work', 'order' => 2]); | |
| 58 | - TestModel::create(['name' => 'children', 'order' => 3]); | |
| 59 | - TestModel::create(['name' => 'ict', 'order' => 4]); | |
| 60 | - TestModel::create(['name' => 'people', 'order' => 5]); | |
| 56 | + TestModel::create([ 'name' => 'food', 'order' => 1 ]); | |
| 57 | + TestModel::create([ 'name' => 'work', 'order' => 2 ]); | |
| 58 | + TestModel::create([ 'name' => 'children', 'order' => 3 ]); | |
| 59 | + TestModel::create([ 'name' => 'ict', 'order' => 4 ]); | |
| 60 | + TestModel::create([ 'name' => 'people', 'order' => 5 ]); | |
| 61 | 61 | } | 
| 62 | 62 | } | 
| 63 | 63 | \ No newline at end of file | 
| @@ -23,7 +23,7 @@ | ||
| 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 | |
| @@ -24,7 +24,7 @@ | ||
| 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 | |
| @@ -7,5 +7,5 @@ | ||
| 7 | 7 |  { | 
| 8 | 8 | protected $table = 'forum'; | 
| 9 | 9 | |
| 10 | - protected $guarded = []; | |
| 10 | + protected $guarded = [ ]; | |
| 11 | 11 | } | 
| 12 | 12 | \ No newline at end of file | 
| @@ -110,7 +110,7 @@ discard block | ||
| 110 | 110 | */ | 
| 111 | 111 | public function switchModels(Model $model1, Model $model2) | 
| 112 | 112 |      { | 
| 113 | -        if($this->isValidModel($model1) && $this->isValidModel($model2)) { | |
| 113 | +        if ($this->isValidModel($model1) && $this->isValidModel($model2)) { | |
| 114 | 114 | return $this->orderInfo->switchModels($model1, $model2); | 
| 115 | 115 | } | 
| 116 | 116 | } | 
| @@ -126,7 +126,7 @@ discard block | ||
| 126 | 126 | */ | 
| 127 | 127 | public function switchIndexes(Model $model, $index1, $index2) | 
| 128 | 128 |      { | 
| 129 | -        if($this->isValidIndex($index1) && $this->isValidIndex($index2)) { | |
| 129 | +        if ($this->isValidIndex($index1) && $this->isValidIndex($index2)) { | |
| 130 | 130 | return $this->orderInfo->switchIndexes($model, $index1, $index2); | 
| 131 | 131 | } | 
| 132 | 132 | } | 
| @@ -37,8 +37,8 @@ | ||
| 37 | 37 | */ | 
| 38 | 38 | public function isValidIndex($index) | 
| 39 | 39 |      { | 
| 40 | -        if(is_numeric($index)) { | |
| 41 | -            if($index > 0) { | |
| 40 | +        if (is_numeric($index)) { | |
| 41 | +            if ($index > 0) { | |
| 42 | 42 | return true; | 
| 43 | 43 | } | 
| 44 | 44 | |
| @@ -100,7 +100,7 @@ | ||
| 100 | 100 | */ | 
| 101 | 101 | public function toMiddle(Model $model) | 
| 102 | 102 |      { | 
| 103 | - $middle = number_format($this->count($model) / 2); | |
| 103 | + $middle = number_format($this->count($model) / 2); | |
| 104 | 104 |          $between = [$model->{$this->column}, $middle]; | 
| 105 | 105 | |
| 106 | 106 |          if ($model->{$this->column} != $middle) { | 
| @@ -101,7 +101,7 @@ | ||
| 101 | 101 | public function toMiddle(Model $model) | 
| 102 | 102 |      { | 
| 103 | 103 | $middle = number_format($this->count($model) / 2); | 
| 104 | -        $between = [$model->{$this->column}, $middle]; | |
| 104 | +        $between = [ $model->{$this->column}, $middle ]; | |
| 105 | 105 | |
| 106 | 106 |          if ($model->{$this->column} != $middle) { | 
| 107 | 107 |              if ($model->{$this->column} > $middle) { |