Class User { // ... private $confirm_password; // ... public function getConfirmPassword(): ?string { return $this->confirm_password; } public function setConfirmPassword(string $confirm_password): self { $this->confirm_password = $confirm_password; return $this; } }