set typed ?string properties to '= null'

This commit is contained in:
2025-05-28 10:47:23 +02:00
parent 47c1282044
commit a79b0b85dd
4 changed files with 8 additions and 8 deletions

View File

@@ -52,7 +52,7 @@ class Frein implements HasPerson, \Stringable
private $freinsPerso = []; private $freinsPerso = [];
#[ORM\Column(name: 'notesPerso', type: \Doctrine\DBAL\Types\Types::TEXT)] #[ORM\Column(name: 'notesPerso', type: \Doctrine\DBAL\Types\Types::TEXT)]
private ?string $notesPerso = ''; private ?string $notesPerso = null;
public const FREINS_EMPLOI = [ public const FREINS_EMPLOI = [
'garde_d_enfants', 'garde_d_enfants',
@@ -70,7 +70,7 @@ class Frein implements HasPerson, \Stringable
private $freinsEmploi = []; private $freinsEmploi = [];
#[ORM\Column(name: 'notesEmploi', type: \Doctrine\DBAL\Types\Types::TEXT)] #[ORM\Column(name: 'notesEmploi', type: \Doctrine\DBAL\Types\Types::TEXT)]
private ?string $notesEmploi = ''; private ?string $notesEmploi = null;
#[ORM\ManyToOne(targetEntity: Person::class)] #[ORM\ManyToOne(targetEntity: Person::class)]
#[Assert\NotNull] #[Assert\NotNull]

View File

@@ -26,10 +26,10 @@ class Appellation implements \Stringable
private ?int $id = null; private ?int $id = null;
#[ORM\Column(name: 'code', type: \Doctrine\DBAL\Types\Types::STRING, length: 40, unique: true)] #[ORM\Column(name: 'code', type: \Doctrine\DBAL\Types\Types::STRING, length: 40, unique: true)]
private ?string $code = ''; private ?string $code = null;
#[ORM\Column(name: 'libelle', type: \Doctrine\DBAL\Types\Types::TEXT)] #[ORM\Column(name: 'libelle', type: \Doctrine\DBAL\Types\Types::TEXT)]
private ?string $libelle = ''; private ?string $libelle = null;
#[ORM\ManyToOne(targetEntity: Metier::class, inversedBy: 'appellations', cascade: ['persist'])] #[ORM\ManyToOne(targetEntity: Metier::class, inversedBy: 'appellations', cascade: ['persist'])]
private ?Metier $metier = null; private ?Metier $metier = null;

View File

@@ -27,10 +27,10 @@ class Metier
private ?int $id = null; private ?int $id = null;
#[ORM\Column(name: 'libelle', type: \Doctrine\DBAL\Types\Types::TEXT)] #[ORM\Column(name: 'libelle', type: \Doctrine\DBAL\Types\Types::TEXT)]
private ?string $libelle = ''; private ?string $libelle = null;
#[ORM\Column(name: 'code', type: \Doctrine\DBAL\Types\Types::STRING, length: 20, unique: true)] #[ORM\Column(name: 'code', type: \Doctrine\DBAL\Types\Types::STRING, length: 20, unique: true)]
private ?string $code = ''; private ?string $code = null;
/** /**
* @var \Doctrine\Common\Collections\Collection<int, Appellation> * @var \Doctrine\Common\Collections\Collection<int, Appellation>

View File

@@ -46,7 +46,7 @@ class EntityWorkflowStep
private string $comment = ''; private string $comment = '';
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)]
private ?string $currentStep = ''; private ?string $currentStep = null;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
private array $destEmail = []; private array $destEmail = [];