From a230191b6ae39ee11829204f1cd715564f5c0ed0 Mon Sep 17 00:00:00 2001 From: murtukov Date: Sat, 27 Jun 2020 00:45:19 +0200 Subject: [PATCH] Allow binding multiple closure vars at once --- src/AbstractFunction.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/AbstractFunction.php b/src/AbstractFunction.php index e590436..07723fc 100644 --- a/src/AbstractFunction.php +++ b/src/AbstractFunction.php @@ -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();