Validator/SelfRecipientValidator.php
/**
     * Indicates whether the constraint is valid.
     *
     * @param object|ParticipantInterface $recipient
     * @param Constraint $constraint
     */
Indicates whether the constraint is valid.
@param object|ParticipantInterface $recipient
@param Constraint $constraint
Indicates whether the constraint is valid . @param object|ParticipantInterface $recipient @param Constraint $constraint
public function validate($recipient, Constraint $constraint)
    {
        if ($recipient === $this->participantProvider->getAuthenticatedParticipant()) {
            $this->getContext()->addViolation($constraint->message);
        }
    }
public function validate ( $ recipient , Constraint $ constraint ) { if ( $ recipient === $ this -> participantProvider -> getAuthenticatedParticipant ( ) ) { $ this -> getContext ( ) -> addViolation ( $ constraint -> message ) ; } }
Indicates whether the constraint is valid.
Indicates whether the constraint is valid .