mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
phpstan, rector, phpcs fixes
This commit is contained in:
@@ -200,7 +200,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
$this->animators->removeElement($tp);
|
||||
}
|
||||
|
||||
public function getCenter(): ?Center
|
||||
public function getCenter(): Center
|
||||
{
|
||||
return $this->center;
|
||||
}
|
||||
|
@@ -52,6 +52,7 @@ class EventBudgetElement
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
public function getAmount(): float
|
||||
{
|
||||
return (float) $this->amount;
|
||||
|
@@ -80,24 +80,14 @@ class EventTheme
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set active.
|
||||
*
|
||||
* @return EventTheme
|
||||
*/
|
||||
public function setIsActive(bool $active): static
|
||||
public function setIsActive(bool $active): self
|
||||
{
|
||||
$this->isActive = $active;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set label.
|
||||
*
|
||||
* @return EventTheme
|
||||
*/
|
||||
public function setName(array $label): static
|
||||
public function setName(array $label): self
|
||||
{
|
||||
$this->name = $label;
|
||||
|
||||
@@ -130,23 +120,9 @@ class EventTheme
|
||||
return $this->children;
|
||||
}
|
||||
|
||||
public function getDescendants(): Collection
|
||||
public function hasChildren(): bool
|
||||
{
|
||||
$descendants = new ArrayCollection();
|
||||
|
||||
foreach ($this->getChildren() as $child) {
|
||||
if (!$descendants->contains($child)) {
|
||||
$descendants->add($child);
|
||||
|
||||
foreach ($child->getDescendants() as $descendantsOfChild) {
|
||||
if (!$descendants->contains($descendantsOfChild)) {
|
||||
$descendants->add($descendantsOfChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $descendants;
|
||||
return 0 < $this->getChildren()->count();
|
||||
}
|
||||
|
||||
public function hasParent(): bool
|
||||
|
Reference in New Issue
Block a user