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,21 +1,38 @@
<?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;
use Chill\PersonBundle\Entity\Person;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* Person Phones
* Person Phones.
*
* @ORM\Entity
* @ORM\Table(name="chill_person_phone",
* indexes={
* @ORM\Index(name="phonenumber", columns={"phonenumber"})
* })
* @ORM\Index(name="phonenumber", columns={"phonenumber"})
* })
*/
class PersonPhone
{
/**
* @ORM\Column(type="datetime", nullable=false)
*/
private DateTime $date;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $description = null;
/**
* @ORM\Id
* @ORM\Column(name="id", type="integer")
@@ -25,35 +42,35 @@ class PersonPhone
/**
* @ORM\ManyToOne(
* targetEntity="Chill\PersonBundle\Entity\Person",
* inversedBy="otherPhoneNumbers"
* targetEntity="Chill\PersonBundle\Entity\Person",
* inversedBy="otherPhoneNumbers"
* )
*/
private Person $person;
/**
* @ORM\Column(type="text", length=40, nullable=true)
*/
private ?string $type;
/**
* @ORM\Column(type="text", length=40, nullable=false)
*/
private string $phonenumber = '';
/**
* @ORM\Column(type="text", nullable=true)
* @ORM\Column(type="text", length=40, nullable=true)
*/
private ?string $description = null;
/**
* @ORM\Column(type="datetime", nullable=false)
*/
private \DateTime $date;
private ?string $type;
public function __construct()
{
$this->date = new \DateTime();
$this->date = new DateTime();
}
public function getDate(): DateTime
{
return $this->date;
}
public function getDescription(): ?string
{
return $this->description;
}
public function getId(): int
@@ -66,9 +83,9 @@ class PersonPhone
return $this->person;
}
public function setPerson(Person $person): void
public function getPhonenumber(): string
{
$this->person = $person;
return $this->phonenumber;
}
public function getType(): string
@@ -76,24 +93,14 @@ class PersonPhone
return $this->type;
}
public function setType(string $type): void
public function isEmpty(): bool
{
$this->type = $type;
return empty($this->getDescription()) && empty($this->getPhonenumber());
}
public function getPhonenumber(): string
public function setDate(DateTime $date): void
{
return $this->phonenumber;
}
public function setPhonenumber(string $phonenumber): void
{
$this->phonenumber = $phonenumber;
}
public function getDescription(): ?string
{
return $this->description;
$this->date = $date;
}
public function setDescription(?string $description): void
@@ -101,18 +108,18 @@ class PersonPhone
$this->description = $description;
}
public function getDate(): \DateTime
public function setPerson(Person $person): void
{
return $this->date;
$this->person = $person;
}
public function setDate(\DateTime $date): void
public function setPhonenumber(string $phonenumber): void
{
$this->date = $date;
$this->phonenumber = $phonenumber;
}
public function isEmpty(): bool
public function setType(string $type): void
{
return empty($this->getDescription()) && empty($this->getPhonenumber());
$this->type = $type;
}
}