Apply rector rules: symfony up to 54

This commit is contained in:
2024-04-04 23:30:25 +02:00
parent 1ee3b9e2f0
commit 579bd829f8
204 changed files with 974 additions and 2346 deletions

View File

@@ -24,11 +24,8 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\Entity
*
* @ORM\Table(name="chill_person_accompanying_period_comment")
*
* @DiscriminatorMap(typeProperty="type", mapping={
* "accompanying_period_comment": Comment::class
* })
*/
#[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_comment' => Comment::class])]
class Comment implements TrackCreationInterface, TrackUpdateInterface
{
/**
@@ -42,29 +39,24 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
/**
* @ORM\Column(type="text", nullable=false, options={"default":""})
*
* @Groups({"read", "write", "docgen:read"})
*
* @Assert\NotBlank
*
* @Assert\NotNull
*/
#[Groups(['read', 'write', 'docgen:read'])]
#[Assert\NotBlank]
#[Assert\NotNull]
private string $content = '';
/**
* @ORM\Column(type="datetime")
*
* @Groups({"read", "docgen:read"})
*/
#[Groups(['read', 'docgen:read'])]
private ?\DateTimeInterface $createdAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*
* @ORM\JoinColumn(nullable=false)
*
* @Groups({"read", "docgen:read"})
*/
#[Groups(['read', 'docgen:read'])]
private ?User $creator = null;
/**
@@ -73,25 +65,22 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*
* @Groups({"read", "docgen:read"})
*/
#[Groups(['read', 'docgen:read'])]
private ?int $id = null;
/**
* @ORM\Column(type="datetime")
*
* @Groups({"read"})
*/
#[Groups(['read'])]
private ?\DateTimeInterface $updatedAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*
* @ORM\JoinColumn(nullable=false)
*
* @Groups({"read"})
*/
#[Groups(['read'])]
private ?User $updatedBy = null;
public function getAccompanyingPeriod(): ?AccompanyingPeriod