From 82099cb3fdfe79f3f4f17008daf169f13fefffc0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 26 Feb 2018 13:00:55 -0600 Subject: [PATCH] formatting --- src/Illuminate/Events/Dispatcher.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Events/Dispatcher.php b/src/Illuminate/Events/Dispatcher.php index 27dcfbfbf12b..be3561b5c0e4 100755 --- a/src/Illuminate/Events/Dispatcher.php +++ b/src/Illuminate/Events/Dispatcher.php @@ -37,7 +37,7 @@ class Dispatcher implements DispatcherContract protected $wildcards = []; /** - * Wildcard listeners cache which saves expensive string operations. + * The cached wildcard listeners. * * @var array */ @@ -290,9 +290,10 @@ public function getListeners($eventName) { $listeners = $this->listeners[$eventName] ?? []; - $wildcardListeners = $this->wildcardsCache[$eventName] ?? $this->getWildcardListeners($eventName); - - $listeners = array_merge($listeners, $wildcardListeners); + $listeners = array_merge( + $listeners, + $this->wildcardsCache[$eventName] ?? $this->getWildcardListeners($eventName) + ); return class_exists($eventName, false) ? $this->addInterfaceListeners($eventName, $listeners)