From 5a96b9d2e85ae45a0467e17e161078b8c08404ca Mon Sep 17 00:00:00 2001 From: Fabio Capucci Date: Thu, 15 Mar 2018 14:26:18 +0100 Subject: [PATCH] Simplify Entity fill --- src/Entity.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Entity.php b/src/Entity.php index 4d7e2ee..822fdf7 100755 --- a/src/Entity.php +++ b/src/Entity.php @@ -130,12 +130,7 @@ public function toArray() public function fill(array $attributes) { foreach ($attributes as $key => $attribute) { - if ($this->hasSetMutator($key)) { - $method = 'set'.$this->getMutatorMethod($key); - $this->attributes[$key] = $this->$method($attribute); - } else { - $this->attributes[$key] = $attribute; - } + $this->{$key} = $attribute; } } }