mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 19:04:03 +00:00
Refactor eventCallback()
This commit is contained in:
parent
01bff54b18
commit
363b2fc56e
1 changed files with 2 additions and 2 deletions
|
|
@ -103,7 +103,7 @@ class TenantManagerv2
|
|||
}
|
||||
|
||||
/**
|
||||
* Add event callback.
|
||||
* Add an event callback.
|
||||
*
|
||||
* @param string $name
|
||||
* @param callable $callback
|
||||
|
|
@ -111,7 +111,7 @@ class TenantManagerv2
|
|||
*/
|
||||
public function eventCallback(string $name, callable $callback): self
|
||||
{
|
||||
isset($this->eventCallbacks[$name]) || $this->eventCallbacks[$name] = [];
|
||||
$this->eventCallbacks[$name] = $this->eventCallbacks[$name] ?? [];
|
||||
$this->eventCallbacks[$name][] = $callback;
|
||||
|
||||
return $this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue