diff --git a/src/ActiveQuery.php b/src/ActiveQuery.php index 6d93bddf5..d583855ea 100644 --- a/src/ActiveQuery.php +++ b/src/ActiveQuery.php @@ -329,9 +329,9 @@ private function removeDuplicatedModels(array $models): array } if (count($pks) === 1) { - $hash = array_map(static fn ($model) => $model->getPrimaryKey(), $models); + $hash = array_map(static fn ($model): mixed => $model->getPrimaryKey(), $models); } else { - $hash = array_map(static fn ($model) => serialize($model->getPrimaryKey(true)), $models); + $hash = array_map(static fn ($model): mixed => serialize($model->getPrimaryKey(true)), $models); } }