Skip to content

Commit

Permalink
handle where missing director dateOfBirth
Browse files Browse the repository at this point in the history
  • Loading branch information
willpower232 committed Mar 20, 2019
1 parent 90ed4da commit c80426a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Models/Company/Director.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,13 @@ public function getGender() : string
*
* @return DateTime Returns the Date Of Birth of the Director
*/
public function getDateOfBirth() : \DateTime
public function getDateOfBirth() : ?\DateTime
{
return $this->directorDetails['dateOfBirth'];
if (isset($this->directorDetails['dateOfBirth'])) {
return $this->directorDetails['dateOfBirth'];
}

return null;
}

/**
Expand Down

0 comments on commit c80426a

Please sign in to comment.