protected function checkServiceEvent($serviceEvent)
    {
        if (false === isset(self::$servicesChecked[$serviceEvent])) {
            self::$servicesChecked[$serviceEvent] = [];

            if (false === in_array(ServiceEventInterface::class, class_implements($serviceEvent))) {
                throw new WrongInheritanceException(
                    'Trying to run services with a wrong event: "' . $serviceEvent . '". Service events must extend "' . ServiceEventInterface::class . '".',
                    1456409155
                );
            }
        }
    }