diff --git a/src/SortableTrait.php b/src/SortableTrait.php index f5cd4c3..92ac3dd 100644 --- a/src/SortableTrait.php +++ b/src/SortableTrait.php @@ -56,7 +56,7 @@ public static function setNewOrder($ids, int $startOrder = 1, string $primaryKey foreach ($ids as $id) { static::withoutGlobalScope(SoftDeletingScope::class) - ->when(is_callable($modifyQuery), function($query) use ($modifyQuery) { + ->when(is_callable($modifyQuery), function ($query) use ($modifyQuery) { return $modifyQuery($query); }) ->where($primaryKeyColumn, $id) diff --git a/tests/DummyWithGlobalScope.php b/tests/DummyWithGlobalScope.php index 8a2561f..7278fe5 100644 --- a/tests/DummyWithGlobalScope.php +++ b/tests/DummyWithGlobalScope.php @@ -24,7 +24,7 @@ protected static function boot() { parent::boot(); - parent::addGlobalScope('ActiveScope', function(Builder $builder) { + parent::addGlobalScope('ActiveScope', function (Builder $builder) { $builder->where('is_active', true); }); } diff --git a/tests/SortableTest.php b/tests/SortableTest.php index 6ad83e1..d5f7068 100644 --- a/tests/SortableTest.php +++ b/tests/SortableTest.php @@ -85,7 +85,7 @@ public function it_can_set_new_order_without_global_scopes_models() $newOrder = Collection::make(Dummy::all()->pluck('id'))->shuffle()->toArray(); - DummyWithGlobalScope::setNewOrder($newOrder, 1, null, function($query) { + DummyWithGlobalScope::setNewOrder($newOrder, 1, null, function ($query) { $query->withoutGlobalScope('ActiveScope'); });