mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -19,7 +19,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_person_social_work_evaluation")
|
||||
*
|
||||
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "social_work_evaluation": Evaluation::class
|
||||
* })
|
||||
@@ -33,26 +35,32 @@ class Evaluation
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="dateinterval", nullable=true, options={"default": null})
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private ?DateInterval $delay = null;
|
||||
private ?\DateInterval $delay = null;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="dateinterval", nullable=true, options={"default": null})
|
||||
*
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private ?DateInterval $notificationDelay = null;
|
||||
private ?\DateInterval $notificationDelay = null;
|
||||
|
||||
/**
|
||||
* @var Collection<SocialAction>
|
||||
*
|
||||
* @ORM\ManyToMany(
|
||||
* targetEntity=SocialAction::class,
|
||||
* mappedBy="evaluations"
|
||||
@@ -62,13 +70,16 @@ class Evaluation
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
private array $title = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?string $url = null;
|
||||
@@ -90,7 +101,7 @@ class Evaluation
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDelay(): ?DateInterval
|
||||
public function getDelay(): ?\DateInterval
|
||||
{
|
||||
return $this->delay;
|
||||
}
|
||||
@@ -100,7 +111,7 @@ class Evaluation
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getNotificationDelay(): ?DateInterval
|
||||
public function getNotificationDelay(): ?\DateInterval
|
||||
{
|
||||
return $this->notificationDelay;
|
||||
}
|
||||
@@ -146,14 +157,14 @@ class Evaluation
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDelay(?DateInterval $delay): self
|
||||
public function setDelay(?\DateInterval $delay): self
|
||||
{
|
||||
$this->delay = $delay;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setNotificationDelay(?DateInterval $notificationDelay): self
|
||||
public function setNotificationDelay(?\DateInterval $notificationDelay): self
|
||||
{
|
||||
$this->notificationDelay = $notificationDelay;
|
||||
|
||||
|
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Entity\SocialWork;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@@ -19,7 +18,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_person_social_work_goal")
|
||||
*
|
||||
* @Serializer\DiscriminatorMap(
|
||||
* typeProperty="type",
|
||||
* mapping={
|
||||
@@ -36,28 +37,36 @@ class Goal
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var Collection<Result>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=Result::class, inversedBy="goals")
|
||||
*
|
||||
* @ORM\JoinTable(name="chill_person_social_work_goal_result")
|
||||
*/
|
||||
private Collection $results;
|
||||
|
||||
/**
|
||||
* @var Collection<SocialAction>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=SocialAction::class, mappedBy="goals")
|
||||
*/
|
||||
private Collection $socialActions;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
private array $title = [];
|
||||
@@ -86,7 +95,7 @@ class Goal
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDesactivationDate(): ?DateTimeInterface
|
||||
public function getDesactivationDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->desactivationDate;
|
||||
}
|
||||
@@ -131,7 +140,7 @@ class Goal
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDesactivationDate(?DateTimeInterface $desactivationDate): self
|
||||
public function setDesactivationDate(?\DateTimeInterface $desactivationDate): self
|
||||
{
|
||||
$this->desactivationDate = $desactivationDate;
|
||||
|
||||
|
@@ -14,7 +14,6 @@ namespace Chill\PersonBundle\Entity\SocialWork;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkGoal;
|
||||
use DateTime;
|
||||
use DateTimeInterface;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@@ -22,7 +21,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_person_social_work_result")
|
||||
*
|
||||
* @Serializer\DiscriminatorMap(
|
||||
* typeProperty="type",
|
||||
* mapping={
|
||||
@@ -34,12 +35,14 @@ class Result
|
||||
{
|
||||
/**
|
||||
* @var Collection<AccompanyingPeriodWorkGoal>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWorkGoal::class, mappedBy="results")
|
||||
*/
|
||||
private Collection $accompanyingPeriodWorkGoals;
|
||||
|
||||
/**
|
||||
* @var Collection<AccompanyingPeriodWork>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWork::class, mappedBy="results")
|
||||
*/
|
||||
private Collection $accompanyingPeriodWorks;
|
||||
@@ -47,31 +50,38 @@ class Result
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
private ?DateTime $desactivationDate = null;
|
||||
private ?\DateTime $desactivationDate = null;
|
||||
|
||||
/**
|
||||
* @var Collection<Goal>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=Goal::class, mappedBy="results")
|
||||
*/
|
||||
private Collection $goals;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var Collection<SocialAction>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=SocialAction::class, mappedBy="results")
|
||||
*/
|
||||
private Collection $socialActions;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
private array $title = [];
|
||||
@@ -136,7 +146,7 @@ class Result
|
||||
return $this->accompanyingPeriodWorks;
|
||||
}
|
||||
|
||||
public function getDesactivationDate(): ?DateTimeInterface
|
||||
public function getDesactivationDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->desactivationDate;
|
||||
}
|
||||
@@ -195,7 +205,7 @@ class Result
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDesactivationDate(?DateTimeInterface $desactivationDate): self
|
||||
public function setDesactivationDate(?\DateTimeInterface $desactivationDate): self
|
||||
{
|
||||
$this->desactivationDate = $desactivationDate;
|
||||
|
||||
|
@@ -12,7 +12,6 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Entity\SocialWork;
|
||||
|
||||
use DateInterval;
|
||||
use DateTimeInterface;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\ReadableCollection;
|
||||
@@ -21,7 +20,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_person_social_action")
|
||||
*
|
||||
* @Serializer\DiscriminatorMap(
|
||||
* typeProperty="type",
|
||||
* mapping={
|
||||
@@ -33,6 +34,7 @@ class SocialAction
|
||||
{
|
||||
/**
|
||||
* @var Collection<SocialAction>
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity=SocialAction::class, mappedBy="parent")
|
||||
*/
|
||||
private Collection $children;
|
||||
@@ -49,21 +51,27 @@ class SocialAction
|
||||
|
||||
/**
|
||||
* @var Collection<Evaluation>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=Evaluation::class, inversedBy="socialActions")
|
||||
*
|
||||
* @ORM\JoinTable(name="chill_person_social_work_evaluation_action")
|
||||
*/
|
||||
private Collection $evaluations;
|
||||
|
||||
/**
|
||||
* @var Collection<Goal>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=Goal::class, inversedBy="socialActions")
|
||||
*
|
||||
* @ORM\JoinTable(name="chill_person_social_action_goal")
|
||||
*/
|
||||
private Collection $goals;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private ?int $id = null;
|
||||
@@ -85,7 +93,9 @@ class SocialAction
|
||||
|
||||
/**
|
||||
* @var Collection<Result>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=Result::class, inversedBy="socialActions")
|
||||
*
|
||||
* @ORM\JoinTable(name="chill_person_social_action_result")
|
||||
*/
|
||||
private Collection $results;
|
||||
@@ -187,12 +197,12 @@ class SocialAction
|
||||
return $this->children;
|
||||
}
|
||||
|
||||
public function getDefaultNotificationDelay(): ?DateInterval
|
||||
public function getDefaultNotificationDelay(): ?\DateInterval
|
||||
{
|
||||
return $this->defaultNotificationDelay;
|
||||
}
|
||||
|
||||
public function getDesactivationDate(): ?DateTimeInterface
|
||||
public function getDesactivationDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->desactivationDate;
|
||||
}
|
||||
@@ -369,14 +379,14 @@ class SocialAction
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDefaultNotificationDelay(DateInterval $defaultNotificationDelay): self
|
||||
public function setDefaultNotificationDelay(\DateInterval $defaultNotificationDelay): self
|
||||
{
|
||||
$this->defaultNotificationDelay = $defaultNotificationDelay;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDesactivationDate(?DateTimeInterface $desactivationDate): self
|
||||
public function setDesactivationDate(?\DateTimeInterface $desactivationDate): self
|
||||
{
|
||||
$this->desactivationDate = $desactivationDate;
|
||||
|
||||
|
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Entity\SocialWork;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@@ -20,7 +19,9 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_person_social_issue")
|
||||
*
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "social_issue": SocialIssue::class
|
||||
* })
|
||||
@@ -29,6 +30,7 @@ class SocialIssue
|
||||
{
|
||||
/**
|
||||
* @var Collection<SocialIssue>
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity=SocialIssue::class, mappedBy="parent")
|
||||
*/
|
||||
private Collection $children;
|
||||
@@ -40,7 +42,9 @@ class SocialIssue
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private ?int $id = null;
|
||||
@@ -57,12 +61,14 @@ class SocialIssue
|
||||
|
||||
/**
|
||||
* @var Collection<SocialAction>
|
||||
*
|
||||
* @ORM\OneToMany(targetEntity=SocialAction::class, mappedBy="issue")
|
||||
*/
|
||||
private Collection $socialActions;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private array $title = [];
|
||||
@@ -76,7 +82,6 @@ class SocialIssue
|
||||
/**
|
||||
* @internal use @see{SocialIssue::setParent} instead
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function addChild(self $child): self
|
||||
@@ -163,7 +168,7 @@ class SocialIssue
|
||||
return $this->children;
|
||||
}
|
||||
|
||||
public function getDesactivationDate(): ?DateTimeInterface
|
||||
public function getDesactivationDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->desactivationDate;
|
||||
}
|
||||
@@ -255,7 +260,7 @@ class SocialIssue
|
||||
|
||||
/**
|
||||
* @return Collection<SocialAction> All the descendant social actions of all
|
||||
* the descendants of the entity
|
||||
* the descendants of the entity
|
||||
*/
|
||||
public function getRecursiveSocialActions(): Collection
|
||||
{
|
||||
@@ -336,7 +341,7 @@ class SocialIssue
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDesactivationDate(?DateTimeInterface $desactivationDate): self
|
||||
public function setDesactivationDate(?\DateTimeInterface $desactivationDate): self
|
||||
{
|
||||
$this->desactivationDate = $desactivationDate;
|
||||
|
||||
|
Reference in New Issue
Block a user