Rector: apply rules for doctrine code quality

This commit is contained in:
2023-08-31 10:35:52 +02:00
parent bc9b7b1776
commit e4e52234ad
32 changed files with 74 additions and 92 deletions

View File

@@ -25,11 +25,9 @@ use Doctrine\ORM\Mapping as ORM;
class RecurringTask extends AbstractTask
{
/**
* @var DateTime
*
* @ORM\Column(name="first_occurence_end_date", type="date")
*/
private $firstOccurenceEndDate;
private ?\DateTime $firstOccurenceEndDate = null;
/**
* @var int
@@ -38,21 +36,19 @@ class RecurringTask extends AbstractTask
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
private ?int $id = null;
/**
* @var DateTime
*
* @ORM\Column(name="last_occurence_end_date", type="date")
*/
private $lastOccurenceEndDate;
private ?\DateTime $lastOccurenceEndDate = null;
/**
* @var string
*
* @ORM\Column(name="occurence_frequency", type="string", length=255)
*/
private $occurenceFrequency;
private ?string $occurenceFrequency = null;
/**
*

View File

@@ -46,13 +46,11 @@ use Symfony\Component\Validator\Constraints as Assert;
class SingleTask extends AbstractTask
{
/**
* @var DateTime
*
* @ORM\Column(name="end_date", type="date", nullable=true)
* @Assert\Date
* @Serializer\Groups({"read"})
*/
private $endDate;
private ?\DateTime $endDate = null;
/**
* @var int
@@ -62,7 +60,7 @@ class SingleTask extends AbstractTask
* @ORM\GeneratedValue(strategy="AUTO")
* @Serializer\Groups({"read"})
*/
private $id;
private ?int $id = null;
/**
* @ORM\ManyToOne(
@@ -73,7 +71,6 @@ class SingleTask extends AbstractTask
private ?\Chill\TaskBundle\Entity\RecurringTask $recurringTask = null;
/**
* @var DateTime
*
* @ORM\Column(name="start_date", type="date", nullable=true)
* @Serializer\Groups({"read"})
@@ -89,7 +86,7 @@ class SingleTask extends AbstractTask
* message="The start date must be before warning date"
* )
*/
private $startDate;
private ?\DateTime $startDate = null;
/**
* @var Collection<SingleTaskPlaceEvent>

View File

@@ -48,7 +48,7 @@ class AbstractTaskPlaceEvent
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
private ?int $id = null;
/**
* @ORM\Column(name="transition", type="string", length=255)

View File

@@ -38,7 +38,7 @@ class SingleTaskPlaceEvent extends AbstractTaskPlaceEvent
* inversedBy="taskPlaceEvents"
* )
*/
protected $task;
protected ?\Chill\TaskBundle\Entity\SingleTask $task = null;
public function getTask(): SingleTask
{