src/Entity/Main/UserRegistrationData.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Main;
  3. use Symfony\Component\Validator\Constraints as Assert;
  4. final class UserRegistrationData
  5. {
  6.     #[Assert\Email(message'form.error.message.notValidEmail2')]
  7.     private ?string $email null;
  8.     #[Assert\IsTrue(message'The token is invalid')]
  9.     private bool $cgu_state false;
  10.     /**
  11.      * Set Email
  12.      *
  13.      * @param string $email
  14.      *
  15.      * @return self
  16.      */
  17.     public function setEmail(string $email): self
  18.     {
  19.         $this->email $email;
  20.         return $this;
  21.     }
  22.     /**
  23.      * Get Email
  24.      *
  25.      * @return string
  26.      */
  27.     public function getEmail()
  28.     {
  29.         return $this->email;
  30.     }
  31.     /**
  32.      * @param bool $state
  33.      */
  34.     public function setCGU($state)
  35.     {
  36.         return $this->cgu_state = (bool) $state;
  37.     }
  38.     /**
  39.      * @return bool
  40.      */
  41.     public function getCGU()
  42.     {
  43.         return $this->cgu_state;
  44.     }
  45. }