Simplify variable assignment using null coalescing operator (#4000)

This commit is contained in:
Ngô Quốc Đạt 2024-06-22 16:53:00 +07:00 committed by GitHub
parent f3c8921b09
commit 19196c219c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ class ComposerAdapter
{
$this->application->resetComposer();
$this->output = $this->output ?? new BufferedOutput();
$this->output ??= new BufferedOutput();
// This hack is necessary so that relative path repositories are resolved properly.
$currDir = getcwd();

View File

@ -123,7 +123,7 @@ class EnableBundledExtensions implements Step
private function getMigrator(): Migrator
{
return $this->migrator = $this->migrator ?? new Migrator(
return $this->migrator ??= new Migrator(
new DatabaseMigrationRepository($this->database, 'migrations'),
$this->database,
new \Illuminate\Filesystem\Filesystem