$value) { if (property_exists($this, $key)) { if ($key === 'dates' && is_array($value)) { $this->dates = new ProposalResponseDateCollection(); $this->dates->fromJson($value); } else { $this->{$key} = $value; } } } } public function getToken(): string { return $this->token; } public function setToken(string $value): void { $this->token = $value; } public function getDates(): ProposalResponseDateCollection { return $this->dates; } public function setDates(ProposalResponseDateCollection $value): void { $this->dates = $value; } }