cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,31 +1,59 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\TaskBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\Person;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\HasCenterInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistency;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use function array_fill_keys;
use function array_keys;
/**
* AbstractTask
* AbstractTask.
*
* @ORM\MappedSuperclass()
* @ORM\MappedSuperclass
*/
abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
{
/**
* @var User
* @ORM\ManyToOne(
* targetEntity="\Chill\MainBundle\Entity\User"
* )
*/
private $assignee;
/**
* @var string
*
* @ORM\Column(name="type", type="string", length=255)
* @var Scope
* @ORM\ManyToOne(
* targetEntity="\Chill\MainBundle\Entity\Scope"
* )
*/
private $type;
private $circle;
/**
* @var bool
* @ORM\Column(name="closed", type="boolean", options={ "default": false })
*/
private $closed = false;
/**
* @var AccompanyingPeriod
* @ORM\ManyToOne(targetEntity="\Chill\PersonBundle\Entity\AccompanyingPeriod")
*/
private $course;
/**
* @var json
@@ -34,78 +62,111 @@ abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
*/
private $currentStates = [];
/**
* @var string
*
* @ORM\Column(name="description", type="text")
*/
private $description = '';
/**
* @var Person
* @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\Person"
* )
*/
private $person;
/**
* @var string
*
* @ORM\Column(name="title", type="text")
* @Assert\NotBlank()
* @Assert\NotBlank
*/
private $title = '';
/**
* @var string
*
* @ORM\Column(name="description", type="text")
* @ORM\Column(name="type", type="string", length=255)
*/
private $description = '';
private $type;
/**
*
* @var User
* @ORM\ManyToOne(
* targetEntity="\Chill\MainBundle\Entity\User"
* )
*/
private $assignee;
/**
*
* @var Person
* @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\Person"
* )
*/
private $person;
/**
* @var AccompanyingPeriod
* @ORM\ManyToOne(targetEntity="\Chill\PersonBundle\Entity\AccompanyingPeriod")
*/
private $course;
/**
*
* @var Scope
* @ORM\ManyToOne(
* targetEntity="\Chill\MainBundle\Entity\Scope"
* )
*/
private $circle;
/**
* @var boolean
* @ORM\Column(name="closed", type="boolean", options={ "default"=false })
*/
private $closed = false;
/**
* Set type
*
* @param string $type
*
* @return AbstractTask
*/
public function setType($type)
public function getAssignee(): ?User
{
$this->type = (string) $type;
return $this->assignee;
}
return $this;
public function getCenter(): ?\Chill\MainBundle\Entity\Center
{
if ($this->getPerson() instanceof Person) {
return $this->getPerson()->getCenter();
}
return $this->getCourse()->getCenter();
return null;
}
public function getCircle(): ?Scope
{
return $this->circle;
}
public function getContext()
{
return $this->getPerson() ?? $this->getCourse();
}
public function getCourse(): ?AccompanyingPeriod
{
return $this->course;
}
/**
* Get type
* Get currentStates.
*
* The states are returned as required by marking store format.
*
* @return array
*/
public function getCurrentStates()
{
return array_fill_keys($this->currentStates, 1);
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
public function getPerson(): ?Person
{
return $this->person;
}
public function getScope(): ?Scope
{
return $this->getCircle();
}
/**
* Get title.
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Get type.
*
* @return string
*/
@@ -114,8 +175,39 @@ abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
return $this->type;
}
public function isClosed(): bool
{
return $this->closed;
}
public function setAssignee(?User $assignee = null)
{
$this->assignee = $assignee;
return $this;
}
public function setCircle(Scope $circle)
{
$this->circle = $circle;
return $this;
}
public function setClosed(bool $closed)
{
$this->closed = $closed;
}
public function setCourse(AccompanyingPeriod $course)
{
$this->course = $course;
return $this;
}
/**
* Set currentStates
* Set currentStates.
*
* The current states are sorted in a single array, non associative.
*
@@ -125,25 +217,34 @@ abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
*/
public function setCurrentStates($currentStates)
{
$this->currentStates = \array_keys($currentStates);
$this->currentStates = array_keys($currentStates);
return $this;
}
/**
* Get currentStates
* Set description.
*
* The states are returned as required by marking store format.
* @param string $description
*
* @return array
* @return AbstractTask
*/
public function getCurrentStates()
public function setDescription($description)
{
return \array_fill_keys($this->currentStates, 1);
$this->description = (string) $description;
return $this;
}
public function setPerson(Person $person)
{
$this->person = $person;
return $this;
}
/**
* Set title
* Set title.
*
* @param string $title
*
@@ -157,120 +258,16 @@ abstract class AbstractTask implements HasScopeInterface, HasCenterInterface
}
/**
* Get title
* Set type.
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set description
*
* @param string $description
* @param string $type
*
* @return AbstractTask
*/
public function setDescription($description)
public function setType($type)
{
$this->description = (string) $description;
$this->type = (string) $type;
return $this;
}
/**
* Get description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
public function getAssignee(): ?User
{
return $this->assignee;
}
public function getPerson(): ?Person
{
return $this->person;
}
public function getCourse(): ?AccompanyingPeriod
{
return $this->course;
}
public function getCircle(): ?Scope
{
return $this->circle;
}
public function setAssignee(User $assignee = null)
{
$this->assignee = $assignee;
return $this;
}
public function setPerson(Person $person)
{
$this->person = $person;
return $this;
}
public function setCourse(AccompanyingPeriod $course)
{
$this->course = $course;
return $this;
}
public function setCircle(Scope $circle)
{
$this->circle = $circle;
return $this;
}
public function getCenter(): ?\Chill\MainBundle\Entity\Center
{
if ($this->getPerson() instanceof Person) {
return $this->getPerson()->getCenter();
} else {
return $this->getCourse()->getCenter();
}
return null;
}
public function getContext()
{
return $this->getPerson() ?? $this->getCourse();
}
public function getScope(): ?\Chill\MainBundle\Entity\Scope
{
return $this->getCircle();
}
/**
* @return bool
*/
public function isClosed(): bool
{
return $this->closed;
}
/**
*
* @param bool $closed
*/
public function setClosed(bool $closed)
{
$this->closed = $closed;
}
}

View File

@@ -1,20 +1,35 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\TaskBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* RecurringTask
* RecurringTask.
*
* @ORM\Table(name="chill_task.recurring_task")
* @ORM\Entity(repositoryClass="Chill\TaskBundle\Repository\RecurringTaskRepository")
*/
class RecurringTask extends AbstractTask
{
/**
* @var DateTime
*
* @ORM\Column(name="first_occurence_end_date", type="date")
*/
private $firstOccurenceEndDate;
/**
* @var int
*
@@ -25,14 +40,7 @@ class RecurringTask extends AbstractTask
private $id;
/**
* @var \DateTime
*
* @ORM\Column(name="first_occurence_end_date", type="date")
*/
private $firstOccurenceEndDate;
/**
* @var \DateTime
* @var DateTime
*
* @ORM\Column(name="last_occurence_end_date", type="date")
*/
@@ -58,27 +66,34 @@ class RecurringTask extends AbstractTask
* @ORM\Column(name="occurence_warning_interval", type="dateinterval", nullable=true)
*/
private $occurenceWarningInterval;
/**
*
* @var Collection
*
*
* @ORM\OneToMany(
* targetEntity="SingleTask",
* mappedBy="recurringTask"
* targetEntity="SingleTask",
* mappedBy="recurringTask"
* )
*/
private $singleTasks;
public function __construct()
{
$this->singleTasks = new ArrayCollection();
}
/**
* Get id
* Get firstOccurenceEndDate.
*
* @return DateTime
*/
public function getFirstOccurenceEndDate()
{
return $this->firstOccurenceEndDate;
}
/**
* Get id.
*
* @return int
*/
@@ -88,9 +103,49 @@ class RecurringTask extends AbstractTask
}
/**
* Set firstOccurenceEndDate
* Get lastOccurenceEndDate.
*
* @param \DateTime $firstOccurenceEndDate
* @return DateTime
*/
public function getLastOccurenceEndDate()
{
return $this->lastOccurenceEndDate;
}
/**
* Get occurenceFrequency.
*
* @return string
*/
public function getOccurenceFrequency()
{
return $this->occurenceFrequency;
}
/**
* Get occurenceStartDate.
*
* @return dateinterval
*/
public function getOccurenceStartDate()
{
return $this->occurenceStartDate;
}
/**
* Get occurenceWarningInterval.
*
* @return dateinterval
*/
public function getOccurenceWarningInterval()
{
return $this->occurenceWarningInterval;
}
/**
* Set firstOccurenceEndDate.
*
* @param DateTime $firstOccurenceEndDate
*
* @return RecurringTask
*/
@@ -102,19 +157,9 @@ class RecurringTask extends AbstractTask
}
/**
* Get firstOccurenceEndDate
* Set lastOccurenceEndDate.
*
* @return \DateTime
*/
public function getFirstOccurenceEndDate()
{
return $this->firstOccurenceEndDate;
}
/**
* Set lastOccurenceEndDate
*
* @param \DateTime $lastOccurenceEndDate
* @param DateTime $lastOccurenceEndDate
*
* @return RecurringTask
*/
@@ -126,17 +171,7 @@ class RecurringTask extends AbstractTask
}
/**
* Get lastOccurenceEndDate
*
* @return \DateTime
*/
public function getLastOccurenceEndDate()
{
return $this->lastOccurenceEndDate;
}
/**
* Set occurenceFrequency
* Set occurenceFrequency.
*
* @param string $occurenceFrequency
*
@@ -150,17 +185,7 @@ class RecurringTask extends AbstractTask
}
/**
* Get occurenceFrequency
*
* @return string
*/
public function getOccurenceFrequency()
{
return $this->occurenceFrequency;
}
/**
* Set occurenceStartDate
* Set occurenceStartDate.
*
* @param dateinterval $occurenceStartDate
*
@@ -174,17 +199,7 @@ class RecurringTask extends AbstractTask
}
/**
* Get occurenceStartDate
*
* @return dateinterval
*/
public function getOccurenceStartDate()
{
return $this->occurenceStartDate;
}
/**
* Set occurenceWarningInterval
* Set occurenceWarningInterval.
*
* @param dateinterval $occurenceWarningInterval
*
@@ -196,15 +211,4 @@ class RecurringTask extends AbstractTask
return $this;
}
/**
* Get occurenceWarningInterval
*
* @return dateinterval
*/
public function getOccurenceWarningInterval()
{
return $this->occurenceWarningInterval;
}
}

View File

@@ -1,36 +1,54 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\TaskBundle\Entity;
use DateInterval;
use DateTime;
use DateTimeImmutable;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\Common\Collections\Collection;
/**
* SingleTask
* SingleTask.
*
* @ORM\Table(
* name="chill_task.single_task",
* indexes={
* @ORM\Index(
* name="by_type",
* columns={ "type" }
* ),
* @ORM\Index(
* name="by_current_state",
* columns={ "current_states" }
* ),
* @ORM\Index(
* name="by_end_date",
* columns={ "end_date" }
* )
* }
* name="chill_task.single_task",
* indexes={
* @ORM\Index(
* name="by_type",
* columns={ "type" }
* ),
* @ORM\Index(
* name="by_current_state",
* columns={ "current_states" }
* ),
* @ORM\Index(
* name="by_end_date",
* columns={ "end_date" }
* )
* }
* )
* @ORM\Entity(repositoryClass="Chill\TaskBundle\Repository\SingleTaskRepository")
*/
class SingleTask extends AbstractTask
{
/**
* @var DateTime
*
* @ORM\Column(name="end_date", type="date", nullable=true)
* @Assert\Date
*/
private $endDate;
/**
* @var int
*
@@ -41,75 +59,72 @@ class SingleTask extends AbstractTask
private $id;
/**
* @var \DateTime
*
* @ORM\Column(name="start_date", type="date", nullable=true)
* @Assert\Date()
*
* @Assert\Expression(
* "value === null or this.getEndDate() === null or value < this.getEndDate()",
* message="The start date must be before the end date"
* )
*
* @Assert\Expression(
* "value === null or this.getWarningDate() === null or this.getWarningDate() > this.getStartDate()",
* message="The start date must be before warning date"
* )
*/
private $startDate;
/**
* @var \DateTime
*
* @ORM\Column(name="end_date", type="date", nullable=true)
* @Assert\Date()
*/
private $endDate;
/**
* @var \DateInterval
* and this.getEndDate() === null
*
* @ORM\Column(name="warning_interval", type="dateinterval", nullable=true)
*
* @Assert\Expression(
* "!(value != null and this.getEndDate() == null)",
* message="An end date is required if a warning interval is set"
* )
*
*
*/
private $warningInterval;
/**
*
* @var RecurringTask
* @ORM\ManyToOne(
* targetEntity="RecurringTask",
* inversedBy="singleTasks"
* targetEntity="RecurringTask",
* inversedBy="singleTasks"
* )
*/
private $recurringTask;
/**
* @var DateTime
*
* @ORM\Column(name="start_date", type="date", nullable=true)
* @Assert\Date
*
* @Assert\Expression(
* "value === null or this.getEndDate() === null or value < this.getEndDate()",
* message="The start date must be before the end date"
* )
*
* @Assert\Expression(
* "value === null or this.getWarningDate() === null or this.getWarningDate() > this.getStartDate()",
* message="The start date must be before warning date"
* )
*/
private $startDate;
/**
* @var \Doctrine\Common\Collections\Collection
* @ORM\OneToMany(
* targetEntity="\Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent",
* mappedBy="task",
* cascade={ "remove" }
* targetEntity="\Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent",
* mappedBy="task",
* cascade={ "remove" }
* )
*/
private $taskPlaceEvents;
/**
* @var DateInterval
* and this.getEndDate() === null
*
* @ORM\Column(name="warning_interval", type="dateinterval", nullable=true)
*
* @Assert\Expression(
* "!(value != null and this.getEndDate() == null)",
* message="An end date is required if a warning interval is set"
* )
*/
private $warningInterval;
public function __construct()
{
$this->taskPlaceEvents = new ArrayCollection();
}
/**
* Get endDate.
*
* @return DateTime
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* Get id
* Get id.
*
* @return int
*/
@@ -118,85 +133,33 @@ class SingleTask extends AbstractTask
return $this->id;
}
/**
* Set startDate
*
* @param \DateTime $startDate
*
* @return SingleTask
*/
public function setStartDate($startDate)
public function getRecurringTask(): RecurringTask
{
$this->startDate = $startDate;
return $this;
return $this->recurringTask;
}
/**
* Get startDate
* Get startDate.
*
* @return \DateTime
* @return DateTime
*/
public function getStartDate()
{
return $this->startDate;
}
/**
* Set endDate
*
* @param \DateTime $endDate
*
* @return SingleTask
*/
public function setEndDate($endDate)
public function getTaskPlaceEvents(): Collection
{
$this->endDate = $endDate;
return $this;
}
/**
* Get endDate
*
* @return \DateTime
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* Set warningInterval
*
* @param string $warningInterval
*
* @return SingleTask
*/
public function setWarningInterval($warningInterval)
{
$this->warningInterval = $warningInterval;
return $this;
}
/**
* Get warningInterval
*
* @return \DateInterval
*/
public function getWarningInterval()
{
return $this->warningInterval;
return $this->taskPlaceEvents;
}
/**
* Get the Warning date, computed from the difference between the
* end date and the warning interval
* end date and the warning interval.
*
* Return null if warningDate or endDate is null
*
* @return \DateTimeImmutable
* @return DateTimeImmutable
*/
public function getWarningDate()
{
@@ -208,23 +171,51 @@ class SingleTask extends AbstractTask
return null;
}
return \DateTimeImmutable::createFromMutable($this->getEndDate())
return DateTimeImmutable::createFromMutable($this->getEndDate())
->sub($this->getWarningInterval());
}
function getRecurringTask(): RecurringTask
/**
* Get warningInterval.
*
* @return DateInterval
*/
public function getWarningInterval()
{
return $this->recurringTask;
return $this->warningInterval;
}
function setRecurringTask(RecurringTask $recurringTask)
/**
* Set endDate.
*
* @param DateTime $endDate
*
* @return SingleTask
*/
public function setEndDate($endDate)
{
$this->endDate = $endDate;
return $this;
}
public function setRecurringTask(RecurringTask $recurringTask)
{
$this->recurringTask = $recurringTask;
}
public function getTaskPlaceEvents(): Collection
/**
* Set startDate.
*
* @param DateTime $startDate
*
* @return SingleTask
*/
public function setStartDate($startDate)
{
return $this->taskPlaceEvents;
$this->startDate = $startDate;
return $this;
}
public function setTaskPlaceEvents(Collection $taskPlaceEvents)
@@ -233,5 +224,18 @@ class SingleTask extends AbstractTask
return $this;
}
}
/**
* Set warningInterval.
*
* @param string $warningInterval
*
* @return SingleTask
*/
public function setWarningInterval($warningInterval)
{
$this->warningInterval = $warningInterval;
return $this;
}
}

View File

@@ -1,17 +1,47 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\TaskBundle\Entity\Task;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Entity\User;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
/**
* AbstractTaskPlaceEvent
* AbstractTaskPlaceEvent.
*
* @ORM\MappedSuperclass()
* @ORM\MappedSuperclass
*/
class AbstractTaskPlaceEvent
{
/**
* @var User
* @ORM\ManyToOne(
* targetEntity="\Chill\MainBundle\Entity\User"
* )
*/
private $author;
/**
* @var string
*
* @ORM\Column(name="data", type="json")
*/
private $data = [];
/**
* @var datetime_immutable
*
* @ORM\Column(name="datetime", type="datetime_immutable")
*/
private $datetime;
/**
* @var int
*
@@ -21,13 +51,6 @@ class AbstractTaskPlaceEvent
*/
private $id;
/**
* @var datetime_immutable
*
* @ORM\Column(name="datetime", type="datetime_immutable")
*/
private $datetime;
/**
* @var string
*
@@ -35,49 +58,24 @@ class AbstractTaskPlaceEvent
*/
private $transition = '';
/**
* @var string
*
* @ORM\Column(name="data", type="json")
*/
private $data = [];
/**
*
* @var User
* @ORM\ManyToOne(
* targetEntity="\Chill\MainBundle\Entity\User"
* )
*/
private $author;
public function __construct()
{
$this->datetime = new \DateTimeImmutable('now');
$this->datetime = new DateTimeImmutable('now');
}
/**
* Get id.
*
* @return int
*/
public function getId()
public function getAuthor(): User
{
return $this->id;
return $this->author;
}
/**
* Set datetime.
* Get data.
*
* @param datetime_immutable $datetime
*
* @return AbstractTaskPlaceEvent
* @return string
*/
public function setDatetime($datetime)
public function getData()
{
$this->datetime = $datetime;
return $this;
return $this->data;
}
/**
@@ -91,17 +89,13 @@ class AbstractTaskPlaceEvent
}
/**
* Set transition.
* Get id.
*
* @param string $transition
*
* @return AbstractTaskPlaceEvent
* @return int
*/
public function setTransition($transition)
public function getId()
{
$this->transition = $transition;
return $this;
return $this->id;
}
/**
@@ -114,6 +108,13 @@ class AbstractTaskPlaceEvent
return $this->transition;
}
public function setAuthor(User $author)
{
$this->author = $author;
return $this;
}
/**
* Set data.
*
@@ -129,26 +130,30 @@ class AbstractTaskPlaceEvent
}
/**
* Get data.
* Set datetime.
*
* @return string
* @param datetime_immutable $datetime
*
* @return AbstractTaskPlaceEvent
*/
public function getData()
public function setDatetime($datetime)
{
return $this->data;
}
public function getAuthor(): User
{
return $this->author;
}
$this->datetime = $datetime;
public function setAuthor(User $author)
{
$this->author = $author;
return $this;
}
/**
* Set transition.
*
* @param string $transition
*
* @return AbstractTaskPlaceEvent
*/
public function setTransition($transition)
{
$this->transition = $transition;
return $this;
}
}

View File

@@ -1,56 +1,43 @@
<?php
/*
* Copyright (C) 2018 Champs Libres Cooperative <info@champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\TaskBundle\Entity\Task;
use Doctrine\ORM\Mapping as ORM;
use Chill\TaskBundle\Entity\SingleTask;
/**
*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\TaskBundle\Entity\Task;
use Chill\TaskBundle\Entity\SingleTask;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(
* name="chill_task.single_task_place_event",
* indexes={
* @ORM\Index(
* name="transition_task_date",
* columns={"task_id", "transition", "datetime"}
* ),
* @ORM\Index(
* name="transition_task",
* columns={"task_id", "transition"}
* )
* })
* @ORM\Entity()
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
* name="chill_task.single_task_place_event",
* indexes={
* @ORM\Index(
* name="transition_task_date",
* columns={"task_id", "transition", "datetime"}
* ),
* @ORM\Index(
* name="transition_task",
* columns={"task_id", "transition"}
* )
* })
* @ORM\Entity
*/
class SingleTaskPlaceEvent extends AbstractTaskPlaceEvent
{
/**
*
* @var SingleTask
* @ORM\ManyToOne(
* targetEntity="\Chill\TaskBundle\Entity\SingleTask",
* inversedBy="taskPlaceEvents"
* targetEntity="\Chill\TaskBundle\Entity\SingleTask",
* inversedBy="taskPlaceEvents"
* )
*/
protected $task;
public function getTask(): SingleTask
{
return $this->task;
@@ -59,9 +46,7 @@ class SingleTaskPlaceEvent extends AbstractTaskPlaceEvent
public function setTask(SingleTask $task)
{
$this->task = $task;
return $this;
}
}