src/Entity/User.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  10. use Symfony\Component\Security\Core\User\UserInterface;
  11. /**
  12.  * @ORM\Entity(repositoryClass=UserRepository::class)
  13.  * @UniqueEntity(fields={"email"}, message="Il y a déjà un compte associé à cette adresse mail.")
  14.  */
  15. class User implements UserInterfacePasswordAuthenticatedUserInterface
  16. {
  17.     /**
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\Column(type="string", length=180, unique=true)
  25.      */
  26.     private $email;
  27.     /**
  28.      * @ORM\Column(type="json")
  29.      */
  30.     private $roles = [];
  31.     /**
  32.      * @var string The hashed password
  33.      * @ORM\Column(type="string")
  34.      */
  35.     private $password;
  36.     /**
  37.      * @ORM\Column(type="boolean")
  38.      */
  39.     private $isVerified false;
  40.     public function isRelanceProfile(): ?bool
  41.     {
  42.         return $this->relanceProfile;
  43.     }
  44.     public function setRelanceProfile(?bool $relanceProfile): void
  45.     {
  46.         $this->relanceProfile $relanceProfile;
  47.     }
  48.     /**
  49.      * @ORM\Column(type="boolean",nullable=true)
  50.      */
  51.     private $relanceProfile false;
  52.     /**
  53.      * @ORM\Column(type="string", length=255)
  54.      */
  55.     private $firstname;
  56.     /**
  57.      * @ORM\Column(type="string", length=255)
  58.      */
  59.     private $lastname;
  60.     /**
  61.      * @ORM\Column(type="string", length=255, nullable=true)
  62.      */
  63.     private $phone;
  64.     /**
  65.      * @ORM\Column(type="string", length=255)
  66.      */
  67.     public $type 'freelance';
  68.     /**
  69.      * @ORM\Column(type="string", length=255, nullable=true)
  70.      */
  71.     private $photo;
  72.     /**
  73.      * @ORM\Column(type="string", length=255, nullable=true, name="subscription_id")
  74.      */
  75.     private $subscriptionId;
  76.     /**
  77.      * @return mixed
  78.      */
  79.     public function getSubscriptionId()
  80.     {
  81.         return $this->subscriptionId;
  82.     }
  83.     /**
  84.      * @param mixed $subscriptionId
  85.      */
  86.     public function setSubscriptionId($subscriptionId): void
  87.     {
  88.         $this->subscriptionId $subscriptionId;
  89.     }
  90.     /**
  91.      * @ORM\OneToOne(targetEntity=Society::class, mappedBy="user", cascade={"persist", "remove"})
  92.      */
  93.     private $society;
  94.     /**
  95.      * @ORM\OneToMany(targetEntity=Profile::class, mappedBy="user", orphanRemoval=true)
  96.      */
  97.     private $profiles;
  98.     /**
  99.      * @ORM\Column(type="datetime", nullable=true)
  100.      */
  101.     private $deleteAt;
  102.     /**
  103.      * @ORM\Column(type="datetime", nullable=true)
  104.      */
  105.     private $lastConnection;
  106.     /**
  107.      * @ORM\OneToMany(targetEntity=Message::class, mappedBy="writer")
  108.      */
  109.     private $messages;
  110.     /**
  111.      * @ORM\OneToMany(targetEntity=Room::class, mappedBy="caller")
  112.      */
  113.     private $rooms;
  114.     /**
  115.      * @ORM\OneToMany(targetEntity=OfferFavorite::class, mappedBy="user", orphanRemoval=true)
  116.      */
  117.     private $offerFavorites;
  118.     /**
  119.      * @ORM\Column(type="datetime")
  120.      */
  121.     private $createdAt;
  122.     /**
  123.      * @ORM\OneToMany(targetEntity=AuthLog::class, mappedBy="user", orphanRemoval=true)
  124.      */
  125.     private $authLogs;
  126.     /**
  127.      * @ORM\OneToMany(targetEntity=OfferVisit::class, mappedBy="user", orphanRemoval=true)
  128.      */
  129.     private $offerVisits;
  130.     /**
  131.      * @ORM\OneToMany(targetEntity=Report::class, mappedBy="user", orphanRemoval=true)
  132.      */
  133.     private $reports;
  134.     /**
  135.      * @ORM\OneToMany(targetEntity=OfferAlert::class, mappedBy="user", orphanRemoval=true)
  136.      */
  137.     private $offerAlerts;
  138.     /**
  139.      * @ORM\OneToMany(targetEntity=ProfileFavorite::class, mappedBy="user")
  140.      */
  141.     private $profileFavorites;
  142.     /**
  143.      * @ORM\Column(type="integer", nullable=true)
  144.      */
  145.     private $civility;
  146.     /**
  147.      * @ORM\Column(type="string", length=50, nullable=true)
  148.      */
  149.     private $jobSociety;
  150.     /**
  151.      * @ORM\ManyToOne(targetEntity=Society::class)
  152.      */
  153.     private $CompteSociety;
  154.     /**
  155.      * @ORM\Column(type="boolean", nullable=true)
  156.      */
  157.     private $compteTestIsNotActive;
  158.     /**
  159.      * @ORM\Column(type="string", length=50, nullable=true)
  160.      */
  161.     private $googleSubId;
  162.     /**
  163.      * @ORM\Column(type="boolean", nullable=true)
  164.      */
  165.     private $isBlocked;
  166.     /**
  167.      * @ORM\Column(type="integer", nullable=true)
  168.      */
  169.     private $mailRelance;
  170.     /**
  171.      * @ORM\Column(type="datetime", nullable=true)
  172.      */
  173.     private $lastLoginTime;
  174.     /**
  175.      * @ORM\Column(type="json", nullable=true)
  176.      */
  177.     private $expoPushTokens = [];
  178.     public function getExpoPushTokens(): array
  179.     {
  180.         return $this->expoPushTokens ?: [];
  181.     }
  182.     public function addExpoPushToken(string $token): self
  183.     {
  184.         if (!is_array($this->expoPushTokens)) {
  185.             $this->expoPushTokens = [];
  186.         }
  187.         if (!in_array($token$this->expoPushTokenstrue)) {
  188.             $this->expoPushTokens[] = $token;
  189.         }
  190.         return $this;
  191.     }
  192.     public function removeExpoPushToken(string $token): self
  193.     {
  194.         if (($key array_search($token$this->expoPushTokenstrue)) !== false) {
  195.             unset($this->expoPushTokens[$key]);
  196.             $this->expoPushTokens array_values($this->expoPushTokens);
  197.         }
  198.         return $this;
  199.     }
  200.     /**
  201.      * @return \DateTimeInterface|null
  202.      */
  203.     public function getLastLoginTime(): ?\DateTimeInterface
  204.     {
  205.         return $this->lastLoginTime;
  206.     }
  207.     /**
  208.      *
  209.      * @param \DateTimeInterface|null $lastLoginTime
  210.      * @return void
  211.      */
  212.     public function setLastLoginTime(?\DateTimeInterface $lastLoginTime): void
  213.     {
  214.         $this->lastLoginTime $lastLoginTime;
  215.     }
  216.     /**
  217.      * @ORM\Column(type="datetime", nullable=true)
  218.      */
  219.     private $lastLougoutTime;
  220.     /**
  221.      * @return \DateTimeInterface|null
  222.      */
  223.     public function getLastLougoutTime(): ?\DateTimeInterface
  224.     {
  225.         return $this->lastLougoutTime;
  226.     }
  227.     public function setLastLougoutTime(?\DateTimeInterface $lastLougoutTime): void
  228.     {
  229.         $this->lastLougoutTime $lastLougoutTime;
  230.     }
  231.     /**
  232.      * @return \DateTimeInterface|null
  233.      */
  234.     public function getLastReminderTime(): ?\DateTimeInterface
  235.     {
  236.         return $this->lastReminderTime;
  237.     }
  238.     public function setLastReminderTime(?\DateTimeInterface $lastReminderTime): void
  239.     {
  240.         $this->lastReminderTime $lastReminderTime;
  241.     }
  242.     /**
  243.      * @ORM\Column(type="datetime", nullable=true)
  244.      */
  245.     private $lastReminderTime;
  246.     public function getMailRelance(): ?int
  247.     {
  248.         return $this->mailRelance;
  249.     }
  250.     public function setMailRelance(int $mailRelance): void
  251.     {
  252.         $this->mailRelance $mailRelance;
  253.     }
  254.     public function getIsBlocked()
  255.     {
  256.         return $this->isBlocked;
  257.     }
  258.     public function setIsBlocked($isBlocked): void
  259.     {
  260.         $this->isBlocked $isBlocked;
  261.     }
  262.     public function __construct()
  263.     {
  264.         $this->profiles = new ArrayCollection();
  265.         $this->messages = new ArrayCollection();
  266.         $this->rooms = new ArrayCollection();
  267.         $this->offerFavorites = new ArrayCollection();
  268.         $this->authLogs = new ArrayCollection();
  269.         $this->offerVisits = new ArrayCollection();
  270.         $this->reports = new ArrayCollection();
  271.         $this->offerAlerts = new ArrayCollection();
  272.         $this->profileFavorites = new ArrayCollection();
  273.     }
  274.     // ---------------------------------
  275.     public function getCivilityString(): string
  276.     {
  277.         if ($this->civility == 1) {
  278.             return "Mr.";
  279.         }
  280.         if ($this->civility == 2) {
  281.             return "Mme.";
  282.         }
  283.         return "";
  284.     }
  285.     public function isRole(string $role)
  286.     {
  287.         if (in_array($role$this->roles)) {
  288.             return true;
  289.         }
  290.         return false;
  291.     }
  292.     // ---------------------------------
  293.     public function getId(): ?int
  294.     {
  295.         return $this->id;
  296.     }
  297.     public function getEmail(): ?string
  298.     {
  299.         return $this->email;
  300.     }
  301.     public function setEmail(string $email): self
  302.     {
  303.         $this->email $email;
  304.         return $this;
  305.     }
  306.     /**
  307.      * A visual identifier that represents this user.
  308.      *
  309.      * @see UserInterface
  310.      */
  311.     public function getUserIdentifier(): string
  312.     {
  313.         return (string)$this->email;
  314.     }
  315.     /**
  316.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  317.      */
  318.     public function getUsername(): string
  319.     {
  320.         return (string)$this->email;
  321.     }
  322.     /**
  323.      * @see UserInterface
  324.      */
  325.     public function getRoles(): array
  326.     {
  327.         $roles $this->roles;
  328.         // guarantee every user at least has ROLE_USER
  329.         $roles[] = 'ROLE_USER';
  330.         return array_unique($roles);
  331.     }
  332.     public function setRoles(array $roles): self
  333.     {
  334.         $this->roles $roles;
  335.         return $this;
  336.     }
  337.     /**
  338.      * @see PasswordAuthenticatedUserInterface
  339.      */
  340.     public function getPassword(): string
  341.     {
  342.         return $this->password;
  343.     }
  344.     public function setPassword(string $password): self
  345.     {
  346.         $this->password $password;
  347.         return $this;
  348.     }
  349.     /**
  350.      * Returning a salt is only needed, if you are not using a modern
  351.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  352.      *
  353.      * @see UserInterface
  354.      */
  355.     public function getSalt(): ?string
  356.     {
  357.         return null;
  358.     }
  359.     /**
  360.      * @see UserInterface
  361.      */
  362.     public function eraseCredentials()
  363.     {
  364.         // If you store any temporary, sensitive data on the user, clear it here
  365.         // $this->plainPassword = null;
  366.     }
  367.     public function isVerified(): bool
  368.     {
  369.         return $this->isVerified;
  370.     }
  371.     public function hasProfile(): bool
  372.     {
  373.         return $this->getUniqueProfile()->getId() !== null;
  374.     }
  375.     public function setIsVerified(bool $isVerified): self
  376.     {
  377.         $this->isVerified $isVerified;
  378.         return $this;
  379.     }
  380.     public function getFirstname(): ?string
  381.     {
  382.         return $this->firstname;
  383.     }
  384.     public function setFirstname(string $firstname): self
  385.     {
  386.         $this->firstname $firstname;
  387.         return $this;
  388.     }
  389.     public function getLastname(): ?string
  390.     {
  391.         return $this->lastname;
  392.     }
  393.     public function setLastname(string $lastname): self
  394.     {
  395.         $this->lastname $lastname;
  396.         return $this;
  397.     }
  398.     public function getType(): ?string
  399.     {
  400.         return $this->type;
  401.     }
  402.     public function setType(string $type): self
  403.     {
  404.         $this->type $type;
  405.         return $this;
  406.     }
  407.     public function getPhoto(): ?string
  408.     {
  409.         if ($this->getCompteSociety()) {
  410.             $societe $this->getCompteSociety();
  411.             return $societe->getUser()->getPhoto();
  412.         }
  413.         return $this->photo;
  414.     }
  415.     public function setPhoto(?string $photo): self
  416.     {
  417.         $this->photo $photo;
  418.         return $this;
  419.     }
  420.     public function getFullName(): string
  421.     {
  422.         return $this->firstname ' ' $this->lastname;
  423.     }
  424.     public function getSociety(): ?Society
  425.     {
  426.         if ($this->getCompteSociety() && in_array("ROLE_RECRUTEUR"$this->roles)) {
  427.             return $this->getCompteSociety();
  428.         }
  429.         return $this->society;
  430.     }
  431.     public function setSociety(Society $society): self
  432.     {
  433.         // set the owning side of the relation if necessary
  434.         if ($society->getUser() !== $this) {
  435.             $society->setUser($this);
  436.         }
  437.         $this->society $society;
  438.         return $this;
  439.     }
  440.     public function isFreelance(): bool
  441.     {
  442.         return $this->type === 'freelance';
  443.     }
  444.     public function isSociety(): bool
  445.     {
  446.         if ($this->getCompteSociety()) {
  447.             return true;
  448.         }
  449.         return $this->type === 'society';
  450.     }
  451.     public function isAdmin(): bool
  452.     {
  453.         return $this->type == 'admin';
  454.     }
  455.     /**
  456.      * @return Collection|Profile[]
  457.      */
  458.     public function getProfiles(): Collection
  459.     {
  460.         return $this->profiles;
  461.     }
  462.     public function addProfile(Profile $profile): self
  463.     {
  464.         if (!$this->profiles->contains($profile)) {
  465.             $this->profiles[] = $profile;
  466.             $profile->setUser($this);
  467.         }
  468.         return $this;
  469.     }
  470.     public function removeProfile(Profile $profile): self
  471.     {
  472.         if ($this->profiles->removeElement($profile)) {
  473.             // set the owning side to null (unless already changed)
  474.             if ($profile->getUser() === $this) {
  475.                 $profile->setUser(null);
  476.             }
  477.         }
  478.         return $this;
  479.     }
  480.     public function getUniqueProfile(): Profile
  481.     {
  482.         return $this->getProfiles()->isEmpty()
  483.             ? (new Profile())
  484.             ->setUser($this)
  485.             ->setIsIntercontrat($this->isSociety())
  486.             ->setName($this->isFreelance() ? $this->getLastname() : 'Intercontrat')
  487.             ->setPhone($this->getPhone() ?? '')
  488.             ->setFirstname($this->isFreelance() ? $this->getFirstname() : 'Intercontrat')
  489.             : $this->getProfiles()->first();
  490.     }
  491.     public function getDeleteAt(): ?\DateTimeInterface
  492.     {
  493.         return $this->deleteAt;
  494.     }
  495.     public function setDeleteAt(?\DateTimeInterface $deleteAt): self
  496.     {
  497.         $this->deleteAt $deleteAt;
  498.         return $this;
  499.     }
  500.     public function getLastConnection(): ?\DateTimeInterface
  501.     {
  502.         return $this->lastConnection;
  503.     }
  504.     public function setLastConnection(?\DateTimeInterface $lastConnection): self
  505.     {
  506.         $this->lastConnection $lastConnection;
  507.         return $this;
  508.     }
  509.     /**
  510.      * @return Collection|Message[]
  511.      */
  512.     public function getMessages(): Collection
  513.     {
  514.         return $this->messages;
  515.     }
  516.     public function addMessage(Message $message): self
  517.     {
  518.         if (!$this->messages->contains($message)) {
  519.             $this->messages[] = $message;
  520.             $message->setWriter($this);
  521.         }
  522.         return $this;
  523.     }
  524.     public function removeMessage(Message $message): self
  525.     {
  526.         if ($this->messages->removeElement($message)) {
  527.             // set the owning side to null (unless already changed)
  528.             if ($message->getWriter() === $this) {
  529.                 $message->setWriter(null);
  530.             }
  531.         }
  532.         return $this;
  533.     }
  534.     /**
  535.      * @return Collection|Room[]
  536.      */
  537.     public function getRooms(): Collection
  538.     {
  539.         return $this->rooms;
  540.     }
  541.     public function addRoom(Room $room): self
  542.     {
  543.         if (!$this->rooms->contains($room)) {
  544.             $this->rooms[] = $room;
  545.             $room->setCaller($this);
  546.         }
  547.         return $this;
  548.     }
  549.     public function removeRoom(Room $room): self
  550.     {
  551.         if ($this->rooms->removeElement($room)) {
  552.             // set the owning side to null (unless already changed)
  553.             if ($room->getCaller() === $this) {
  554.                 $room->setCaller(null);
  555.             }
  556.         }
  557.         return $this;
  558.     }
  559.     /**
  560.      * @return Collection|OfferFavorite[]
  561.      */
  562.     public function getOfferFavorites(): Collection
  563.     {
  564.         return $this->offerFavorites;
  565.     }
  566.     public function addOfferFavorite(OfferFavorite $offerFavorite): self
  567.     {
  568.         if (!$this->offerFavorites->contains($offerFavorite)) {
  569.             $this->offerFavorites[] = $offerFavorite;
  570.             $offerFavorite->setUser($this);
  571.         }
  572.         return $this;
  573.     }
  574.     public function removeOfferFavorite(OfferFavorite $offerFavorite): self
  575.     {
  576.         if ($this->offerFavorites->removeElement($offerFavorite)) {
  577.             // set the owning side to null (unless already changed)
  578.             if ($offerFavorite->getUser() === $this) {
  579.                 $offerFavorite->setUser(null);
  580.             }
  581.         }
  582.         return $this;
  583.     }
  584.     public function getCreatedAt(): ?\DateTimeInterface
  585.     {
  586.         return $this->createdAt;
  587.     }
  588.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  589.     {
  590.         $this->createdAt $createdAt;
  591.         return $this;
  592.     }
  593.     /**
  594.      * @return Collection|AuthLog[]
  595.      */
  596.     public function getAuthLogs(): Collection
  597.     {
  598.         return $this->authLogs;
  599.     }
  600.     public function addAuthLog(AuthLog $authLog): self
  601.     {
  602.         if (!$this->authLogs->contains($authLog)) {
  603.             $this->authLogs[] = $authLog;
  604.             $authLog->setUser($this);
  605.         }
  606.         return $this;
  607.     }
  608.     public function removeAuthLog(AuthLog $authLog): self
  609.     {
  610.         if ($this->authLogs->removeElement($authLog)) {
  611.             // set the owning side to null (unless already changed)
  612.             if ($authLog->getUser() === $this) {
  613.                 $authLog->setUser(null);
  614.             }
  615.         }
  616.         return $this;
  617.     }
  618.     /**
  619.      * @return Collection|OfferVisit[]
  620.      */
  621.     public function getOfferVisits(): Collection
  622.     {
  623.         return $this->offerVisits;
  624.     }
  625.     public function addOfferVisit(OfferVisit $offerVisit): self
  626.     {
  627.         if (!$this->offerVisits->contains($offerVisit)) {
  628.             $this->offerVisits[] = $offerVisit;
  629.             $offerVisit->setUser($this);
  630.         }
  631.         return $this;
  632.     }
  633.     public function removeOfferVisit(OfferVisit $offerVisit): self
  634.     {
  635.         if ($this->offerVisits->removeElement($offerVisit)) {
  636.             // set the owning side to null (unless already changed)
  637.             if ($offerVisit->getUser() === $this) {
  638.                 $offerVisit->setUser(null);
  639.             }
  640.         }
  641.         return $this;
  642.     }
  643.     public function getPublicName(): ?string
  644.     {
  645.         return $this->isSociety()
  646.             ? $this->getSociety()->getName()
  647.             : $this->getUniqueProfile()->getPublicName();
  648.     }
  649.     /**
  650.      * @return Collection|Report[]
  651.      */
  652.     public function getReports(): Collection
  653.     {
  654.         return $this->reports;
  655.     }
  656.     public function addReport(Report $report): self
  657.     {
  658.         if (!$this->reports->contains($report)) {
  659.             $this->reports[] = $report;
  660.             $report->setUser($this);
  661.         }
  662.         return $this;
  663.     }
  664.     public function removeReport(Report $report): self
  665.     {
  666.         if ($this->reports->removeElement($report)) {
  667.             // set the owning side to null (unless already changed)
  668.             if ($report->getUser() === $this) {
  669.                 $report->setUser(null);
  670.             }
  671.         }
  672.         return $this;
  673.     }
  674.     /**
  675.      * @return Collection|OfferAlert[]
  676.      */
  677.     public function getOfferAlerts(): Collection
  678.     {
  679.         return $this->offerAlerts;
  680.     }
  681.     public function addOfferAlert(OfferAlert $offerAlert): self
  682.     {
  683.         if (!$this->offerAlerts->contains($offerAlert)) {
  684.             $this->offerAlerts[] = $offerAlert;
  685.             $offerAlert->setUser($this);
  686.         }
  687.         return $this;
  688.     }
  689.     public function removeOfferAlert(OfferAlert $offerAlert): self
  690.     {
  691.         if ($this->offerAlerts->removeElement($offerAlert)) {
  692.             // set the owning side to null (unless already changed)
  693.             if ($offerAlert->getUser() === $this) {
  694.                 $offerAlert->setUser(null);
  695.             }
  696.         }
  697.         return $this;
  698.     }
  699.     public function isOauth(): bool
  700.     {
  701.         return $this->password == 'nopass';
  702.     }
  703.     /**
  704.      * @return Collection<int, ProfileFavorite>
  705.      */
  706.     public function getProfileFavorites(): Collection
  707.     {
  708.         return $this->profileFavorites;
  709.     }
  710.     public function addProfileFavorite(ProfileFavorite $profileFavorite): self
  711.     {
  712.         if (!$this->profileFavorites->contains($profileFavorite)) {
  713.             $this->profileFavorites[] = $profileFavorite;
  714.             $profileFavorite->setUser($this);
  715.         }
  716.         return $this;
  717.     }
  718.     public function removeProfileFavorite(ProfileFavorite $profileFavorite): self
  719.     {
  720.         if ($this->profileFavorites->removeElement($profileFavorite)) {
  721.             // set the owning side to null (unless already changed)
  722.             if ($profileFavorite->getUser() === $this) {
  723.                 $profileFavorite->setUser(null);
  724.             }
  725.         }
  726.         return $this;
  727.     }
  728.     public function isIsVerified(): ?bool
  729.     {
  730.         return $this->isVerified;
  731.     }
  732.     public function getPhone(): ?string
  733.     {
  734.         return $this->phone;
  735.     }
  736.     public function setPhone(?string $phone): self
  737.     {
  738.         $this->phone $phone;
  739.         return $this;
  740.     }
  741.     public function getCivility(): ?int
  742.     {
  743.         return $this->civility;
  744.     }
  745.     public function setCivility(?int $civility): self
  746.     {
  747.         $this->civility $civility;
  748.         return $this;
  749.     }
  750.     public function getJobSociety(): ?string
  751.     {
  752.         return $this->jobSociety;
  753.     }
  754.     public function setJobSociety(?string $jobSociety): self
  755.     {
  756.         $this->jobSociety $jobSociety;
  757.         return $this;
  758.     }
  759.     public function getCompteSociety(): ?Society
  760.     {
  761.         return $this->CompteSociety;
  762.     }
  763.     public function setCompteSociety(?Society $CompteSociety): self
  764.     {
  765.         $this->CompteSociety $CompteSociety;
  766.         return $this;
  767.     }
  768.     public function isCompteTestIsNotActive(): ?bool
  769.     {
  770.         return $this->compteTestIsNotActive;
  771.     }
  772.     public function setCompteTestIsNotActive(?bool $compteTestIsNotActive): self
  773.     {
  774.         $this->compteTestIsNotActive $compteTestIsNotActive;
  775.         return $this;
  776.     }
  777.     public function getGoogleSubId(): ?string
  778.     {
  779.         return $this->googleSubId;
  780.     }
  781.     public function setGoogleSubId(?string $googleSubId): self
  782.     {
  783.         $this->googleSubId $googleSubId;
  784.         return $this;
  785.     }
  786.     public function isProfileCompleted(): bool
  787.     {
  788.         return !$this->profiles->isEmpty();
  789.     }
  790. }