private static function bindViolations(ConstraintViolationList $violations, ServiceBusContext $context): void
    {
        $errors = [];

        /** @var \Symfony\Component\Validator\ConstraintViolation $violation */
        foreach ($violations as $violation)
        {
            $errors[$violation->getPropertyPath()][] = $violation->getMessage();
        }

        try
        {
            invokeReflectionMethod($context, 'validationFailed', $errors);
        }
        // @codeCoverageIgnoreStart
        catch (\Throwable $throwable)
        {
            /** No exceptions can happen */
        }
        // @codeCoverageIgnoreEnd
    }
private static function bindViolations(ConstraintViolationList $violations, ServiceBusContext $context): void
    {
        $errors = [];

        /** @var \Symfony\Component\Validator\ConstraintViolation $violation */
        foreach ($violations as $violation)
        {
            $errors[$violation->getPropertyPath()][] = $violation->getMessage();
        }

        try
        {
            invokeReflectionMethod($context, 'validationFailed', $errors);
        }
        // @codeCoverageIgnoreStart
        catch (\Throwable $throwable)
        {
            /** No exceptions can happen */
        }
        // @codeCoverageIgnoreEnd
    }
private static function bindViolations ( ConstraintViolationList $ violations , ServiceBusContext $ context ) : void { $ errors = [ ] ; /** @var \Symfony\Component\Validator\ConstraintViolation $violation */ foreach ( $ violations as $ violation ) { $ errors [ $ violation -> getPropertyPath ( ) ] [ ] = $ violation -> getMessage ( ) ; } try { invokeReflectionMethod ( $ context , 'validationFailed' , $ errors ) ; } // @codeCoverageIgnoreStart catch ( \ Throwable $ throwable ) { /** No exceptions can happen */ } // @codeCoverageIgnoreEnd }
Bind violations to context.

@param ConstraintViolationList $violations
@param ServiceBusContext       $context

@return void
Bind violations to context .