/**
  * @param string $eventName
  *
  * @return ContainerMediatorInterface Fluent Interface
  * @throws \InvalidArgumentException
  */
 private function sortServiceListeners(string $eventName) : ContainerMediatorInterface
 {
     if (0 === count($this->serviceListeners)) {
         return $this;
     }
     if ('' !== $eventName) {
         if (!array_key_exists($eventName, $this->serviceListeners)) {
             return $this;
         }
         $eventNames = [$eventName];
     } else {
         ksort($this->serviceListeners);
         $eventNames = array_keys(parent::getListeners(''));
     }
     foreach ($eventNames as $anEvent) {
         krsort($this->serviceListeners[$anEvent], SORT_NUMERIC);
     }
     return $this;
 }