mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:24:02 +00:00
Apply fixes from StyleCI
This commit is contained in:
parent
4c80ba78d3
commit
63f455d09c
1 changed files with 4 additions and 4 deletions
|
|
@ -99,7 +99,7 @@ trait TenantManagerEvents
|
|||
*/
|
||||
public function integrationEvent(string $name, callable $callback)
|
||||
{
|
||||
if (array_key_exists($name, $this->integrationListeners)) {
|
||||
if (\array_key_exists($name, $this->integrationListeners)) {
|
||||
$this->integrationListeners[$name][] = $callback;
|
||||
} else {
|
||||
$this->integrationListeners[$name] = [$callback];
|
||||
|
|
@ -117,10 +117,10 @@ trait TenantManagerEvents
|
|||
{
|
||||
if ($arguments) {
|
||||
// If $arguments are supplied, execute all listeners with arguments.
|
||||
return array_reduce($this->integrationListeners[$name] ?? [], function ($tags, $listener) use ($arguments) {
|
||||
return array_merge($tags, $listener(...$arguments));
|
||||
return \array_reduce($this->integrationListeners[$name] ?? [], function ($tags, $listener) use ($arguments) {
|
||||
return \array_merge($tags, $listener(...$arguments));
|
||||
}, []);
|
||||
};
|
||||
}
|
||||
|
||||
return $this->integrationListeners[$name];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue