public function isDifferentEmail(ExecutionContextInterface $context)
    {
        if ($this->getEmail() == $this->getFrom()->getEmail()) {
            $context->buildViolation('You can\'t invite yourself!')
                    ->atPath('email')
                    ->addViolation();
        }
    }
public function isDifferentEmail(ExecutionContextInterface $context)
    {
        if ($this->getEmail() == $this->getFrom()->getEmail()) {
            $context->buildViolation('You can\'t invite yourself!')
                    ->atPath('email')
                    ->addViolation();
        }
    }
public function isDifferentEmail ( ExecutionContextInterface $ context ) { if ( $ this -> getEmail ( ) == $ this -> getFrom ( ) -> getEmail ( ) ) { $ context -> buildViolation ( 'You can\'t invite yourself!' ) -> atPath ( 'email' ) -> addViolation ( ) ; } }
Callback to check the if is a different email from it self
Callback to check the if is a different email from it self