mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
cs: Enable risky rule static_lambda
.
This commit is contained in:
@@ -31,7 +31,7 @@ class SearchUserApiProvider implements SearchApiInterface
|
||||
|
||||
public function prepare(array $metadatas): void
|
||||
{
|
||||
$ids = array_map(fn ($m) => $m['id'], $metadatas);
|
||||
$ids = array_map(static fn ($m) => $m['id'], $metadatas);
|
||||
|
||||
$this->userRepository->findBy(['id' => $ids]);
|
||||
}
|
||||
|
@@ -161,7 +161,7 @@ class SearchApi
|
||||
private function findQueries($pattern, array $types, array $parameters): array
|
||||
{
|
||||
return array_map(
|
||||
fn ($p) => $p->provideQuery($pattern, $parameters),
|
||||
static fn ($p) => $p->provideQuery($pattern, $parameters),
|
||||
$this->findProviders($pattern, $types, $parameters),
|
||||
);
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ class SearchProvider
|
||||
public function getByOrder()
|
||||
{
|
||||
//sort the array
|
||||
uasort($this->searchServices, function (SearchInterface $a, SearchInterface $b) {
|
||||
uasort($this->searchServices, static function (SearchInterface $a, SearchInterface $b) {
|
||||
if ($a->getOrder() == $b->getOrder()) {
|
||||
return 0;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ class SearchProvider
|
||||
public function getHasAdvancedFormSearchServices()
|
||||
{
|
||||
//sort the array
|
||||
uasort($this->hasAdvancedFormSearchServices, function (SearchInterface $a, SearchInterface $b) {
|
||||
uasort($this->hasAdvancedFormSearchServices, static function (SearchInterface $a, SearchInterface $b) {
|
||||
if ($a->getOrder() == $b->getOrder()) {
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user