mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user