fix phpstan, cs, and rector rules

This commit is contained in:
2024-05-28 12:45:07 +02:00
parent 059e4a0acd
commit 56d173046d
27 changed files with 30 additions and 65 deletions

View File

@@ -686,20 +686,9 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
return $this;
}
/**
* @return $this
*/
public function setCenters(Collection $centers)
public function setCenters(Collection $centers): self
{
foreach ($centers as $center) {
$this->addCenter($center);
}
foreach ($this->centers as $center) {
if (false === $centers->contains($center)) {
$this->removeCenter($center);
}
}
$this->centers = $centers;
return $this;
}