apply rector rules

This commit is contained in:
2023-07-28 02:40:02 +02:00
parent 157cdf6dfc
commit f570fe92a5
112 changed files with 252 additions and 562 deletions

View File

@@ -226,12 +226,11 @@ class AccompanyingPeriod implements
private ?int $id = null;
/**
* @var string
* @ORM\Column(type="string", nullable=true)
* @Groups({"read"})
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CONFIRMED})
*/
private $intensity = self::INTENSITY_OCCASIONAL;
private string $intensity = self::INTENSITY_OCCASIONAL;
/**
* @ORM\ManyToOne(
@@ -597,8 +596,6 @@ class AccompanyingPeriod implements
*
* Search for the person's participation and set the end date at
* 'now'.
*
* @param mixed $person
*/
public function closeParticipationFor(mixed $person): ?AccompanyingPeriodParticipation
{
@@ -1241,7 +1238,6 @@ class AccompanyingPeriod implements
*
* For closing a Person file, you should use Person::setClosed instead.
*
* @param mixed $closingDate
*
* @return AccompanyingPeriod
*/

View File

@@ -34,7 +34,7 @@ class AccompanyingPeriodWorkGoal
/**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriodWork::class, inversedBy="goals")
*/
private $accompanyingPeriodWork;
private ?\Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork $accompanyingPeriodWork = null;
/**
* @ORM\ManyToOne(targetEntity=Goal::class)

View File

@@ -216,54 +216,49 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* Array where customfield's data are stored.
*
* @var array
*
* @ORM\Column(type="json")
*/
private $cFData;
private ?array $cFData = null;
/**
* The marital status of the person.
*
* @var Civility
*
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Civility")
* @ORM\JoinColumn(nullable=true)
*/
private $civility;
private ?\Chill\MainBundle\Entity\Civility $civility = null;
/**
* Contact information for contacting the person.
*
* @var string
*
* @ORM\Column(type="text", nullable=true)
*/
private $contactInfo = '';
private string $contactInfo = '';
/**
* The person's country of birth.
*
* @var Country
*
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
*
* sf4 check: option inversedBy="birthsIn" return error mapping !!
*
* @ORM\JoinColumn(nullable=true)
*/
private $countryOfBirth;
private ?\Chill\MainBundle\Entity\Country $countryOfBirth = null;
/**
* @ORM\Column(type="datetime", nullable=true, options={"default": NULL})
*/
private $createdAt;
private ?\DateTimeInterface $createdAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=true)
*/
private $createdBy;
private ?\Chill\MainBundle\Entity\User $createdBy = null;
/**
* Cache the computation of household.
@@ -299,14 +294,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* The person's email.
*
* @var string
*
* @ORM\Column(type="text", nullable=true)
* @Assert\Email(
* checkMX=true
* )
*/
private $email = '';
private string $email = '';
/**
* The person's first name.
@@ -330,12 +324,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* The person's gender.
*
* @var string
*
* @ORM\Column(type="string", length=9, nullable=true)
* @Assert\NotNull(message="The gender must be set")
*/
private $gender;
private ?string $gender = null;
/**
* Comment on gender.
@@ -388,12 +381,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* The marital status of the person.
*
* @var MaritalStatus
*
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\MaritalStatus")
* @ORM\JoinColumn(nullable=true)
*/
private $maritalStatus;
private ?\Chill\PersonBundle\Entity\MaritalStatus $maritalStatus = null;
/**
* Comment on marital status.
@@ -415,11 +407,10 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* A remark over the person.
*
* @var string
*
* @ORM\Column(type="text")
*/
private $memo = ''; // TO-CHANGE in remark
private string $memo = ''; // TO-CHANGE in remark
/**
* The person's mobile phone number.
@@ -432,15 +423,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* The person's nationality.
*
* @var Country
*
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
*
* sf4 check: option inversedBy="nationals" return error mapping !!
*
* @ORM\JoinColumn(nullable=true)
*/
private $nationality;
private ?\Chill\MainBundle\Entity\Country $nationality = null;
/**
* Number of children.
@@ -488,20 +477,17 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* The person's place of birth.
*
* @var string
*
* @ORM\Column(type="string", length=255, name="place_of_birth")
*/
private $placeOfBirth = '';
private string $placeOfBirth = '';
/**
* @var bool
*
* @deprecated
*
* @ORM\Column(type="boolean")
*/
private $proxyAccompanyingPeriodOpenState = false; //TO-DELETE ?
private bool $proxyAccompanyingPeriodOpenState = false; //TO-DELETE ?
/**
* @ORM\OneToMany(targetEntity=PersonResource::class, mappedBy="personOwner")
@@ -527,14 +513,14 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* @ORM\Column(type="datetime", nullable=true, options={"default": NULL})
*/
private $updatedAt;
private ?\DateTimeInterface $updatedAt = null;
/**
* @ORM\ManyToOne(
* targetEntity=User::class
* )
*/
private $updatedBy;
private ?\Chill\MainBundle\Entity\User $updatedBy = null;
/**
* Person constructor.

View File

@@ -48,14 +48,12 @@ class PersonAltName
private $label;
/**
* @var Person
*
* @ORM\ManyToOne(
* targetEntity="Chill\PersonBundle\Entity\Person",
* inversedBy="altNames"
* )
*/
private $person;
private ?\Chill\PersonBundle\Entity\Person $person = null;
/**
* Get id.

View File

@@ -24,10 +24,9 @@ use Doctrine\ORM\Mapping as ORM;
class PersonNotDuplicate
{
/**
* @var DateTime
* @ORM\Column(type="datetime")
*/
private $date;
private \DateTime $date;
/**
* The person's id.
@@ -41,25 +40,19 @@ class PersonNotDuplicate
private $id;
/**
* @var Person
*
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/
private $person1;
private ?\Chill\PersonBundle\Entity\Person $person1 = null;
/**
* @var Person
*
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/
private $person2;
private ?\Chill\PersonBundle\Entity\Person $person2 = null;
/**
* @var User
*
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/
private $user;
private ?\Chill\MainBundle\Entity\User $user = null;
public function __construct()
{

View File

@@ -32,7 +32,7 @@ class Goal
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $desactivationDate;
private ?\DateTimeInterface $desactivationDate = null;
/**
* @ORM\Id

View File

@@ -40,12 +40,12 @@ class SocialAction
/**
* @ORM\Column(type="dateinterval", nullable=true)
*/
private $defaultNotificationDelay;
private ?\DateInterval $defaultNotificationDelay = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $desactivationDate;
private ?\DateTimeInterface $desactivationDate = null;
/**
* @var Collection<Evaluation>
@@ -71,7 +71,7 @@ class SocialAction
/**
* @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="socialActions")
*/
private $issue;
private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $issue = null;
/**
* @ORM\Column(type="float", name="ordering", options={"default": 0.0})
@@ -81,7 +81,7 @@ class SocialAction
/**
* @ORM\ManyToOne(targetEntity=SocialAction::class, inversedBy="children")
*/
private $parent;
private ?\Chill\PersonBundle\Entity\SocialWork\SocialAction $parent = null;
/**
* @var Collection<Result>
@@ -93,7 +93,7 @@ class SocialAction
/**
* @ORM\Column(type="json")
*/
private $title = [];
private array $title = [];
public function __construct()
{

View File

@@ -36,7 +36,7 @@ class SocialIssue
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $desactivationDate;
private ?\DateTimeInterface $desactivationDate = null;
/**
* @ORM\Id
@@ -53,7 +53,7 @@ class SocialIssue
/**
* @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="children")
*/
private $parent;
private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $parent = null;
/**
* @var Collection<SocialAction>
@@ -65,7 +65,7 @@ class SocialIssue
* @ORM\Column(type="json")
* @Groups({"read"})
*/
private $title = [];
private array $title = [];
public function __construct()
{