code: public function setEmail($email)
      {
          if(!filter_var($email, FILTER_VALIDATE_EMAIL)){
              throw new \InvalidArgumentException(sprintf('Invalid email "%s"', $email));
          }
          $this->email = (string)$email;
      }
docs: Setter of $email
  
  @param string $email