Skip to content

Commit

Permalink
Element // ensure that withOptions() calls internally withOption().
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrico committed Sep 18, 2023
1 parent 54d280e commit 58025cc
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 @@ -160,10 +160,9 @@ public function options(): array
*/
public function withOptions(array $options = []): static
{
$this->options = array_merge(
$this->options,
$options
);
foreach($options as $key => $value){
$this->withOption($key, $value);
}

return $this;
}
Expand Down

0 comments on commit 58025cc

Please sign in to comment.