apply rector rules

This commit is contained in:
2024-05-28 14:58:09 +02:00
parent 84f515d451
commit 06dd7dd4f5
15 changed files with 38 additions and 56 deletions

View File

@@ -40,7 +40,7 @@ class Household implements HasCentersInterface
#[Serializer\Groups(['write'])]
#[ORM\ManyToMany(targetEntity: Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])]
#[ORM\JoinTable(name: 'chill_person_household_to_addresses')]
#[ORM\OrderBy(['validFrom' => 'DESC', 'id' => 'DESC'])]
#[ORM\OrderBy(['validFrom' => Criteria::DESC, 'id' => 'DESC'])]
private Collection $addresses;
#[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_members_')]
@@ -597,7 +597,7 @@ class Household implements HasCentersInterface
$addresses = $this->getAddressesOrdered();
for ($i = 0; \count($addresses) - 1 > $i; ++$i) {
if ($i === 0) {
if (0 === $i) {
continue;
}
if ($addresses[$i - 1]->getValidTo() !== $addresses[$i]->getValidFrom()) {

View File

@@ -34,7 +34,11 @@ use Symfony\Component\Form\FormBuilderInterface;
class GeographicalUnitStatFilter implements FilterInterface
{
public function __construct(
private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) {}
private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository,
private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository,
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly RollingDateConverterInterface $rollingDateConverter
) {}
public function addRole(): ?string
{