mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -17,8 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* RecurringTask.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: \Chill\TaskBundle\Repository\RecurringTaskRepository::class)]
|
||||
#[ORM\Table(name: 'chill_task.recurring_task')]
|
||||
@@ -27,7 +25,6 @@ class RecurringTask extends AbstractTask
|
||||
#[ORM\Column(name: 'first_occurence_end_date', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE)]
|
||||
private ?\DateTime $firstOccurenceEndDate = null;
|
||||
|
||||
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
@@ -48,7 +45,7 @@ class RecurringTask extends AbstractTask
|
||||
/**
|
||||
* @var Collection<SingleTask>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: \SingleTask::class, mappedBy: 'recurringTask')]
|
||||
#[ORM\OneToMany(targetEntity: SingleTask::class, mappedBy: 'recurringTask')]
|
||||
private Collection $singleTasks;
|
||||
|
||||
public function __construct()
|
||||
|
@@ -13,7 +13,6 @@ namespace Chill\TaskBundle\Entity;
|
||||
|
||||
use Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent;
|
||||
use Chill\TaskBundle\Repository\SingleTaskRepository;
|
||||
use DateInterval;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@@ -22,12 +21,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* SingleTask.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: SingleTaskRepository::class)]
|
||||
#[ORM\Table(name: 'chill_task.single_task')]
|
||||
@@ -41,7 +34,6 @@ class SingleTask extends AbstractTask
|
||||
#[ORM\Column(name: 'end_date', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
|
||||
private ?\DateTime $endDate = null;
|
||||
|
||||
|
||||
#[Serializer\Groups(['read'])]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\Id]
|
||||
|
@@ -55,10 +55,8 @@ class AbstractTaskPlaceEvent
|
||||
|
||||
/**
|
||||
* Get datetime.
|
||||
*
|
||||
* @return datetime_immutable
|
||||
*/
|
||||
public function getDatetime()
|
||||
public function getDatetime(): \DateTimeImmutable
|
||||
{
|
||||
return $this->datetime;
|
||||
}
|
||||
@@ -95,11 +93,9 @@ class AbstractTaskPlaceEvent
|
||||
/**
|
||||
* Set datetime.
|
||||
*
|
||||
* @param datetime_immutable $datetime
|
||||
*
|
||||
* @return AbstractTaskPlaceEvent
|
||||
*/
|
||||
public function setDatetime($datetime)
|
||||
public function setDatetime(\DateTimeImmutable $datetime)
|
||||
{
|
||||
$this->datetime = $datetime;
|
||||
|
||||
|
@@ -14,14 +14,12 @@ namespace Chill\TaskBundle\Entity\Task;
|
||||
use Chill\TaskBundle\Entity\SingleTask;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_task.single_task_place_event')]
|
||||
#[ORM\Index(name: 'transition_task_date', columns: ['task_id', 'transition', 'datetime'])]
|
||||
#[ORM\Index(name: 'transition_task', columns: ['task_id', 'transition'])]
|
||||
class SingleTaskPlaceEvent extends AbstractTaskPlaceEvent
|
||||
{
|
||||
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
|
Reference in New Issue
Block a user