private static function publishViolations(string $eventClass, ServiceBusContext $context): Promise
    {
        /**
         * @noinspection VariableFunctionsUsageInspection
         *
         * @var \ServiceBus\Services\Contracts\ValidationFailedEvent $event
         */
        $event = \forward_static_call_array([$eventClass, 'create'], [$context->traceId(), $context->violations()]);

        return $context->delivery($event);
    }