```php
if (!isset($this->events[$eventName])) {
    return [];
}

// make sure to return listeners ordered by priority
// if `events[$eventName]` exists we are sure that `orderedByPriority[$eventName]` exists, too
if (!$this->orderedByPriority[$eventName]) {
    krsort($this->events[$eventName], SORT_NUMERIC);
    $this->orderedByPriority[$eventName] = true;
}

return $this->events[$eventName];
```