mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -16,12 +16,13 @@ use Chill\PersonBundle\Entity\SocialWork\Result;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use LogicException;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_person_accompanying_period_work_goal")
|
||||
*
|
||||
* @Serializer\DiscriminatorMap(
|
||||
* typeProperty="type",
|
||||
* mapping={
|
||||
@@ -38,6 +39,7 @@ class AccompanyingPeriodWorkGoal
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Goal::class)
|
||||
*
|
||||
* @Serializer\Groups({"accompanying_period_work:edit"})
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
@@ -45,14 +47,18 @@ class AccompanyingPeriodWorkGoal
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
*
|
||||
* @Serializer\Groups({"accompanying_period_work:edit"})
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
@@ -60,8 +66,11 @@ class AccompanyingPeriodWorkGoal
|
||||
|
||||
/**
|
||||
* @var Collection<Result>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=Result::class, inversedBy="accompanyingPeriodWorkGoals")
|
||||
*
|
||||
* @ORM\JoinTable(name="chill_person_accompanying_period_work_goal_result")
|
||||
*
|
||||
* @Serializer\Groups({"accompanying_period_work:edit"})
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
*/
|
||||
@@ -123,7 +132,7 @@ class AccompanyingPeriodWorkGoal
|
||||
&& $accompanyingPeriodWork !== $this->accompanyingPeriodWork
|
||||
&& null !== $accompanyingPeriodWork
|
||||
) {
|
||||
throw new LogicException('Change accompanying period work is not allowed');
|
||||
throw new \LogicException('Change accompanying period work is not allowed');
|
||||
}
|
||||
|
||||
$this->accompanyingPeriodWork = $accompanyingPeriodWork;
|
||||
|
Reference in New Issue
Block a user