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,7 +1,15 @@
<?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\PersonBundle\Entity\SocialWork;
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
@@ -11,14 +19,19 @@ use Symfony\Component\Serializer\Annotation as Serializer;
* @ORM\Entity
* @ORM\Table(name="chill_person_social_work_goal")
* @Serializer\DiscriminatorMap(
* typeProperty="type",
* mapping={
* "social_work_goal":Goal::class
* }
* )
* typeProperty="type",
* mapping={
* "social_work_goal": Goal::class
* }
* )
*/
class Goal
{
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $desactivationDate;
/**
* @ORM\Id
* @ORM\GeneratedValue
@@ -28,15 +41,10 @@ class Goal
private $id;
/**
* @ORM\Column(type="json")
* @Serializer\Groups({"read"})
* @ORM\ManyToMany(targetEntity=Result::class, inversedBy="goals")
* @ORM\JoinTable(name="chill_person_social_work_goal_result")
*/
private $title = [];
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $desactivationDate;
private $results;
/**
* @ORM\ManyToMany(targetEntity=SocialAction::class, mappedBy="goals")
@@ -44,10 +52,10 @@ class Goal
private $socialActions;
/**
* @ORM\ManyToMany(targetEntity=Result::class, inversedBy="goals")
* @ORM\JoinTable(name="chill_person_social_work_goal_result")
* @ORM\Column(type="json")
* @Serializer\Groups({"read"})
*/
private $results;
private $title = [];
public function __construct()
{
@@ -55,67 +63,6 @@ class Goal
$this->results = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): array
{
return $this->title;
}
public function setTitle(array $title): self
{
$this->title = $title;
return $this;
}
public function getDesactivationDate(): ?\DateTimeInterface
{
return $this->desactivationDate;
}
public function setDesactivationDate(?\DateTimeInterface $desactivationDate): self
{
$this->desactivationDate = $desactivationDate;
return $this;
}
/**
* @return Collection|SocialAction[]
*/
public function getSocialActions(): Collection
{
return $this->socialActions;
}
public function addSocialAction(SocialAction $socialAction): self
{
if (!$this->socialActions->contains($socialAction)) {
$this->socialActions[] = $socialAction;
}
return $this;
}
public function removeSocialAction(SocialAction $socialAction): self
{
$this->socialActions->removeElement($socialAction);
return $this;
}
/**
* @return Collection|Result[]
*/
public function getResults(): Collection
{
return $this->results;
}
public function addResult(Result $result): self
{
if (!$this->results->contains($result)) {
@@ -125,10 +72,71 @@ class Goal
return $this;
}
public function addSocialAction(SocialAction $socialAction): self
{
if (!$this->socialActions->contains($socialAction)) {
$this->socialActions[] = $socialAction;
}
return $this;
}
public function getDesactivationDate(): ?DateTimeInterface
{
return $this->desactivationDate;
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Collection|Result[]
*/
public function getResults(): Collection
{
return $this->results;
}
/**
* @return Collection|SocialAction[]
*/
public function getSocialActions(): Collection
{
return $this->socialActions;
}
public function getTitle(): array
{
return $this->title;
}
public function removeResult(Result $result): self
{
$this->results->removeElement($result);
return $this;
}
public function removeSocialAction(SocialAction $socialAction): self
{
$this->socialActions->removeElement($socialAction);
return $this;
}
public function setDesactivationDate(?DateTimeInterface $desactivationDate): self
{
$this->desactivationDate = $desactivationDate;
return $this;
}
public function setTitle(array $title): self
{
$this->title = $title;
return $this;
}
}