mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -20,6 +20,7 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
* ClosingMotive give an explanation why we closed the Accompanying period.
|
||||
*
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_person_accompanying_period_closingmotive")
|
||||
*/
|
||||
class ClosingMotive
|
||||
@@ -33,6 +34,7 @@ class ClosingMotive
|
||||
* Child Accompanying periods.
|
||||
*
|
||||
* @var Collection<ClosingMotive>
|
||||
*
|
||||
* @ORM\OneToMany(
|
||||
* targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive",
|
||||
* mappedBy="parent")
|
||||
@@ -40,18 +42,21 @@ class ClosingMotive
|
||||
private Collection $children;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
private array $name = [];
|
||||
@@ -62,8 +67,6 @@ class ClosingMotive
|
||||
private float $ordering = 0.0;
|
||||
|
||||
/**
|
||||
* @var self
|
||||
*
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive",
|
||||
* inversedBy="children")
|
||||
@@ -155,7 +158,7 @@ class ClosingMotive
|
||||
|
||||
public function isLeaf(): bool
|
||||
{
|
||||
return $this->children->count() === 0;
|
||||
return 0 === $this->children->count();
|
||||
}
|
||||
|
||||
public function isParent(): bool
|
||||
@@ -229,7 +232,7 @@ class ClosingMotive
|
||||
$this->parent = $parent;
|
||||
|
||||
if (null !== $parent) {
|
||||
//$parent->addChildren($this);
|
||||
// $parent->addChildren($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
Reference in New Issue
Block a user