mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
update cs after php-cs-fixer upgrade
This commit is contained in:
@@ -29,7 +29,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?array $types = [],
|
||||
?array $users = []
|
||||
?array $users = [],
|
||||
): QueryBuilder {
|
||||
$qb = $this->em->createQueryBuilder();
|
||||
$qb
|
||||
@@ -149,7 +149,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
public function buildQueryByCourse(
|
||||
AccompanyingPeriod $course,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
?array $flags = [],
|
||||
): QueryBuilder {
|
||||
$qb = $this->buildBaseQuery($pattern, $flags);
|
||||
|
||||
@@ -161,7 +161,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
public function buildQueryByPerson(
|
||||
Person $person,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
?array $flags = [],
|
||||
): QueryBuilder {
|
||||
$qb = $this->buildBaseQuery($pattern, $flags);
|
||||
|
||||
@@ -172,7 +172,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
|
||||
public function buildQueryMyTasks(
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
?array $flags = [],
|
||||
): QueryBuilder {
|
||||
$qb = $this->buildBaseQuery($pattern, $flags);
|
||||
|
||||
@@ -185,7 +185,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?array $types = [],
|
||||
?array $users = []
|
||||
?array $users = [],
|
||||
): int {
|
||||
$qb = $this->buildBaseQuery($pattern, $flags, $types, $users);
|
||||
|
||||
@@ -198,7 +198,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
public function countByCourse(
|
||||
AccompanyingPeriod $course,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
?array $flags = [],
|
||||
): int {
|
||||
$qb = $this->buildQueryByCourse($course, $pattern, $flags);
|
||||
|
||||
@@ -210,7 +210,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
|
||||
public function countByCurrentUsersTasks(
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
?array $flags = [],
|
||||
): int {
|
||||
return $this->buildQueryMyTasks($pattern, $flags)
|
||||
->select('COUNT(t)')
|
||||
@@ -220,7 +220,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
public function countByPerson(
|
||||
Person $person,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
?array $flags = [],
|
||||
): int {
|
||||
$qb = $this->buildQueryByPerson($person, $pattern, $flags);
|
||||
|
||||
@@ -237,7 +237,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
?array $users = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
?array $orderBy = []
|
||||
?array $orderBy = [],
|
||||
): array {
|
||||
$qb = $this->buildBaseQuery($pattern, $flags, $types, $users);
|
||||
$qb = $this->addACLGlobal($qb);
|
||||
@@ -251,7 +251,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
?array $orderBy = []
|
||||
?array $orderBy = [],
|
||||
): array {
|
||||
$qb = $this->buildQueryByCourse($course, $pattern, $flags);
|
||||
$qb = $this->addACL($qb, $course);
|
||||
@@ -264,7 +264,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
?array $orderBy = []
|
||||
?array $orderBy = [],
|
||||
): array {
|
||||
$qb = $this->buildQueryMyTasks($pattern, $flags);
|
||||
|
||||
@@ -277,7 +277,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
?array $orderBy = []
|
||||
?array $orderBy = [],
|
||||
): array {
|
||||
$qb = $this->buildQueryByPerson($person, $pattern, $flags);
|
||||
$qb = $this->addACL($qb, $person);
|
||||
@@ -289,7 +289,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
QueryBuilder $qb,
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
?array $orderBy = []
|
||||
?array $orderBy = [],
|
||||
): array {
|
||||
$qb->select('t');
|
||||
|
||||
@@ -306,7 +306,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
|
||||
private function addACL(
|
||||
QueryBuilder $qb,
|
||||
$entity
|
||||
$entity,
|
||||
): QueryBuilder {
|
||||
foreach ($this->centerResolverDispatcher->resolveCenters($entity) as $center) {
|
||||
$scopes = $this->authorizationHelper->getReachableScopes(
|
||||
@@ -323,7 +323,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
}
|
||||
|
||||
private function addACLGlobal(
|
||||
QueryBuilder $qb
|
||||
QueryBuilder $qb,
|
||||
): QueryBuilder {
|
||||
$allowedCenters = $this->authorizationHelper
|
||||
->getReachableCenters($this->security->getUser(), TaskVoter::SHOW);
|
||||
|
@@ -20,13 +20,13 @@ interface SingleTaskAclAwareRepositoryInterface
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?array $types = [],
|
||||
?array $users = []
|
||||
?array $users = [],
|
||||
): int;
|
||||
|
||||
public function countByCourse(
|
||||
AccompanyingPeriod $course,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
?array $flags = [],
|
||||
): int;
|
||||
|
||||
public function countByCurrentUsersTasks(?string $pattern = null, ?array $flags = []): int;
|
||||
@@ -34,7 +34,7 @@ interface SingleTaskAclAwareRepositoryInterface
|
||||
public function countByPerson(
|
||||
Person $person,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
?array $flags = [],
|
||||
): int;
|
||||
|
||||
public function findByAllViewable(
|
||||
@@ -44,7 +44,7 @@ interface SingleTaskAclAwareRepositoryInterface
|
||||
?array $users = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
?array $orderBy = []
|
||||
?array $orderBy = [],
|
||||
): array;
|
||||
|
||||
public function findByCourse(
|
||||
@@ -53,7 +53,7 @@ interface SingleTaskAclAwareRepositoryInterface
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
?array $orderBy = []
|
||||
?array $orderBy = [],
|
||||
): array;
|
||||
|
||||
public function findByCurrentUsersTasks(?string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, ?array $orderBy = []): array;
|
||||
@@ -64,6 +64,6 @@ interface SingleTaskAclAwareRepositoryInterface
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
?array $orderBy = []
|
||||
?array $orderBy = [],
|
||||
): array;
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ class SingleTaskStateRepository
|
||||
SQL;
|
||||
|
||||
public function __construct(
|
||||
private readonly Connection $connection
|
||||
private readonly Connection $connection,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user