Skip to content

Commit

Permalink
remove redundant array_values call (#53814)
Browse files Browse the repository at this point in the history
we are already looping over the array, so there's need to build an array of the values.
  • Loading branch information
browner12 authored Dec 10, 2024
1 parent ff91d09 commit 5422f99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public static function flushEventListeners()
static::$dispatcher->forget("eloquent.{$event}: ".static::class);
}

foreach (array_values($instance->dispatchesEvents) as $event) {
foreach ($instance->dispatchesEvents as $event) {
static::$dispatcher->forget($event);
}
}
Expand Down

0 comments on commit 5422f99

Please sign in to comment.