Skip to content

Commit

Permalink
Merge branch 'main' of github.com:spatie/laravel-deleted-models
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jan 14, 2023
2 parents 8a6a0b7 + 04b0b6c commit abd93db
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Models/Concerns/KeepsDeletedModels.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static function restore(mixed $key): Model

public static function restoreQuietly(mixed $key): Model
{
return static::withoutEvents(fn() => static::restore($key));
return static::withoutEvents(fn () => static::restore($key));
}

public static function makeRestored(mixed $key): ?Model
Expand Down
2 changes: 1 addition & 1 deletion src/Models/DeletedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function restore(): Model

public function restoreQuietly(): Model
{
return self::withoutEvents(fn() => $this->restore());
return self::withoutEvents(fn () => $this->restore());
}

/** @return class-string<Model> */
Expand Down
3 changes: 1 addition & 2 deletions tests/KeepsDeletedModelsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Spatie\DeletedModels\Models\DeletedModel;
use Spatie\DeletedModels\Tests\TestSupport\Models\TestModel;
use function Spatie\PestPluginTestTime\testTime;
use Illuminate\Support\Facades\Event;

beforeEach(function () {
testTime()->freeze('2023-01-01 00:00:00');
Expand Down Expand Up @@ -166,7 +165,7 @@ public function attributesToKeep(): array
expect($testModel->exists)->toBe(false);
});

it('will return null when making a non-existing model', function() {
it('will return null when making a non-existing model', function () {
$this->model->delete();

$testModel = TestModel::makeRestored('non-existing-key');
Expand Down

0 comments on commit abd93db

Please sign in to comment.