mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
apply rules rector
This commit is contained in:
@@ -37,24 +37,12 @@ use function count;
|
||||
*/
|
||||
final readonly class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodACLAwareRepositoryInterface
|
||||
{
|
||||
private AccompanyingPeriodRepository $accompanyingPeriodRepository;
|
||||
|
||||
private AuthorizationHelperForCurrentUserInterface $authorizationHelper;
|
||||
|
||||
private CenterResolverManagerInterface $centerResolver;
|
||||
|
||||
private Security $security;
|
||||
|
||||
public function __construct(
|
||||
AccompanyingPeriodRepository $accompanyingPeriodRepository,
|
||||
Security $security,
|
||||
AuthorizationHelperForCurrentUserInterface $authorizationHelper,
|
||||
CenterResolverManagerInterface $centerResolverDispatcher
|
||||
private AccompanyingPeriodRepository $accompanyingPeriodRepository,
|
||||
private Security $security,
|
||||
private AuthorizationHelperForCurrentUserInterface $authorizationHelper,
|
||||
private CenterResolverManagerInterface $centerResolver
|
||||
) {
|
||||
$this->accompanyingPeriodRepository = $accompanyingPeriodRepository;
|
||||
$this->security = $security;
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
$this->centerResolver = $centerResolverDispatcher;
|
||||
}
|
||||
|
||||
public function buildQueryOpenedAccompanyingCourseByUserAndPostalCodes(?User $user, array $postalCodes = []): QueryBuilder
|
||||
@@ -178,7 +166,6 @@ final readonly class AccompanyingPeriodACLAwareRepository implements Accompanyin
|
||||
* @param QueryBuilder $qb where the accompanying period have the `ap` alias
|
||||
* @param array<Scope> $scopesCanSee
|
||||
* @param array<Scope> $scopesCanSeeConfidential
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
public function addACLClauses(QueryBuilder $qb, array $scopesCanSee, array $scopesCanSeeConfidential): QueryBuilder
|
||||
{
|
||||
@@ -272,10 +259,8 @@ final readonly class AccompanyingPeriodACLAwareRepository implements Accompanyin
|
||||
}
|
||||
|
||||
/**
|
||||
* @param QueryBuilder $qb
|
||||
* @param list<array{center: Center, scopeOnRole: list<Scope>, scopeCanSeeConfidential: list<Scope>}> $centerScopes
|
||||
* @param bool $allowNoCenter if true, will allow to see the periods linked to person which does not have any center. Very few edge case when some Person are not associated to a center.
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
public function addACLMultiCenterOnQuery(QueryBuilder $qb, array $centerScopes, bool $allowNoCenter = false): QueryBuilder
|
||||
{
|
||||
|
Reference in New Issue
Block a user