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