mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix possible null values or not null values in some entity / string properties
This commit is contained in:
parent
d54d34be7c
commit
9ec5a633ad
5
.changes/unreleased/Fixed-20231017-231446.yaml
Normal file
5
.changes/unreleased/Fixed-20231017-231446.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
kind: Fixed
|
||||
body: Fix possible null values in string's entities
|
||||
time: 2023-10-17T23:14:46.099913795+02:00
|
||||
custom:
|
||||
Issue: ""
|
@ -49,7 +49,7 @@ class Charge extends AbstractElement implements HasCentersInterface
|
||||
/**
|
||||
* @ORM\Column(name="help", type="string", nullable=true)
|
||||
*/
|
||||
private string $help = self::HELP_NOT_RELEVANT;
|
||||
private ?string $help = self::HELP_NOT_RELEVANT;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
|
@ -76,7 +76,7 @@ class ChargeKind
|
||||
return $this->isActive;
|
||||
}
|
||||
|
||||
public function getKind(): ?string
|
||||
public function getKind(): string
|
||||
{
|
||||
return $this->kind;
|
||||
}
|
||||
@ -98,7 +98,7 @@ class ChargeKind
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setKind(?string $kind): self
|
||||
public function setKind(string $kind): self
|
||||
{
|
||||
$this->kind = $kind;
|
||||
|
||||
|
@ -75,7 +75,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
|
||||
* min=2, max=250
|
||||
* )
|
||||
*/
|
||||
private ?string $title = null;
|
||||
private string $title = '';
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
|
||||
@ -92,7 +92,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function getDescription(): ?string
|
||||
public function getDescription(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
@ -107,7 +107,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->template;
|
||||
}
|
||||
|
||||
public function getTitle(): ?string
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ class AccompanyingPeriod implements
|
||||
*
|
||||
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CONFIRMED})
|
||||
*/
|
||||
private string $intensity = self::INTENSITY_OCCASIONAL;
|
||||
private ?string $intensity = self::INTENSITY_OCCASIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
@ -414,7 +414,7 @@ class AccompanyingPeriod implements
|
||||
*
|
||||
* @var AccompanyingPeriod::STEP_*
|
||||
*/
|
||||
private string $step = self::STEP_DRAFT;
|
||||
private ?string $step = self::STEP_DRAFT;
|
||||
|
||||
/**
|
||||
* @var Collection<AccompanyingPeriodStepHistory>
|
||||
|
@ -62,7 +62,7 @@ class AccompanyingPeriodWorkGoal
|
||||
* @Serializer\Groups({"accompanying_period_work:edit"})
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private ?string $note = null;
|
||||
private string $note = '';
|
||||
|
||||
/**
|
||||
* @var Collection<Result>
|
||||
|
@ -49,7 +49,7 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @Assert\NotNull
|
||||
*/
|
||||
private ?string $content = null;
|
||||
private string $content = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
@ -99,7 +99,7 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->accompanyingPeriod;
|
||||
}
|
||||
|
||||
public function getContent(): ?string
|
||||
public function getContent(): string
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
private string $contactInfo = '';
|
||||
private ?string $contactInfo = '';
|
||||
|
||||
/**
|
||||
* The person's country of birth.
|
||||
@ -298,7 +298,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @Assert\Email()
|
||||
*/
|
||||
private string $email = '';
|
||||
private ?string $email = '';
|
||||
|
||||
/**
|
||||
* The person's first name.
|
||||
@ -319,7 +319,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
private string $fullnameCanonical = '';
|
||||
private ?string $fullnameCanonical = '';
|
||||
|
||||
/**
|
||||
* The person's gender.
|
||||
@ -413,7 +413,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @ORM\Column(type="text")
|
||||
*/
|
||||
private string $memo = ''; // TO-CHANGE in remark
|
||||
private string $memo = '';
|
||||
|
||||
/**
|
||||
* The person's mobile phone number.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
private string $firstname = '';
|
||||
private ?string $firstname = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
@ -231,7 +231,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
*
|
||||
* @Groups({"write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
private ?string $kind = '';
|
||||
private string $kind = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="name", type="string", length=255)
|
||||
@ -244,7 +244,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
*
|
||||
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
|
||||
*/
|
||||
private ?string $name = '';
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
* [fr] Raison sociale.
|
||||
@ -770,7 +770,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
||||
|
||||
public function setKind(?string $kind): ThirdParty
|
||||
{
|
||||
$this->kind = $kind;
|
||||
$this->kind = (string) $kind;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user