Using array_replace_recursive to merge arrays instead

parent 23b24999
...@@ -36,7 +36,7 @@ final class UserIsCreating implements EntityIsChanging ...@@ -36,7 +36,7 @@ final class UserIsCreating implements EntityIsChanging
*/ */
public function setAttributes(array $attributes) public function setAttributes(array $attributes)
{ {
$this->attributes = array_merge($this->attributes, $attributes); $this->attributes = array_replace_recursive($this->attributes, $attributes);
} }
/** /**
......
...@@ -48,7 +48,7 @@ final class UserIsUpdating implements EntityIsChanging ...@@ -48,7 +48,7 @@ final class UserIsUpdating implements EntityIsChanging
*/ */
public function setAttributes(array $attributes) public function setAttributes(array $attributes)
{ {
$this->attributes = array_merge($this->attributes, $attributes); $this->attributes = array_replace_recursive($this->attributes, $attributes);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment