diff --git a/src/Concerns/HasWith.php b/src/Concerns/HasWith.php index 2c3004d..8c84b73 100644 --- a/src/Concerns/HasWith.php +++ b/src/Concerns/HasWith.php @@ -5,7 +5,7 @@ trait HasWith { /** - * Clones class with new property + * Set the new property * * @param string $property * @param mixed $value @@ -13,8 +13,7 @@ trait HasWith */ protected function with(string $property, $value): self { - $self = clone $this; - $self->{$property} = $value; - return $self; + $this->{$property} = $value; + return $this; } }