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,8 +1,14 @@
<?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\PersonBundle\Repository\Household\PositionRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
@@ -10,11 +16,17 @@ use Symfony\Component\Serializer\Annotation as Serializer;
* @ORM\Entity
* @ORM\Table(name="chill_person_household_position")
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
* "household_position"=Position::class
* })
* "household_position": Position::class
* })
*/
class Position
{
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({ "read" })
*/
private bool $allowHolder = false;
/**
* @ORM\Id
* @ORM\GeneratedValue
@@ -29,23 +41,22 @@ class Position
*/
private array $label = [];
/**
* @ORM\Column(type="float")
* @Serializer\Groups({ "read" })
*/
private float $ordering = 0.00;
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({ "read" })
*/
private bool $shareHouseHold = true;
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({ "read" })
*/
private bool $allowHolder = false;
/**
* @ORM\Column(type="float")
* @Serializer\Groups({ "read" })
*/
private float $ordering = 0.00;
public function getAllowHolder(): bool
{
return $this->allowHolder;
}
public function getId(): ?int
{
@@ -57,11 +68,9 @@ class Position
return $this->label;
}
public function setLabel(array $label): self
public function getOrdering(): float
{
$this->label = $label;
return $this;
return $this->ordering;
}
public function getShareHousehold(): bool
@@ -69,18 +78,6 @@ class Position
return $this->shareHouseHold;
}
public function setShareHousehold(bool $shareHouseHold): self
{
$this->shareHouseHold = $shareHouseHold;
return $this;
}
public function getAllowHolder(): bool
{
return $this->allowHolder;
}
public function isAllowHolder(): bool
{
return $this->getAllowHolder();
@@ -93,9 +90,11 @@ class Position
return $this;
}
public function getOrdering(): float
public function setLabel(array $label): self
{
return $this->ordering;
$this->label = $label;
return $this;
}
public function setOrdering(float $ordering): self
@@ -104,4 +103,11 @@ class Position
return $this;
}
public function setShareHousehold(bool $shareHouseHold): self
{
$this->shareHouseHold = $shareHouseHold;
return $this;
}
}