mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Enable risky rule static_lambda
.
This commit is contained in:
@@ -351,7 +351,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
*/
|
||||
public function getActiveChildren(): Collection
|
||||
{
|
||||
return $this->children->filter(fn (ThirdParty $tp) => $tp->getActive());
|
||||
return $this->children->filter(static fn (ThirdParty $tp) => $tp->getActive());
|
||||
}
|
||||
|
||||
public function getAddress(): ?Address
|
||||
@@ -806,7 +806,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
public function setTypesAndCategories(array $typesAndCategories): self
|
||||
{
|
||||
$types = array_filter($typesAndCategories, fn ($item) => !$item instanceof ThirdPartyCategory);
|
||||
$types = array_filter($typesAndCategories, static fn ($item) => !$item instanceof ThirdPartyCategory);
|
||||
$this->setTypes($types);
|
||||
|
||||
// handle categories
|
||||
@@ -814,8 +814,8 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
|
||||
$this->addTypesAndCategories($t);
|
||||
}
|
||||
|
||||
$categories = array_filter($typesAndCategories, fn ($item) => $item instanceof ThirdPartyCategory);
|
||||
$categoriesHashes = array_map(fn (ThirdPartyCategory $c) => spl_object_hash($c), $categories);
|
||||
$categories = array_filter($typesAndCategories, static fn ($item) => $item instanceof ThirdPartyCategory);
|
||||
$categoriesHashes = array_map(static fn (ThirdPartyCategory $c) => spl_object_hash($c), $categories);
|
||||
|
||||
foreach ($categories as $c) {
|
||||
$this->addCategory($c);
|
||||
|
Reference in New Issue
Block a user