diff --git a/src/Laravel/Eloquent/PropertyAccess/PropertyAccessor.php b/src/Laravel/Eloquent/PropertyAccess/PropertyAccessor.php index 8f20321d4ab..d1a63c711ea 100644 --- a/src/Laravel/Eloquent/PropertyAccess/PropertyAccessor.php +++ b/src/Laravel/Eloquent/PropertyAccess/PropertyAccessor.php @@ -32,7 +32,11 @@ public function __construct( } /** - * @param array|object $objectOrArray + * @template T of object|array + * + * @param T $objectOrArray + * + * @param-out ($objectOrArray is array ? array : T) $objectOrArray */ public function setValue(object|array &$objectOrArray, string|PropertyPathInterface $propertyPath, mixed $value): void {