diff --git a/CHANGELOG.md b/CHANGELOG.md
index cba8e6e..9bcd770 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
For a full diff see [`0.7.0...master`][0.7.0...master].
+### Changed
+
+- Made use of variadic parameters in `NodeBuilderInterface::leafs()` and `NodeBuilder::leafs()` ([#168]), by [@localheinz]
+
## [`0.7.0`][0.7.0]
For a full diff see [0.6.0...0.7.0`][0.6.0...0.7.0].
@@ -239,6 +243,7 @@ For a full diff see [`fcfd14e...v0.1.1`][fcfd14e...0.1.1].
[#152]: https://github.com/nicmart/Tree/pull/152
[#153]: https://github.com/nicmart/Tree/pull/153
[#154]: https://github.com/nicmart/Tree/pull/154
+[#168]: https://github.com/nicmart/Tree/pull/168
[@asalazar-pley]: https://github.com/asalazar-pley
[@Djuki]: https://github.com/Djuki
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index 0402db4..93efa93 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -4,9 +4,6 @@
$value
-
- $value1
-
diff --git a/src/Builder/NodeBuilder.php b/src/Builder/NodeBuilder.php
index e4ae012..a7cb6ff 100644
--- a/src/Builder/NodeBuilder.php
+++ b/src/Builder/NodeBuilder.php
@@ -52,9 +52,9 @@ public function leaf(mixed $value = null): static
return $this;
}
- public function leafs(mixed $value1 /* , $value2, ... */): static
+ public function leafs(mixed ...$values): static
{
- foreach (\func_get_args() as $value) {
+ foreach ($values as $value) {
$this->leaf($value);
}
diff --git a/src/Builder/NodeBuilderInterface.php b/src/Builder/NodeBuilderInterface.php
index 76655c3..c474978 100644
--- a/src/Builder/NodeBuilderInterface.php
+++ b/src/Builder/NodeBuilderInterface.php
@@ -43,7 +43,7 @@ public function leaf(mixed $value = null): static;
/**
* Add several leafs to the node.
*/
- public function leafs(mixed $value /* , $value2, ... */): static;
+ public function leafs(mixed ...$values): static;
/**
* Add a child to the node enter in its scope.