Skip to content

Commit

Permalink
Merge pull request #1 from kon3ko/master
Browse files Browse the repository at this point in the history
Improve the code to be consistent with EventDispatcherInterface
  • Loading branch information
DariusIII authored Jan 2, 2022
2 parents c913673 + 7ebc500 commit 726ff15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Adapters/EventDispatcherAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function removeSubscriber(EventSubscriberInterface $subscriber)
*
* @return array The event listeners for the specified event, or all event listeners by event name
*/
public function getListeners(string $eventName = null)
public function getListeners(string $eventName = null): array
{
return $this->symfonyDispatcher->getListeners($eventName);
}
Expand All @@ -121,7 +121,7 @@ public function getListeners(string $eventName = null)
*
* @return bool true if the specified event has any listeners, false otherwise
*/
public function hasListeners(string $eventName = null)
public function hasListeners(string $eventName = null): bool
{
return ($this->symfonyDispatcher->hasListeners($eventName) ||
$this->laravelDispatcher->hasListeners($eventName));
Expand All @@ -137,7 +137,7 @@ public function hasListeners(string $eventName = null)
*
* @return int|null The event listener priority
*/
public function getListenerPriority($eventName, $listener)
public function getListenerPriority($eventName, $listener): ?int
{
return $this->symfonyDispatcher->getListenerPriority($eventName, $listener);
}
Expand Down

0 comments on commit 726ff15

Please sign in to comment.