mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user