From 464832be29c63edd5aeefcbdf11b427b0e9bf6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 28 Oct 2019 14:59:25 +0100 Subject: [PATCH] Pass arguments to events by reference --- src/TenantManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TenantManager.php b/src/TenantManager.php index dae6ce59..264f1f52 100644 --- a/src/TenantManager.php +++ b/src/TenantManager.php @@ -432,7 +432,7 @@ class TenantManager * @param mixed ...$args * @return string[] */ - public function event(string $name, ...$args): array + public function event(string $name, &...$args): array { return array_reduce($this->eventListeners[$name] ?? [], function ($results, $listener) use ($args) { $results = array_merge($results, $listener($this, ...$args) ?? []);