mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
Rector: apply rules for doctrine code quality
This commit is contained in:
@@ -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;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -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>
|
||||
|
@@ -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)
|
||||
|
@@ -38,7 +38,7 @@ class SingleTaskPlaceEvent extends AbstractTaskPlaceEvent
|
||||
* inversedBy="taskPlaceEvents"
|
||||
* )
|
||||
*/
|
||||
protected $task;
|
||||
protected ?\Chill\TaskBundle\Entity\SingleTask $task = null;
|
||||
|
||||
public function getTask(): SingleTask
|
||||
{
|
||||
|
Reference in New Issue
Block a user