apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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();
}
}
}