Skip to content

Commit

Permalink
Allow adding multiple function arguments at once
Browse files Browse the repository at this point in the history
  • Loading branch information
murtukov committed Jun 26, 2020
1 parent 0be132d commit f5ef64a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/AbstractFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ public function addArgument(string $name, string $type = '', $defaultValue = Arg
return $this;
}

public function addArguments(string ...$names): self
{
$this->signature->addArguments(...$names);

return $this;
}

public function add(FunctionMemberInterface $member): self
{
$this->signature->add($member);
Expand Down

0 comments on commit f5ef64a

Please sign in to comment.