Fix possible null values or not null values in some entity / string properties

This commit is contained in:
2023-10-17 23:15:06 +02:00
parent d54d34be7c
commit 9ec5a633ad
10 changed files with 30 additions and 29 deletions

View File

@@ -37,14 +37,14 @@ class PersonAltName
*
* @Groups({"write"})
*/
private ?string $key = null;
private string $key = '';
/**
* @ORM\Column(name="label", type="text")
*
* @Groups({"write"})
*/
private ?string $label = null;
private string $label = '';
/**
* @ORM\ManyToOne(
@@ -92,13 +92,11 @@ class PersonAltName
/**
* Set key.
*
* @param string $key
*
* @return PersonAltName
*/
public function setKey($key)
public function setKey(?string $key)
{
$this->key = $key;
$this->key = (string) $key;
return $this;
}
@@ -106,13 +104,11 @@ class PersonAltName
/**
* Set label.
*
* @param string $label
*
* @return PersonAltName
*/
public function setLabel($label)
public function setLabel(?string $label)
{
$this->label = $label;
$this->label = (string) $label;
return $this;
}