Skip to content

Commit

Permalink
Allow binding multiple closure vars at once
Browse files Browse the repository at this point in the history
  • Loading branch information
murtukov committed Jun 26, 2020
1 parent f5ef64a commit a230191
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/AbstractFunction.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ public function bindVar(string $name, bool $isByReference = false): self
return $this;
}

public function bindVars(string ...$names): self
{
foreach ($names as $name) {
$this->signature->bindVar($name);
}

return $this;
}

public function removeUses()
{
$this->signature->removeUses();
Expand Down

0 comments on commit a230191

Please sign in to comment.