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,10 +1,18 @@
<?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\Household;
use Chill\MainBundle\Entity\Address;
use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Person;
use DateTimeImmutable;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
/**
@@ -36,6 +44,26 @@ use Doctrine\ORM\Mapping as ORM;
*/
class PersonHouseholdAddress
{
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity=Address::class)
* @ORM\JoinColumn(nullable=false)
*/
private $address;
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity=Household::class)
* @ORM\JoinColumn(nullable=false)
*/
private $household;
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity=Person::class)
* @ORM\JoinColumn(nullable=false)
*/
private $person;
/**
* @ORM\Column(type="date_immutable")
@@ -47,52 +75,9 @@ class PersonHouseholdAddress
*/
private $validTo;
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity=Person::class)
* @ORM\JoinColumn(nullable=false)
*/
private $person;
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity=Household::class)
* @ORM\JoinColumn(nullable=false)
*/
private $household;
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity=Address::class)
* @ORM\JoinColumn(nullable=false)
*/
private $address;
/**
* The start date of the intersection address/household
*
* (this is not the startdate of the household, not
* the startdate of the address)
*/
public function getValidFrom(): ?\DateTimeInterface
public function getAddress(): ?Address
{
return $this->validFrom;
}
/**
* The end date of the intersection address/household
*
* (this is not the enddate of the household, not
* the enddate of the address)
*/
public function getValidTo(): ?\DateTimeImmutable
{
return $this->validTo;
}
public function getPerson(): ?Person
{
return $this->person;
return $this->address;
}
public function getHousehold(): ?Household
@@ -100,8 +85,30 @@ class PersonHouseholdAddress
return $this->relation;
}
public function getAddress(): ?Address
public function getPerson(): ?Person
{
return $this->address;
return $this->person;
}
/**
* The start date of the intersection address/household.
*
* (this is not the startdate of the household, not
* the startdate of the address)
*/
public function getValidFrom(): ?DateTimeInterface
{
return $this->validFrom;
}
/**
* The end date of the intersection address/household.
*
* (this is not the enddate of the household, not
* the enddate of the address)
*/
public function getValidTo(): ?DateTimeImmutable
{
return $this->validTo;
}
}