Skip to content

Commit 266f157

Browse files
committed
Simplify Parameters::sanitize method
1 parent 77a24b9 commit 266f157

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Parameters.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,9 @@ public function mergePairs(Parameters|iterable ...$others): self
404404
*/
405405
public function sanitize(): self
406406
{
407-
$this->members = array_map(function (Item $item): Item {
407+
foreach ($this->members as $item) {
408408
$item->parameters->clear();
409-
410-
return $item;
411-
}, $this->members);
409+
}
412410

413411
return $this;
414412
}

0 commit comments

Comments
 (0)