DX: apply rector rules up to php8.0

This commit is contained in:
2023-04-15 01:05:37 +02:00
parent d8870e906f
commit dde3002100
714 changed files with 2348 additions and 9263 deletions

View File

@@ -25,14 +25,11 @@ use Doctrine\Persistence\ObjectRepository;
final class AccompanyingPeriodWorkRepository implements ObjectRepository
{
private EntityManagerInterface $em;
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
public function __construct(private EntityManagerInterface $em)
{
$this->em = $entityManager;
$this->repository = $entityManager->getRepository(AccompanyingPeriodWork::class);
$this->repository = $em->getRepository(AccompanyingPeriodWork::class);
}
public function countByAccompanyingPeriod(AccompanyingPeriod $period): int

View File

@@ -18,13 +18,10 @@ use Doctrine\ORM\Query\ResultSetMappingBuilder;
final class ClosingMotiveRepository implements ClosingMotiveRepositoryInterface
{
private EntityManagerInterface $entityManager;
private EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
public function __construct(private EntityManagerInterface $entityManager)
{
$this->entityManager = $entityManager;
$this->repository = $entityManager->getRepository(ClosingMotive::class);
}

View File

@@ -35,24 +35,8 @@ use function count;
final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodACLAwareRepositoryInterface
{
private AccompanyingPeriodRepository $accompanyingPeriodRepository;
private AuthorizationHelper $authorizationHelper;
private CenterResolverDispatcherInterface $centerResolverDispatcher;
private Security $security;
public function __construct(
AccompanyingPeriodRepository $accompanyingPeriodRepository,
Security $security,
AuthorizationHelper $authorizationHelper,
CenterResolverDispatcherInterface $centerResolverDispatcher
) {
$this->accompanyingPeriodRepository = $accompanyingPeriodRepository;
$this->security = $security;
$this->authorizationHelper = $authorizationHelper;
$this->centerResolverDispatcher = $centerResolverDispatcher;
public function __construct(private AccompanyingPeriodRepository $accompanyingPeriodRepository, private Security $security, private AuthorizationHelper $authorizationHelper, private CenterResolverDispatcherInterface $centerResolverDispatcher)
{
}
/**

View File

@@ -22,17 +22,8 @@ use Symfony\Component\Security\Core\Security;
final class HouseholdACLAwareRepository implements HouseholdACLAwareRepositoryInterface
{
private AuthorizationHelper $authorizationHelper;
private EntityManagerInterface $em;
private Security $security;
public function __construct(EntityManagerInterface $em, AuthorizationHelper $authorizationHelper, Security $security)
public function __construct(private EntityManagerInterface $em, private AuthorizationHelper $authorizationHelper, private Security $security)
{
$this->em = $em;
$this->authorizationHelper = $authorizationHelper;
$this->security = $security;
}
public function addACL(QueryBuilder $qb, string $alias = 'h'): QueryBuilder

View File

@@ -34,24 +34,8 @@ use function implode;
final class PersonACLAwareRepository implements PersonACLAwareRepositoryInterface
{
private AuthorizationHelperInterface $authorizationHelper;
private CountryRepository $countryRepository;
private EntityManagerInterface $em;
private Security $security;
public function __construct(
Security $security,
EntityManagerInterface $em,
CountryRepository $countryRepository,
AuthorizationHelperInterface $authorizationHelper
) {
$this->security = $security;
$this->em = $em;
$this->countryRepository = $countryRepository;
$this->authorizationHelper = $authorizationHelper;
public function __construct(private Security $security, private EntityManagerInterface $em, private CountryRepository $countryRepository, private AuthorizationHelperInterface $authorizationHelper)
{
}
public function buildAuthorizedQuery(