set typed ?string properties to '= null'

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

View File

@ -29,7 +29,7 @@ class Frein implements HasPerson, \Stringable
#[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null;
#[ORM\Column(name: 'reportDate', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE)]
#[Assert\NotNull]
#[Assert\GreaterThan('5 years ago', message: 'La date du rapport ne peut pas être plus de cinq ans dans le passé')]
@ -52,7 +52,7 @@ class Frein implements HasPerson, \Stringable
private $freinsPerso = [];
#[ORM\Column(name: 'notesPerso', type: \Doctrine\DBAL\Types\Types::TEXT)]
private ?string $notesPerso = '';
private ?string $notesPerso = null;
public const FREINS_EMPLOI = [
'garde_d_enfants',
@ -70,7 +70,7 @@ class Frein implements HasPerson, \Stringable
private $freinsEmploi = [];
#[ORM\Column(name: 'notesEmploi', type: \Doctrine\DBAL\Types\Types::TEXT)]
private ?string $notesEmploi = '';
private ?string $notesEmploi = null;
#[ORM\ManyToOne(targetEntity: Person::class)]
#[Assert\NotNull]

View File

@ -26,10 +26,10 @@ class Appellation implements \Stringable
private ?int $id = null;
#[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)]
private ?string $libelle = '';
private ?string $libelle = null;
#[ORM\ManyToOne(targetEntity: Metier::class, inversedBy: 'appellations', cascade: ['persist'])]
private ?Metier $metier = null;

View File

@ -27,10 +27,10 @@ class Metier
private ?int $id = null;
#[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)]
private ?string $code = '';
private ?string $code = null;
/**
* @var \Doctrine\Common\Collections\Collection<int, Appellation>

View File

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