creditHistories = new ArrayCollection(); } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getMerchant(): ?Merchant { return $this->merchant; } public function setMerchant(?Merchant $merchant): self { $this->merchant = $merchant; return $this; } public function getCredit(): ?float { return $this->credit; } public function setCredit(?float $credit): self { $this->credit = $credit; return $this; } public function getCreditActive(): ?bool { return $this->creditActive; } public function isCreditActive(): bool { return $this->creditActive; } public function setCreditActive(bool $creditActive): self { $this->creditActive = $creditActive; return $this; } /** * @return Collection|CreditHistory[] */ public function getCreditHistories(): Collection { return $this->creditHistories; } public function addCreditHistory(CreditHistoryInterface $creditHistory): self { if (!$this->creditHistories->contains($creditHistory)) { $this->creditHistories[] = $creditHistory; $creditHistory->setUserMerchant($this); } return $this; } public function removeCreditHistory(CreditHistoryInterface $creditHistory): self { if ($this->creditHistories->contains($creditHistory)) { $this->creditHistories->removeElement($creditHistory); // set the owning side to null (unless already changed) if ($creditHistory->getUserMerchant() === $this) { $creditHistory->setUserMerchant(null); } } return $this; } public function getActive(): ?bool { return $this->active; } public function setActive(bool $active): self { $this->active = $active; return $this; } }