Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Feb 26, 2018
1 parent b3f0ec2 commit 82099cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Illuminate/Events/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Dispatcher implements DispatcherContract
protected $wildcards = [];

/**
* Wildcard listeners cache which saves expensive string operations.
* The cached wildcard listeners.
*
* @var array
*/
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 82099cb

Please sign in to comment.