diff --git a/src/Illuminate/Concurrency/SyncDriver.php b/src/Illuminate/Concurrency/SyncDriver.php index 37a6b7ff4df..71a3fb03277 100644 --- a/src/Illuminate/Concurrency/SyncDriver.php +++ b/src/Illuminate/Concurrency/SyncDriver.php @@ -26,6 +26,6 @@ public function run(Closure|array $tasks): array */ public function defer(Closure|array $tasks): DeferredCallback { - return defer(fn () => Collection::wrap($tasks))->each(fn ($task) => $task())); + return defer(fn () => Collection::wrap($tasks))->each(fn ($task) => $task()); } } diff --git a/src/Illuminate/Database/Eloquent/Factories/Factory.php b/src/Illuminate/Database/Eloquent/Factories/Factory.php index c4c1fc8c6e2..7dcd17d1a72 100644 --- a/src/Illuminate/Database/Eloquent/Factories/Factory.php +++ b/src/Illuminate/Database/Eloquent/Factories/Factory.php @@ -456,7 +456,7 @@ protected function getRawAttributes(?Model $parent) return $this->for->isEmpty() ? $states : (new Collection([ function () { return $this->parentResolvers(); - } + }, ]))->merge($states->all()); })->reduce(function ($carry, $state) use ($parent) { if ($state instanceof Closure) { diff --git a/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php b/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php index c91b350566d..28ad2367e70 100644 --- a/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php +++ b/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php @@ -179,7 +179,7 @@ protected function aliasedPivotColumns() { $defaults = [$this->foreignPivotKey, $this->relatedPivotKey, $this->morphType]; - return (new Collection($defaults))->merge( $this->pivotColumns)->map(function ($column) { + return (new Collection($defaults))->merge($this->pivotColumns)->map(function ($column) { return $this->qualifyPivotColumn($column).' as pivot_'.$column; })->unique()->all(); } diff --git a/src/Illuminate/Queue/Queue.php b/src/Illuminate/Queue/Queue.php index cab1c9843a3..0129a0c4e64 100755 --- a/src/Illuminate/Queue/Queue.php +++ b/src/Illuminate/Queue/Queue.php @@ -214,7 +214,7 @@ public function getJobBackoff($job) return; } - return (new Collection::wrap($backoff) + return (Collection::wrap($backoff) ->map(function ($backoff) { return $backoff instanceof DateTimeInterface ? $this->secondsUntil($backoff) : $backoff;