Skip to content

Commit

Permalink
cs.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Sep 21, 2024
1 parent b3f3512 commit 8feeab5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion migrations/2019_05_31_042934_create_versions_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
/**
* Run the migrations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
/**
* Run the migrations.
Expand Down
2 changes: 1 addition & 1 deletion migrations/2021_03_18_160750_make_user_nullable.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class() extends Migration
return new class extends Migration
{
/**
* Run the migrations.
Expand Down
4 changes: 2 additions & 2 deletions src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static function createForModel(Model $model, array $replacements = [], $t
$versionConnection = $model->getConnectionName();
$userForeignKeyName = $model->getUserForeignKeyName();

$version = new $versionClass();
$version = new $versionClass;
$version->setConnection($versionConnection);

$version->versionable_id = $model->getKey();
Expand Down Expand Up @@ -184,7 +184,7 @@ public function nextVersion(): ?static
public function diff(?Version $toVersion = null, array $differOptions = [], array $renderOptions = []): Diff
{
if (! $toVersion) {
$toVersion = $this->previousVersion() ?? new static();
$toVersion = $this->previousVersion() ?? new static;
}

return new Diff($this, $toVersion, $differOptions, $renderOptions);
Expand Down
2 changes: 0 additions & 2 deletions src/Versionable.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ function (Model $model) {

/**
* @param string|\DateTimeInterface|null $time
* @return ?Version
*
* @throws \Carbon\Exceptions\InvalidFormatException
*/
Expand Down Expand Up @@ -136,7 +135,6 @@ public function firstVersion(): MorphOne
*
* @param string|\DateTimeInterface|null $time
* @param \DateTimeZone|string|null $tz
* @return ?\Overtrue\LaravelVersionable\Version
*
* @throws \Carbon\Exceptions\InvalidFormatException
*/
Expand Down

0 comments on commit 8feeab5

Please sign in to comment.