mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
DX: more code style fixes
This commit is contained in:
@@ -31,7 +31,9 @@ class ConfigRepository
|
||||
|
||||
public function getChargesKeys(bool $onlyActive = false): array
|
||||
{
|
||||
return array_map(static function ($element) { return $element['key']; }, $this->getCharges($onlyActive));
|
||||
return array_map(static function ($element) {
|
||||
return $element['key'];
|
||||
}, $this->getCharges($onlyActive));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,7 +52,9 @@ class ConfigRepository
|
||||
|
||||
public function getResourcesKeys(bool $onlyActive = false): array
|
||||
{
|
||||
return array_map(static function ($element) { return $element['key']; }, $this->getResources($onlyActive));
|
||||
return array_map(static function ($element) {
|
||||
return $element['key'];
|
||||
}, $this->getResources($onlyActive));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,14 +74,18 @@ class ConfigRepository
|
||||
private function getCharges(bool $onlyActive = false): array
|
||||
{
|
||||
return $onlyActive ?
|
||||
array_filter($this->charges, static function ($el) { return $el['active']; })
|
||||
array_filter($this->charges, static function ($el) {
|
||||
return $el['active'];
|
||||
})
|
||||
: $this->charges;
|
||||
}
|
||||
|
||||
private function getResources(bool $onlyActive = false): array
|
||||
{
|
||||
return $onlyActive ?
|
||||
array_filter($this->resources, static function ($el) { return $el['active']; })
|
||||
array_filter($this->resources, static function ($el) {
|
||||
return $el['active'];
|
||||
})
|
||||
: $this->resources;
|
||||
}
|
||||
|
||||
|
@@ -61,7 +61,9 @@ class SummaryBudget implements SummaryBudgetInterface
|
||||
];
|
||||
}
|
||||
|
||||
$personIds = $household->getCurrentPersons()->map(static function (Person $p) { return $p->getId(); });
|
||||
$personIds = $household->getCurrentPersons()->map(static function (Person $p) {
|
||||
return $p->getId();
|
||||
});
|
||||
$ids = implode(', ', array_fill(0, count($personIds), '?'));
|
||||
|
||||
$parameters = [...$personIds, $household->getId()];
|
||||
|
Reference in New Issue
Block a user