force type on Person entity

This commit is contained in:
Julien Fastré 2022-03-30 21:01:17 +02:00
parent 83dfe530e9
commit bc43d8bae5

View File

@ -284,7 +284,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* max=255,
* )
*/
private $firstName;
private string $firstName = '';
/**
* fullname canonical. Read-only field, which is calculated by
@ -294,7 +294,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\Column(type="text", nullable=true)
*/
private $fullnameCanonical;
private string $fullnameCanonical = '';
/**
* The person's gender.
@ -353,7 +353,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* max=255,
* )
*/
private $lastName;
private string $lastName = '';
/**
* The marital status of the person.
@ -1583,9 +1583,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this;
}
public function setFirstName(string $firstName): self
public function setFirstName(?string $firstName): self
{
$this->firstName = $firstName;
$this->firstName = (string) $firstName;
return $this;
}
@ -1611,9 +1611,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this;
}
public function setLastName(string $lastName): self
public function setLastName(?string $lastName): self
{
$this->lastName = $lastName;
$this->lastName = (string) $lastName;
return $this;
}