mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -20,9 +20,6 @@ use Chill\PersonBundle\Entity\Household\Household;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Query\ResultSetMapping;
|
||||
use LogicException;
|
||||
use RuntimeException;
|
||||
use function count;
|
||||
|
||||
/**
|
||||
* Helps to find a summary of the budget: the sum of resources and charges.
|
||||
@@ -49,7 +46,7 @@ final readonly class SummaryBudget implements SummaryBudgetInterface
|
||||
}
|
||||
|
||||
$personIds = $household->getCurrentPersons()->map(static fn (Person $p) => $p->getId());
|
||||
$ids = implode(', ', array_fill(0, count($personIds), '?'));
|
||||
$ids = implode(', ', array_fill(0, \count($personIds), '?'));
|
||||
|
||||
$parameters = [...$personIds, $household->getId()];
|
||||
|
||||
@@ -127,7 +124,7 @@ final readonly class SummaryBudget implements SummaryBudgetInterface
|
||||
$chargeKind = $this->chargeKindRepository->find($row['kind_id']);
|
||||
|
||||
if (null === $chargeKind) {
|
||||
throw new RuntimeException('charge kind not found: ' . $row['kind_id']);
|
||||
throw new \RuntimeException('charge kind not found: '.$row['kind_id']);
|
||||
}
|
||||
$result[$chargeKind->getKind()] = [
|
||||
'sum' => (float) $row['sum'],
|
||||
@@ -143,7 +140,7 @@ final readonly class SummaryBudget implements SummaryBudgetInterface
|
||||
$resourceKind = $this->resourceKindRepository->find($row['kind_id']);
|
||||
|
||||
if (null === $resourceKind) {
|
||||
throw new RuntimeException('charge kind not found: ' . $row['kind_id']);
|
||||
throw new \RuntimeException('charge kind not found: '.$row['kind_id']);
|
||||
}
|
||||
|
||||
$result[$resourceKind->getKind()] = [
|
||||
@@ -156,7 +153,7 @@ final readonly class SummaryBudget implements SummaryBudgetInterface
|
||||
return $result;
|
||||
|
||||
default:
|
||||
throw new LogicException();
|
||||
throw new \LogicException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user