Skip to content

Commit

Permalink
Element // ensure that withAttributes() is calling internally withAtt…
Browse files Browse the repository at this point in the history
…ribute().
  • Loading branch information
Chrico committed Sep 18, 2023
1 parent a4062b0 commit 54d280e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Element/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,9 @@ public function attributes(): array
*/
public function withAttributes(array $attributes = []): static
{
$this->attributes = array_merge(
$this->attributes,
$attributes
);
foreach ($attributes as $key => $value) {
$this->withAttribute($key, $value);
}

return $this;
}
Expand Down

0 comments on commit 54d280e

Please sign in to comment.