Merge branch 'upgrade-php-cs-3.49' into 'master'

Upgrade php-cs 3.49

See merge request Chill-Projet/chill-bundles!654
This commit is contained in:
Julien Fastré 2024-02-07 09:57:20 +00:00
commit 42c5577027
257 changed files with 605 additions and 605 deletions

View File

@ -57,7 +57,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
public function getLabels($key, array $values, mixed $data) public function getLabels($key, array $values, mixed $data)
{ {
return function (null|int|string $value): string { return function (int|string|null $value): string {
if ('_header' === $value) { if ('_header' === $value) {
return 'export.aggregator.acp.by_activity_type.activity_type'; return 'export.aggregator.acp.by_activity_type.activity_type';
} }

View File

@ -35,7 +35,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
public function getLabels($key, array $values, mixed $data) public function getLabels($key, array $values, mixed $data)
{ {
return function (null|int|string $value): string { return function (int|string|null $value): string {
if ('_header' === $value) { if ('_header' === $value) {
return 'export.aggregator.activity.by_activity_presence.header'; return 'export.aggregator.activity.by_activity_presence.header';
} }

View File

@ -58,7 +58,7 @@ class ActivityTypeAggregator implements AggregatorInterface
public function getLabels($key, array $values, $data): \Closure public function getLabels($key, array $values, $data): \Closure
{ {
return function (null|int|string $value): string { return function (int|string|null $value): string {
if ('_header' === $value) { if ('_header' === $value) {
return 'Activity type'; return 'Activity type';
} }

View File

@ -36,14 +36,14 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
) { ) {
} }
public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface
{ {
$query = $this->buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext($person, $startDate, $endDate, $content); $query = $this->buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext($person, $startDate, $endDate, $content);
return $this->addFetchQueryByPersonACL($query, $person); return $this->addFetchQueryByPersonACL($query, $person);
} }
public function buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery public function buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{ {
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
$activityMetadata = $this->em->getClassMetadata(Activity::class); $activityMetadata = $this->em->getClassMetadata(Activity::class);
@ -72,7 +72,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
return $this->addWhereClauses($query, $startDate, $endDate, $content); return $this->addWhereClauses($query, $startDate, $endDate, $content);
} }
public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{ {
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
$activityMetadata = $this->em->getClassMetadata(Activity::class); $activityMetadata = $this->em->getClassMetadata(Activity::class);
@ -123,7 +123,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
return $this->addWhereClauses($query, $startDate, $endDate, $content); return $this->addWhereClauses($query, $startDate, $endDate, $content);
} }
private function addWhereClauses(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery private function addWhereClauses(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{ {
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);

View File

@ -25,12 +25,12 @@ interface ActivityDocumentACLAwareRepositoryInterface
* *
* This method must check the rights to see a document: the user must be allowed to see the given activities * This method must check the rights to see a document: the user must be allowed to see the given activities
*/ */
public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface; public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface;
/** /**
* Return a fetch query for querying document's activities for an activity in accompanying periods, but for a given person. * Return a fetch query for querying document's activities for an activity in accompanying periods, but for a given person.
* *
* This method must check the rights to see a document: the user must be allowed to see the given accompanying periods * This method must check the rights to see a document: the user must be allowed to see the given accompanying periods
*/ */
public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery; public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery;
} }

View File

@ -34,7 +34,7 @@ class ActivityPresenceRepository implements ActivityPresenceRepositoryInterface
return $this->repository->findAll(); return $this->repository->findAll();
} }
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
{ {
return $this->findBy($criteria, $orderBy, $limit, $offset); return $this->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -25,7 +25,7 @@ interface ActivityPresenceRepositoryInterface
/** /**
* @return array|ActivityPresence[] * @return array|ActivityPresence[]
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
public function findOneBy(array $criteria): ?ActivityPresence; public function findOneBy(array $criteria): ?ActivityPresence;

View File

@ -48,7 +48,7 @@ final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
/** /**
* @return array|ActivityType[] * @return array|ActivityType[]
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -37,7 +37,7 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen
) { ) {
} }
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
$activityMetadata = $this->em->getClassMetadata(Activity::class); $activityMetadata = $this->em->getClassMetadata(Activity::class);
@ -100,7 +100,7 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen
return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person); return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person);
} }
public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
return $this->activityDocumentACLAwareRepository return $this->activityDocumentACLAwareRepository
->buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext($person, $startDate, $endDate, $content); ->buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext($person, $startDate, $endDate, $content);

View File

@ -28,7 +28,7 @@ final readonly class PersonActivityGenericDocProvider implements GenericDocForPe
) { ) {
} }
public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
return $this->personActivityDocumentACLAwareRepository->buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext( return $this->personActivityDocumentACLAwareRepository->buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(
$person, $person,

View File

@ -157,7 +157,7 @@ final class ActivityVoterTest extends KernelTestCase
* *
* @return \Symfony\Component\Security\Core\Authentication\Token\TokenInterface * @return \Symfony\Component\Security\Core\Authentication\Token\TokenInterface
*/ */
protected function prepareToken(User $user = null) protected function prepareToken(?User $user = null)
{ {
$token = $this->prophet->prophesize(); $token = $this->prophet->prophesize();
$token $token

View File

@ -49,7 +49,7 @@ final class AsideActivityController extends CRUDController
return $asideActivity; return $asideActivity;
} }
protected function buildQueryEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null) protected function buildQueryEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null)
{ {
$qb = parent::buildQueryEntities($action, $request); $qb = parent::buildQueryEntities($action, $request);

View File

@ -49,7 +49,7 @@ class AsideActivityCategoryRepository implements ObjectRepository
* *
* @return AsideActivityCategory[] * @return AsideActivityCategory[]
*/ */
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -132,14 +132,14 @@ abstract class AbstractElement
return $this; return $this;
} }
public function setComment(string $comment = null): self public function setComment(?string $comment = null): self
{ {
$this->comment = $comment; $this->comment = $comment;
return $this; return $this;
} }
public function setEndDate(\DateTimeInterface $endDate = null): self public function setEndDate(?\DateTimeInterface $endDate = null): self
{ {
if ($endDate instanceof \DateTime) { if ($endDate instanceof \DateTime) {
$this->endDate = \DateTimeImmutable::createFromMutable($endDate); $this->endDate = \DateTimeImmutable::createFromMutable($endDate);

View File

@ -66,7 +66,7 @@ final class ChargeKindRepository implements ChargeKindRepositoryInterface
* *
* @return array<ChargeKind> * @return array<ChargeKind>
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -36,7 +36,7 @@ interface ChargeKindRepositoryInterface extends ObjectRepository
/** /**
* @return array<ChargeKind> * @return array<ChargeKind>
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
public function findOneBy(array $criteria): ?ChargeKind; public function findOneBy(array $criteria): ?ChargeKind;

View File

@ -71,7 +71,7 @@ final class ResourceKindRepository implements ResourceKindRepositoryInterface
* *
* @return list<ResourceKind> * @return list<ResourceKind>
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -36,7 +36,7 @@ interface ResourceKindRepositoryInterface extends ObjectRepository
/** /**
* @return list<ResourceKind> * @return list<ResourceKind>
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array;
public function findOneBy(array $criteria): ?ResourceKind; public function findOneBy(array $criteria): ?ResourceKind;

View File

@ -32,7 +32,7 @@ final class Version20221207105407 extends AbstractMigration implements Container
return 'Use new budget admin entities'; return 'Use new budget admin entities';
} }
public function setContainer(ContainerInterface $container = null) public function setContainer(?ContainerInterface $container = null)
{ {
$this->container = $container; $this->container = $container;
} }

View File

@ -13,7 +13,7 @@ namespace Chill\CalendarBundle\Exception;
class UserAbsenceSyncException extends \LogicException class UserAbsenceSyncException extends \LogicException
{ {
public function __construct(string $message = '', int $code = 20_230_706, \Throwable $previous = null) public function __construct(string $message = '', int $code = 20_230_706, ?\Throwable $previous = null)
{ {
parent::__construct($message, $code, $previous); parent::__construct($message, $code, $previous);
} }

View File

@ -33,7 +33,7 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface
/** /**
* @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft * @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft
*/ */
public function isUserAbsent(User $user): null|bool public function isUserAbsent(User $user): bool|null
{ {
$id = $this->mapCalendarToUser->getUserId($user); $id = $this->mapCalendarToUser->getUserId($user);

View File

@ -18,5 +18,5 @@ interface MSUserAbsenceReaderInterface
/** /**
* @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft * @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft
*/ */
public function isUserAbsent(User $user): null|bool; public function isUserAbsent(User $user): bool|null;
} }

View File

@ -29,7 +29,7 @@ class MachineHttpClient implements HttpClientInterface
private readonly HttpClientInterface $decoratedClient; private readonly HttpClientInterface $decoratedClient;
public function __construct(private readonly MachineTokenStorage $machineTokenStorage, HttpClientInterface $decoratedClient = null) public function __construct(private readonly MachineTokenStorage $machineTokenStorage, ?HttpClientInterface $decoratedClient = null)
{ {
$this->decoratedClient = $decoratedClient ?? \Symfony\Component\HttpClient\HttpClient::create(); $this->decoratedClient = $decoratedClient ?? \Symfony\Component\HttpClient\HttpClient::create();
} }
@ -68,7 +68,7 @@ class MachineHttpClient implements HttpClientInterface
return $this->decoratedClient->request($method, $url, $options); return $this->decoratedClient->request($method, $url, $options);
} }
public function stream($responses, float $timeout = null): ResponseStreamInterface public function stream($responses, ?float $timeout = null): ResponseStreamInterface
{ {
return $this->decoratedClient->stream($responses, $timeout); return $this->decoratedClient->stream($responses, $timeout);
} }

View File

@ -178,8 +178,8 @@ class MapCalendarToUser
public function writeSubscriptionMetadata( public function writeSubscriptionMetadata(
User $user, User $user,
int $expiration, int $expiration,
string $id = null, ?string $id = null,
string $secret = null ?string $secret = null
): void { ): void {
$user->setAttributeByDomain(self::METADATA_KEY, self::EXPIRATION_SUBSCRIPTION_EVENT, $expiration); $user->setAttributeByDomain(self::METADATA_KEY, self::EXPIRATION_SUBSCRIPTION_EVENT, $expiration);

View File

@ -29,7 +29,7 @@ class OnBehalfOfUserHttpClient
private readonly HttpClientInterface $decoratedClient; private readonly HttpClientInterface $decoratedClient;
public function __construct(private readonly OnBehalfOfUserTokenStorage $tokenStorage, HttpClientInterface $decoratedClient = null) public function __construct(private readonly OnBehalfOfUserTokenStorage $tokenStorage, ?HttpClientInterface $decoratedClient = null)
{ {
$this->decoratedClient = $decoratedClient ?? \Symfony\Component\HttpClient\HttpClient::create(); $this->decoratedClient = $decoratedClient ?? \Symfony\Component\HttpClient\HttpClient::create();
} }
@ -63,7 +63,7 @@ class OnBehalfOfUserHttpClient
return $this->decoratedClient->request($method, $url, $options); return $this->decoratedClient->request($method, $url, $options);
} }
public function stream($responses, float $timeout = null): ResponseStreamInterface public function stream($responses, ?float $timeout = null): ResponseStreamInterface
{ {
return $this->decoratedClient->stream($responses, $timeout); return $this->decoratedClient->stream($responses, $timeout);
} }

View File

@ -171,7 +171,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
} }
} }
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, CalendarRange $associatedCalendarRange = null): void public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void
{ {
if ('' === $remoteId) { if ('' === $remoteId) {
return; return;

View File

@ -46,7 +46,7 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface
return []; return [];
} }
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, CalendarRange $associatedCalendarRange = null): void public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void
{ {
} }

View File

@ -47,7 +47,7 @@ interface RemoteCalendarConnectorInterface
*/ */
public function listEventsForUser(User $user, \DateTimeImmutable $startDate, \DateTimeImmutable $endDate, ?int $offset = 0, ?int $limit = 50): array; public function listEventsForUser(User $user, \DateTimeImmutable $startDate, \DateTimeImmutable $endDate, ?int $offset = 0, ?int $limit = 50): array;
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, CalendarRange $associatedCalendarRange = null): void; public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void;
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void; public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void;

View File

@ -159,7 +159,7 @@ class CalendarACLAwareRepository implements CalendarACLAwareRepositoryInterface
/** /**
* @return array|Calendar[] * @return array|Calendar[]
*/ */
public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], int $offset = null, int $limit = null): array public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array
{ {
$qb = $this->buildQueryByAccompanyingPeriod($period, $startDate, $endDate)->select('c'); $qb = $this->buildQueryByAccompanyingPeriod($period, $startDate, $endDate)->select('c');
@ -178,7 +178,7 @@ class CalendarACLAwareRepository implements CalendarACLAwareRepositoryInterface
return $qb->getQuery()->getResult(); return $qb->getQuery()->getResult();
} }
public function findByPerson(Person $person, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], int $offset = null, int $limit = null): array public function findByPerson(Person $person, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array
{ {
$qb = $this->buildQueryByPerson($person, $startDate, $endDate) $qb = $this->buildQueryByPerson($person, $startDate, $endDate)
->select('c'); ->select('c');

View File

@ -46,7 +46,7 @@ interface CalendarACLAwareRepositoryInterface
/** /**
* @return array|Calendar[] * @return array|Calendar[]
*/ */
public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], int $offset = null, int $limit = null): array; public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array;
/** /**
* Return all the calendars which are associated with a person, either on @see{Calendar::person} or within. * Return all the calendars which are associated with a person, either on @see{Calendar::person} or within.
@ -58,5 +58,5 @@ interface CalendarACLAwareRepositoryInterface
* *
* @return array|Calendar[] * @return array|Calendar[]
*/ */
public function findByPerson(Person $person, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], int $offset = null, int $limit = null): array; public function findByPerson(Person $person, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array;
} }

View File

@ -35,7 +35,7 @@ class CalendarDocRepository implements ObjectRepository, CalendarDocRepositoryIn
return $this->repository->findAll(); return $this->repository->findAll();
} }
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null) public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null)
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -25,7 +25,7 @@ interface CalendarDocRepositoryInterface
/** /**
* @return array|CalendarDoc[] * @return array|CalendarDoc[]
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null); public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null);
public function findOneBy(array $criteria): ?CalendarDoc; public function findOneBy(array $criteria): ?CalendarDoc;

View File

@ -52,7 +52,7 @@ class CalendarRangeRepository implements ObjectRepository
/** /**
* @return array|CalendarRange[] * @return array|CalendarRange[]
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null) public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null)
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }
@ -64,8 +64,8 @@ class CalendarRangeRepository implements ObjectRepository
User $user, User $user,
\DateTimeImmutable $from, \DateTimeImmutable $from,
\DateTimeImmutable $to, \DateTimeImmutable $to,
int $limit = null, ?int $limit = null,
int $offset = null ?int $offset = null
): array { ): array {
$qb = $this->buildQueryAvailableRangesForUser($user, $from, $to); $qb = $this->buildQueryAvailableRangesForUser($user, $from, $to);

View File

@ -46,7 +46,7 @@ class CalendarRepository implements ObjectRepository
->getSingleScalarResult(); ->getSingleScalarResult();
} }
public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder
{ {
return $this->repository->createQueryBuilder($alias, $indexBy); return $this->repository->createQueryBuilder($alias, $indexBy);
} }
@ -67,7 +67,7 @@ class CalendarRepository implements ObjectRepository
/** /**
* @return array|Calendar[] * @return array|Calendar[]
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }
@ -75,7 +75,7 @@ class CalendarRepository implements ObjectRepository
/** /**
* @return array|Calendar[] * @return array|Calendar[]
*/ */
public function findByAccompanyingPeriod(AccompanyingPeriod $period, array $orderBy = null, int $limit = null, int $offset = null): array public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
{ {
return $this->findBy( return $this->findBy(
[ [
@ -87,7 +87,7 @@ class CalendarRepository implements ObjectRepository
); );
} }
public function findByNotificationAvailable(\DateTimeImmutable $startDate, \DateTimeImmutable $endDate, int $limit = null, int $offset = null): array public function findByNotificationAvailable(\DateTimeImmutable $startDate, \DateTimeImmutable $endDate, ?int $limit = null, ?int $offset = null): array
{ {
$qb = $this->queryByNotificationAvailable($startDate, $endDate)->select('c'); $qb = $this->queryByNotificationAvailable($startDate, $endDate)->select('c');
@ -105,7 +105,7 @@ class CalendarRepository implements ObjectRepository
/** /**
* @return array|Calendar[] * @return array|Calendar[]
*/ */
public function findByUser(User $user, \DateTimeImmutable $from, \DateTimeImmutable $to, int $limit = null, int $offset = null): array public function findByUser(User $user, \DateTimeImmutable $from, \DateTimeImmutable $to, ?int $limit = null, ?int $offset = null): array
{ {
$qb = $this->buildQueryByUser($user, $from, $to)->select('c'); $qb = $this->buildQueryByUser($user, $from, $to)->select('c');

View File

@ -41,7 +41,7 @@ class InviteRepository implements ObjectRepository
/** /**
* @return array|Invite[] * @return array|Invite[]
*/ */
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null) public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null)
{ {
return $this->entityRepository->findBy($criteria, $orderBy, $limit, $offset); return $this->entityRepository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -44,7 +44,7 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen
/** /**
* @throws MappingException * @throws MappingException
*/ */
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
$classMetadata = $this->em->getClassMetadata(CalendarDoc::class); $classMetadata = $this->em->getClassMetadata(CalendarDoc::class);
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
@ -91,7 +91,7 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen
return $this->security->isGranted(CalendarVoter::SEE, $accompanyingPeriod); return $this->security->isGranted(CalendarVoter::SEE, $accompanyingPeriod);
} }
public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
$classMetadata = $this->em->getClassMetadata(CalendarDoc::class); $classMetadata = $this->em->getClassMetadata(CalendarDoc::class);
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);

View File

@ -40,7 +40,7 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe
) { ) {
} }
private function addWhereClausesToQuery(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery private function addWhereClausesToQuery(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{ {
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
@ -74,7 +74,7 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe
/** /**
* @throws MappingException * @throws MappingException
*/ */
public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
$classMetadata = $this->em->getClassMetadata(CalendarDoc::class); $classMetadata = $this->em->getClassMetadata(CalendarDoc::class);
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);

View File

@ -202,8 +202,8 @@ final class CalendarContextTest extends TestCase
} }
private function buildCalendarContext( private function buildCalendarContext(
EntityManagerInterface $entityManager = null, ?EntityManagerInterface $entityManager = null,
NormalizerInterface $normalizer = null ?NormalizerInterface $normalizer = null
): CalendarContext { ): CalendarContext {
$baseContext = $this->prophesize(BaseContextData::class); $baseContext = $this->prophesize(BaseContextData::class);
$baseContext->getData(null)->willReturn(['base_context' => 'data']); $baseContext->getData(null)->willReturn(['base_context' => 'data']);

View File

@ -363,7 +363,7 @@ class CustomFieldsGroupController extends AbstractController
* *
* @return \Symfony\Component\Form\Form * @return \Symfony\Component\Form\Form
*/ */
private function createMakeDefaultForm(CustomFieldsGroup $group = null) private function createMakeDefaultForm(?CustomFieldsGroup $group = null)
{ {
return $this->createFormBuilder($group, [ return $this->createFormBuilder($group, [
'method' => 'POST', 'method' => 'POST',

View File

@ -156,7 +156,7 @@ class CustomFieldChoice extends AbstractCustomField
return $serialized; return $serialized;
} }
public function extractOtherValue(CustomField $cf, array $data = null) public function extractOtherValue(CustomField $cf, ?array $data = null)
{ {
return $data['_other']; return $data['_other'];
} }
@ -355,7 +355,7 @@ class CustomFieldChoice extends AbstractCustomField
* If the value had an 'allow_other' = true option, the returned value * If the value had an 'allow_other' = true option, the returned value
* **is not** the content of the _other field, but the `_other` string. * **is not** the content of the _other field, but the `_other` string.
*/ */
private function guessValue(null|array|string $value) private function guessValue(array|string|null $value)
{ {
if (null === $value) { if (null === $value) {
return null; return null;

View File

@ -212,7 +212,7 @@ class CustomField
* *
* @return CustomField * @return CustomField
*/ */
public function setCustomFieldsGroup(CustomFieldsGroup $customFieldGroup = null) public function setCustomFieldsGroup(?CustomFieldsGroup $customFieldGroup = null)
{ {
$this->customFieldGroup = $customFieldGroup; $this->customFieldGroup = $customFieldGroup;

View File

@ -182,7 +182,7 @@ class Option
/** /**
* @return $this * @return $this
*/ */
public function setParent(Option $parent = null) public function setParent(?Option $parent = null)
{ {
$this->parent = $parent; $this->parent = $parent;
$this->key = $parent->getKey(); $this->key = $parent->getKey();

View File

@ -139,7 +139,7 @@ class CustomFieldsGroup
/** /**
* Get name. * Get name.
*/ */
public function getName(string $language = null): array|string public function getName(?string $language = null): array|string
{ {
// TODO set this in a service, PLUS twig function // TODO set this in a service, PLUS twig function
if (null !== $language) { if (null !== $language) {

View File

@ -84,7 +84,7 @@ class CustomFieldProvider implements ContainerAwareInterface
* *
* @see \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer() * @see \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer()
*/ */
public function setContainer(ContainerInterface $container = null) public function setContainer(?ContainerInterface $container = null)
{ {
if (null === $container) { if (null === $container) {
throw new \LogicException('container should not be null'); throw new \LogicException('container should not be null');

View File

@ -13,5 +13,5 @@ namespace Chill\DocGeneratorBundle\GeneratorDriver;
interface DriverInterface interface DriverInterface
{ {
public function generateFromString(string $template, string $resourceType, array $data, string $templateName = null): string; public function generateFromString(string $template, string $resourceType, array $data, ?string $templateName = null): string;
} }

View File

@ -17,7 +17,7 @@ namespace Chill\DocGeneratorBundle\GeneratorDriver\Exception;
*/ */
class TemplateException extends \RuntimeException class TemplateException extends \RuntimeException
{ {
public function __construct(private readonly array $errors, $code = 0, \Throwable $previous = null) public function __construct(private readonly array $errors, $code = 0, ?\Throwable $previous = null)
{ {
parent::__construct('Error while generating document from template', $code, $previous); parent::__construct('Error while generating document from template', $code, $previous);
} }

View File

@ -33,7 +33,7 @@ final class RelatorioDriver implements DriverInterface
$this->url = $parameterBag->get('chill_doc_generator')['driver']['relatorio']['url']; $this->url = $parameterBag->get('chill_doc_generator')['driver']['relatorio']['url'];
} }
public function generateFromString(string $template, string $resourceType, array $data, string $templateName = null): string public function generateFromString(string $template, string $resourceType, array $data, ?string $templateName = null): string
{ {
$form = new FormDataPart( $form = new FormDataPart(
[ [

View File

@ -58,7 +58,7 @@ final class DocGeneratorTemplateRepository implements ObjectRepository
* *
* @return DocGeneratorTemplate[] * @return DocGeneratorTemplate[]
*/ */
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }
@ -85,7 +85,7 @@ final class DocGeneratorTemplateRepository implements ObjectRepository
->getResult(); ->getResult();
} }
public function findOneBy(array $criteria, array $orderBy = null): ?DocGeneratorTemplate public function findOneBy(array $criteria, ?array $orderBy = null): ?DocGeneratorTemplate
{ {
return $this->repository->findOneBy($criteria, $orderBy); return $this->repository->findOneBy($criteria, $orderBy);
} }

View File

@ -20,7 +20,7 @@ class NormalizeNullValueHelper
{ {
} }
public function normalize(array $attributes, string $format = 'docgen', ?array $context = [], ClassMetadataInterface $classMetadata = null) public function normalize(array $attributes, string $format = 'docgen', ?array $context = [], ?ClassMetadataInterface $classMetadata = null)
{ {
$data = []; $data = [];
$data['isNull'] = true; $data['isNull'] = true;

View File

@ -21,7 +21,7 @@ class BaseContextData
{ {
} }
public function getData(User $user = null): array public function getData(?User $user = null): array
{ {
$data = []; $data = [];

View File

@ -46,10 +46,10 @@ class Generator implements GeneratorInterface
DocGeneratorTemplate $template, DocGeneratorTemplate $template,
int $entityId, int $entityId,
array $contextGenerationDataNormalized, array $contextGenerationDataNormalized,
StoredObject $destinationStoredObject = null, ?StoredObject $destinationStoredObject = null,
bool $isTest = false, bool $isTest = false,
File $testFile = null, ?File $testFile = null,
User $creator = null ?User $creator = null
): ?string { ): ?string {
if ($destinationStoredObject instanceof StoredObject && StoredObject::STATUS_PENDING !== $destinationStoredObject->getStatus()) { if ($destinationStoredObject instanceof StoredObject && StoredObject::STATUS_PENDING !== $destinationStoredObject->getStatus()) {
$this->logger->info(self::LOG_PREFIX.'Aborting generation of an already generated document'); $this->logger->info(self::LOG_PREFIX.'Aborting generation of an already generated document');

View File

@ -16,7 +16,7 @@ class GeneratorException extends \RuntimeException
/** /**
* @param string[] $errors * @param string[] $errors
*/ */
public function __construct(private readonly array $errors = [], \Throwable $previous = null) public function __construct(private readonly array $errors = [], ?\Throwable $previous = null)
{ {
parent::__construct( parent::__construct(
'Could not generate the document', 'Could not generate the document',

View File

@ -33,9 +33,9 @@ interface GeneratorInterface
DocGeneratorTemplate $template, DocGeneratorTemplate $template,
int $entityId, int $entityId,
array $contextGenerationDataNormalized, array $contextGenerationDataNormalized,
StoredObject $destinationStoredObject = null, ?StoredObject $destinationStoredObject = null,
bool $isTest = false, bool $isTest = false,
File $testFile = null, ?File $testFile = null,
User $creator = null ?User $creator = null
): ?string; ): ?string;
} }

View File

@ -13,7 +13,7 @@ namespace Chill\DocGeneratorBundle\Service\Generator;
class RelatedEntityNotFoundException extends \RuntimeException class RelatedEntityNotFoundException extends \RuntimeException
{ {
public function __construct(string $relatedEntityClass, int $relatedEntityId, \Throwable $previous = null) public function __construct(string $relatedEntityClass, int $relatedEntityId, ?\Throwable $previous = null)
{ {
parent::__construct( parent::__construct(
sprintf('Related entity not found: %s, %s', $relatedEntityClass, $relatedEntityId), sprintf('Related entity not found: %s, %s', $relatedEntityClass, $relatedEntityId),

View File

@ -56,7 +56,7 @@ final class BaseContextDataTest extends KernelTestCase
} }
private function buildBaseContext( private function buildBaseContext(
NormalizerInterface $normalizer = null ?NormalizerInterface $normalizer = null
): BaseContextData { ): BaseContextData {
return new BaseContextData( return new BaseContextData(
$normalizer ?? self::$container->get(NormalizerInterface::class) $normalizer ?? self::$container->get(NormalizerInterface::class)

View File

@ -138,7 +138,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
return $this; return $this;
} }
public function setObject(StoredObject $object = null) public function setObject(?StoredObject $object = null)
{ {
$this->object = $object; $this->object = $object;

View File

@ -17,10 +17,10 @@ interface GenericDocForAccompanyingPeriodProviderInterface
{ {
public function buildFetchQueryForAccompanyingPeriod( public function buildFetchQueryForAccompanyingPeriod(
AccompanyingPeriod $accompanyingPeriod, AccompanyingPeriod $accompanyingPeriod,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null, ?string $content = null,
string $origin = null ?string $origin = null
): FetchQueryInterface; ): FetchQueryInterface;
/** /**

View File

@ -17,10 +17,10 @@ interface GenericDocForPersonProviderInterface
{ {
public function buildFetchQueryForPerson( public function buildFetchQueryForPerson(
Person $person, Person $person,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null, ?string $content = null,
string $origin = null ?string $origin = null
): FetchQueryInterface; ): FetchQueryInterface;
/** /**

View File

@ -43,9 +43,9 @@ final readonly class Manager
*/ */
public function countDocForAccompanyingPeriod( public function countDocForAccompanyingPeriod(
AccompanyingPeriod $accompanyingPeriod, AccompanyingPeriod $accompanyingPeriod,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null, ?string $content = null,
array $places = [] array $places = []
): int { ): int {
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places); ['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places);
@ -73,9 +73,9 @@ final readonly class Manager
public function countDocForPerson( public function countDocForPerson(
Person $person, Person $person,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null, ?string $content = null,
array $places = [] array $places = []
): int { ): int {
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places); ['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places);
@ -94,9 +94,9 @@ final readonly class Manager
AccompanyingPeriod $accompanyingPeriod, AccompanyingPeriod $accompanyingPeriod,
int $offset = 0, int $offset = 0,
int $limit = 20, int $limit = 20,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null, ?string $content = null,
array $places = [] array $places = []
): iterable { ): iterable {
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places); ['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places);
@ -137,9 +137,9 @@ final readonly class Manager
Person $person, Person $person,
int $offset = 0, int $offset = 0,
int $limit = 20, int $limit = 20,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null, ?string $content = null,
array $places = [] array $places = []
): iterable { ): iterable {
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places); ['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places);
@ -183,9 +183,9 @@ final readonly class Manager
*/ */
private function buildUnionQuery( private function buildUnionQuery(
AccompanyingPeriod|Person $linked, AccompanyingPeriod|Person $linked,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null, ?string $content = null,
array $places = [], array $places = [],
): array { ): array {
$queries = []; $queries = [];

View File

@ -34,7 +34,7 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen
) { ) {
} }
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
$classMetadata = $this->entityManager->getClassMetadata(AccompanyingCourseDocument::class); $classMetadata = $this->entityManager->getClassMetadata(AccompanyingCourseDocument::class);
@ -59,7 +59,7 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen
return $this->security->isGranted(AccompanyingCourseDocumentVoter::SEE, $accompanyingPeriod); return $this->security->isGranted(AccompanyingCourseDocumentVoter::SEE, $accompanyingPeriod);
} }
public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
$classMetadata = $this->entityManager->getClassMetadata(AccompanyingCourseDocument::class); $classMetadata = $this->entityManager->getClassMetadata(AccompanyingCourseDocument::class);
@ -108,7 +108,7 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen
return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person); return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person);
} }
private function addWhereClause(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery private function addWhereClause(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{ {
$classMetadata = $this->entityManager->getClassMetadata(AccompanyingCourseDocument::class); $classMetadata = $this->entityManager->getClassMetadata(AccompanyingCourseDocument::class);

View File

@ -32,10 +32,10 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe
public function buildFetchQueryForPerson( public function buildFetchQueryForPerson(
Person $person, Person $person,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null, ?string $content = null,
string $origin = null ?string $origin = null
): FetchQueryInterface { ): FetchQueryInterface {
return $this->personDocumentACLAwareRepository->buildFetchQueryForPerson( return $this->personDocumentACLAwareRepository->buildFetchQueryForPerson(
$person, $person,
@ -50,7 +50,7 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe
return $this->security->isGranted(PersonDocumentVoter::SEE, $person); return $this->security->isGranted(PersonDocumentVoter::SEE, $person);
} }
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
return $this->personDocumentACLAwareRepository->buildFetchQueryForAccompanyingPeriod($accompanyingPeriod, $startDate, $endDate, $content); return $this->personDocumentACLAwareRepository->buildFetchQueryForAccompanyingPeriod($accompanyingPeriod, $startDate, $endDate, $content);
} }

View File

@ -55,7 +55,7 @@ class AccompanyingCourseDocumentRepository implements ObjectRepository
return $this->repository->findAll(); return $this->repository->findAll();
} }
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null)
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -41,7 +41,7 @@ class DocumentCategoryRepository implements ObjectRepository
return $this->repository->findAll(); return $this->repository->findAll();
} }
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null)
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -48,14 +48,14 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA
return $qb; return $qb;
} }
public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface
{ {
$query = $this->buildBaseFetchQueryForPerson($person, $startDate, $endDate, $content); $query = $this->buildBaseFetchQueryForPerson($person, $startDate, $endDate, $content);
return $this->addFetchQueryByPersonACL($query, $person); return $this->addFetchQueryByPersonACL($query, $person);
} }
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $period, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface
{ {
$personDocMetadata = $this->em->getClassMetadata(PersonDocument::class); $personDocMetadata = $this->em->getClassMetadata(PersonDocument::class);
$participationMetadata = $this->em->getClassMetadata(AccompanyingPeriodParticipation::class); $participationMetadata = $this->em->getClassMetadata(AccompanyingPeriodParticipation::class);
@ -114,7 +114,7 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA
return $this->addFilterClauses($query, $startDate, $endDate, $content); return $this->addFilterClauses($query, $startDate, $endDate, $content);
} }
public function buildBaseFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery public function buildBaseFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{ {
$personDocMetadata = $this->em->getClassMetadata(PersonDocument::class); $personDocMetadata = $this->em->getClassMetadata(PersonDocument::class);
@ -134,7 +134,7 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA
return $this->addFilterClauses($query, $startDate, $endDate, $content); return $this->addFilterClauses($query, $startDate, $endDate, $content);
} }
private function addFilterClauses(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery private function addFilterClauses(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{ {
$personDocMetadata = $this->em->getClassMetadata(PersonDocument::class); $personDocMetadata = $this->em->getClassMetadata(PersonDocument::class);

View File

@ -29,15 +29,15 @@ interface PersonDocumentACLAwareRepositoryInterface
public function buildFetchQueryForPerson( public function buildFetchQueryForPerson(
Person $person, Person $person,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null ?string $content = null
): FetchQueryInterface; ): FetchQueryInterface;
public function buildFetchQueryForAccompanyingPeriod( public function buildFetchQueryForAccompanyingPeriod(
AccompanyingPeriod $period, AccompanyingPeriod $period,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null ?string $content = null
): FetchQueryInterface; ): FetchQueryInterface;
} }

View File

@ -39,7 +39,7 @@ readonly class PersonDocumentRepository implements ObjectRepository
return $this->repository->findAll(); return $this->repository->findAll();
} }
public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null) public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null)
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -44,7 +44,7 @@ final class StoredObjectRepository implements ObjectRepository
* *
* @return array<int, StoredObject> * @return array<int, StoredObject>
*/ */
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
{ {
return $this->repository->findBy($criteria, $orderBy, $limit, $offset); return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
} }

View File

@ -136,13 +136,13 @@ final readonly class WopiEditTwigExtensionRuntime implements RuntimeExtensionInt
} }
/** /**
* @param array{small: boolean} $options * @param array{small: bool} $options
* *
* @throws \Twig\Error\LoaderError * @throws \Twig\Error\LoaderError
* @throws \Twig\Error\RuntimeError * @throws \Twig\Error\RuntimeError
* @throws \Twig\Error\SyntaxError * @throws \Twig\Error\SyntaxError
*/ */
public function renderButtonGroup(Environment $environment, StoredObject $document, string $title = null, bool $canEdit = true, array $options = []): string public function renderButtonGroup(Environment $environment, StoredObject $document, ?string $title = null, bool $canEdit = true, array $options = []): string
{ {
return $environment->render(self::TEMPLATE_BUTTON_GROUP, [ return $environment->render(self::TEMPLATE_BUTTON_GROUP, [
'document' => $document, 'document' => $document,
@ -153,7 +153,7 @@ final readonly class WopiEditTwigExtensionRuntime implements RuntimeExtensionInt
]); ]);
} }
public function renderEditButton(Environment $environment, StoredObject $document, array $options = null): string public function renderEditButton(Environment $environment, StoredObject $document, ?array $options = null): string
{ {
return $environment->render(self::TEMPLATE, [ return $environment->render(self::TEMPLATE, [
'document' => $document, 'document' => $document,

View File

@ -174,7 +174,7 @@ class ManagerTest extends KernelTestCase
final readonly class SimpleGenericDocAccompanyingPeriodProvider implements GenericDocForAccompanyingPeriodProviderInterface final readonly class SimpleGenericDocAccompanyingPeriodProvider implements GenericDocForAccompanyingPeriodProviderInterface
{ {
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
$query = new FetchQuery( $query = new FetchQuery(
'accompanying_course_document_dummy', 'accompanying_course_document_dummy',
@ -196,7 +196,7 @@ final readonly class SimpleGenericDocAccompanyingPeriodProvider implements Gener
final readonly class SimpleGenericDocPersonProvider implements GenericDocForPersonProviderInterface final readonly class SimpleGenericDocPersonProvider implements GenericDocForPersonProviderInterface
{ {
public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {
$query = new FetchQuery( $query = new FetchQuery(
'dummy_person_doc', 'dummy_person_doc',

View File

@ -40,7 +40,7 @@ class AccompanyingCourseDocumentGenericDocProviderTest extends KernelTestCase
/** /**
* @dataProvider provideSearchArguments * @dataProvider provideSearchArguments
*/ */
public function testWithoutAnyArgument(?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, string $content = null): void public function testWithoutAnyArgument(?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?string $content = null): void
{ {
$period = $this->entityManager->createQuery('SELECT a FROM '.AccompanyingPeriod::class.' a') $period = $this->entityManager->createQuery('SELECT a FROM '.AccompanyingPeriod::class.' a')
->setMaxResults(1) ->setMaxResults(1)

View File

@ -53,7 +53,7 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase
* @throws \Doctrine\ORM\NoResultException * @throws \Doctrine\ORM\NoResultException
* @throws \Doctrine\ORM\NonUniqueResultException * @throws \Doctrine\ORM\NonUniqueResultException
*/ */
public function testBuildFetchQueryForPerson(\DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): void public function testBuildFetchQueryForPerson(?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): void
{ {
$centerManager = $this->prophesize(CenterResolverManagerInterface::class); $centerManager = $this->prophesize(CenterResolverManagerInterface::class);
$centerManager->resolveCenters(Argument::type(Person::class)) $centerManager->resolveCenters(Argument::type(Person::class))
@ -92,9 +92,9 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase
*/ */
public function testBuildFetchQueryForAccompanyingPeriod( public function testBuildFetchQueryForAccompanyingPeriod(
AccompanyingPeriod $period, AccompanyingPeriod $period,
\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $startDate = null,
\DateTimeImmutable $endDate = null, ?\DateTimeImmutable $endDate = null,
string $content = null ?string $content = null
): void { ): void {
$centerManager = $this->prophesize(CenterResolverManagerInterface::class); $centerManager = $this->prophesize(CenterResolverManagerInterface::class);
$centerManager->resolveCenters(Argument::type(Person::class)) $centerManager->resolveCenters(Argument::type(Person::class))

View File

@ -90,7 +90,7 @@ final class StoredObjectManagerTest extends TestCase
/** /**
* @dataProvider getDataProvider * @dataProvider getDataProvider
*/ */
public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, string $exceptionClass = null) public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null)
{ {
if (null !== $exceptionClass) { if (null !== $exceptionClass) {
$this->expectException($exceptionClass); $this->expectException($exceptionClass);
@ -104,7 +104,7 @@ final class StoredObjectManagerTest extends TestCase
/** /**
* @dataProvider getDataProvider * @dataProvider getDataProvider
*/ */
public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, string $exceptionClass = null) public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null)
{ {
if (null !== $exceptionClass) { if (null !== $exceptionClass) {
$this->expectException($exceptionClass); $this->expectException($exceptionClass);

View File

@ -136,7 +136,7 @@ class Event implements HasCenterInterface, HasScopeInterface
return $this->id; return $this->id;
} }
public function getModerator(): null|User public function getModerator(): User|null
{ {
return $this->moderator; return $this->moderator;
} }

View File

@ -83,7 +83,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
/** /**
* Get event. * Get event.
*/ */
public function getEvent(): null|Event public function getEvent(): Event|null
{ {
return $this->event; return $this->event;
} }
@ -121,7 +121,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
/** /**
* Get role. * Get role.
*/ */
public function getRole(): null|Role public function getRole(): Role|null
{ {
return $this->role; return $this->role;
} }
@ -141,7 +141,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
/** /**
* Get status. * Get status.
*/ */
public function getStatus(): null|Status public function getStatus(): Status|null
{ {
return $this->status; return $this->status;
} }
@ -233,7 +233,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
* *
* @return Participation * @return Participation
*/ */
public function setEvent(Event $event = null) public function setEvent(?Event $event = null)
{ {
if ($this->event !== $event) { if ($this->event !== $event) {
$this->update(); $this->update();
@ -249,7 +249,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
* *
* @return Participation * @return Participation
*/ */
public function setPerson(Person $person = null) public function setPerson(?Person $person = null)
{ {
if ($person !== $this->person) { if ($person !== $this->person) {
$this->update(); $this->update();
@ -265,7 +265,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
* *
* @return Participation * @return Participation
*/ */
public function setRole(Role $role = null) public function setRole(?Role $role = null)
{ {
if ($role !== $this->role) { if ($role !== $this->role) {
$this->update(); $this->update();
@ -280,7 +280,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
* *
* @return Participation * @return Participation
*/ */
public function setStatus(Status $status = null) public function setStatus(?Status $status = null)
{ {
if ($this->status !== $status) { if ($this->status !== $status) {
$this->update(); $this->update();

View File

@ -125,7 +125,7 @@ class Role
* *
* @return Role * @return Role
*/ */
public function setType(EventType $type = null) public function setType(?EventType $type = null)
{ {
$this->type = $type; $this->type = $type;

View File

@ -125,7 +125,7 @@ class Status
* *
* @return Status * @return Status
*/ */
public function setType(EventType $type = null) public function setType(?EventType $type = null)
{ {
$this->type = $type; $this->type = $type;

View File

@ -41,7 +41,7 @@ class EventChoiceLoader implements ChoiceLoaderInterface
*/ */
public function __construct( public function __construct(
EntityRepository $eventRepository, EntityRepository $eventRepository,
array $centers = null ?array $centers = null
) { ) {
$this->eventRepository = $eventRepository; $this->eventRepository = $eventRepository;

View File

@ -181,7 +181,7 @@ class CRUDController extends AbstractController
/** /**
* Count the number of entities. * Count the number of entities.
*/ */
protected function countEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null): int protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int
{ {
return $this->buildQueryEntities($action, $request) return $this->buildQueryEntities($action, $request)
->select('COUNT(e)') ->select('COUNT(e)')
@ -210,7 +210,7 @@ class CRUDController extends AbstractController
* It is preferable to override customizeForm instead of overriding * It is preferable to override customizeForm instead of overriding
* this method. * this method.
*/ */
protected function createFormFor(string $action, mixed $entity, string $formClass = null, array $formOptions = []): FormInterface protected function createFormFor(string $action, mixed $entity, ?string $formClass = null, array $formOptions = []): FormInterface
{ {
$formClass ??= $this->getFormClassFor($action); $formClass ??= $this->getFormClassFor($action);
@ -463,7 +463,7 @@ class CRUDController extends AbstractController
* *
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/ */
protected function formEditAction(string $action, Request $request, mixed $id, string $formClass = null, array $formOptions = []): Response protected function formEditAction(string $action, Request $request, mixed $id, ?string $formClass = null, array $formOptions = []): Response
{ {
$entity = $this->getEntity($action, $id, $request); $entity = $this->getEntity($action, $id, $request);
@ -660,7 +660,7 @@ class CRUDController extends AbstractController
Request $request, Request $request,
int $totalItems, int $totalItems,
PaginatorInterface $paginator, PaginatorInterface $paginator,
FilterOrderHelper $filterOrder = null ?FilterOrderHelper $filterOrder = null
) { ) {
$query = $this->queryEntities($action, $request, $paginator, $filterOrder); $query = $this->queryEntities($action, $request, $paginator, $filterOrder);
@ -670,7 +670,7 @@ class CRUDController extends AbstractController
/** /**
* @return \Chill\MainBundle\Entity\Center[] * @return \Chill\MainBundle\Entity\Center[]
*/ */
protected function getReachableCenters(string $role, Scope $scope = null) protected function getReachableCenters(string $role, ?Scope $scope = null)
{ {
return $this->getAuthorizationHelper() return $this->getAuthorizationHelper()
->getReachableCenters($this->getUser(), $role, $scope); ->getReachableCenters($this->getUser(), $role, $scope);
@ -934,7 +934,7 @@ class CRUDController extends AbstractController
* *
* @return type * @return type
*/ */
protected function queryEntities(string $action, Request $request, PaginatorInterface $paginator, FilterOrderHelper $filterOrder = null) protected function queryEntities(string $action, Request $request, PaginatorInterface $paginator, ?FilterOrderHelper $filterOrder = null)
{ {
$query = $this->buildQueryEntities($action, $request) $query = $this->buildQueryEntities($action, $request)
->setFirstResult($paginator->getCurrentPage()->getFirstItemNumber()) ->setFirstResult($paginator->getCurrentPage()->getFirstItemNumber())

View File

@ -334,7 +334,7 @@ class ExportController extends AbstractController
* When the method is POST, the form is stored if valid, and a redirection * When the method is POST, the form is stored if valid, and a redirection
* is done to next step. * is done to next step.
*/ */
private function exportFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, SavedExport $savedExport = null): Response private function exportFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, ?SavedExport $savedExport = null): Response
{ {
$exportManager = $this->exportManager; $exportManager = $this->exportManager;
@ -392,7 +392,7 @@ class ExportController extends AbstractController
* If the form is posted and valid, store the data in session and * If the form is posted and valid, store the data in session and
* redirect to the next step. * redirect to the next step.
*/ */
private function formatterFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, SavedExport $savedExport = null): Response private function formatterFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, ?SavedExport $savedExport = null): Response
{ {
// check we have data from the previous step (export step) // check we have data from the previous step (export step)
$data = $this->session->get('export_step', null); $data = $this->session->get('export_step', null);
@ -521,7 +521,7 @@ class ExportController extends AbstractController
* *
* @return Response * @return Response
*/ */
private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, SavedExport $savedExport = null) private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, ?SavedExport $savedExport = null)
{ {
if (!$this->filterStatsByCenters) { if (!$this->filterStatsByCenters) {
return $this->redirectToRoute('chill_main_export_new', [ return $this->redirectToRoute('chill_main_export_new', [

View File

@ -400,7 +400,7 @@ final class PermissionsGroupController extends AbstractController
* get a role scope by his parameters. The role scope is persisted if it * get a role scope by his parameters. The role scope is persisted if it
* doesn't exist in database. * doesn't exist in database.
*/ */
protected function getPersistentRoleScopeBy(string $role, Scope $scope = null): RoleScope protected function getPersistentRoleScopeBy(string $role, ?Scope $scope = null): RoleScope
{ {
$roleScope = $this->roleScopeRepository $roleScope = $this->roleScopeRepository
->findOneBy(['role' => $role, 'scope' => $scope]); ->findOneBy(['role' => $role, 'scope' => $scope]);

View File

@ -268,7 +268,7 @@ class UserController extends CRUDController
->build(); ->build();
} }
protected function countEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null): int protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int
{ {
if (!$filterOrder instanceof FilterOrderHelper) { if (!$filterOrder instanceof FilterOrderHelper) {
return parent::countEntities($action, $request, $filterOrder); return parent::countEntities($action, $request, $filterOrder);
@ -281,7 +281,7 @@ class UserController extends CRUDController
return $this->userRepository->countByUsernameOrEmail($filterOrder->getQueryString()); return $this->userRepository->countByUsernameOrEmail($filterOrder->getQueryString());
} }
protected function createFormFor(string $action, $entity, string $formClass = null, array $formOptions = []): FormInterface protected function createFormFor(string $action, $entity, ?string $formClass = null, array $formOptions = []): FormInterface
{ {
// for "new", add special config // for "new", add special config
if ('new' === $action) { if ('new' === $action) {
@ -325,7 +325,7 @@ class UserController extends CRUDController
Request $request, Request $request,
int $totalItems, int $totalItems,
PaginatorInterface $paginator, PaginatorInterface $paginator,
FilterOrderHelper $filterOrder = null ?FilterOrderHelper $filterOrder = null
) { ) {
if (0 === $totalItems) { if (0 === $totalItems) {
return []; return [];

View File

@ -28,5 +28,5 @@ interface CronJobInterface
* *
* @return array|null optionally return an array with the same data than the previous execution * @return array|null optionally return an array with the same data than the previous execution
*/ */
public function run(array $lastExecutionData): null|array; public function run(array $lastExecutionData): array|null;
} }

View File

@ -58,7 +58,7 @@ final readonly class CronManager implements CronManagerInterface
) { ) {
} }
public function run(string $forceJob = null): void public function run(?string $forceJob = null): void
{ {
if (null !== $forceJob) { if (null !== $forceJob) {
$this->runForce($forceJob); $this->runForce($forceJob);

View File

@ -16,5 +16,5 @@ interface CronManagerInterface
/** /**
* Execute one job, with a given priority, or the given job (identified by his key). * Execute one job, with a given priority, or the given job (identified by his key).
*/ */
public function run(string $forceJob = null): void; public function run(?string $forceJob = null): void;
} }

View File

@ -50,7 +50,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
$manager->flush(); $manager->flush();
} }
public function setContainer(ContainerInterface $container = null) public function setContainer(?ContainerInterface $container = null)
{ {
$this->container = $container; $this->container = $container;
} }

View File

@ -43,7 +43,7 @@ class LoadCountries extends AbstractFixture implements ContainerAwareInterface,
$manager->flush(); $manager->flush();
} }
public function setContainer(ContainerInterface $container = null) public function setContainer(?ContainerInterface $container = null)
{ {
$this->container = $container; $this->container = $container;
} }

View File

@ -57,7 +57,7 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface,
$manager->flush(); $manager->flush();
} }
public function setContainer(ContainerInterface $container = null) public function setContainer(?ContainerInterface $container = null)
{ {
$this->container = $container; $this->container = $container;
} }

View File

@ -65,7 +65,7 @@ class LoadLocationType extends AbstractFixture implements ContainerAwareInterfac
$manager->flush(); $manager->flush();
} }
public function setContainer(ContainerInterface $container = null) public function setContainer(?ContainerInterface $container = null)
{ {
$this->container = $container; $this->container = $container;
} }

View File

@ -92,7 +92,7 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde
$manager->flush(); $manager->flush();
} }
public function setContainer(ContainerInterface $container = null) public function setContainer(?ContainerInterface $container = null)
{ {
if (null === $container) { if (null === $container) {
throw new \LogicException('$container should not be null'); throw new \LogicException('$container should not be null');

View File

@ -29,7 +29,7 @@ class Extract extends FunctionNode
{ {
private string $field; private string $field;
private null|\Doctrine\ORM\Query\AST\Node|string $value = null; private \Doctrine\ORM\Query\AST\Node|string|null $value = null;
// private PathExpression $value; // private PathExpression $value;
// private FunctionNode $value; // private FunctionNode $value;
// private DateDiffFunction $value; // private DateDiffFunction $value;

View File

@ -18,7 +18,7 @@ use Doctrine\ORM\Query\SqlWalker;
class JsonExtract extends FunctionNode class JsonExtract extends FunctionNode
{ {
private null|\Doctrine\ORM\Query\AST\Node|string $element = null; private \Doctrine\ORM\Query\AST\Node|string|null $element = null;
private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $keyToExtract = null; private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $keyToExtract = null;

View File

@ -23,7 +23,7 @@ class ToChar extends FunctionNode
{ {
private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $datetime = null; private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $datetime = null;
private null|\Doctrine\ORM\Query\AST\Node|string $fmt = null; private \Doctrine\ORM\Query\AST\Node|string|null $fmt = null;
public function getSql(SqlWalker $sqlWalker) public function getSql(SqlWalker $sqlWalker)
{ {

View File

@ -39,7 +39,7 @@ final class FlatHierarchyEntityHydrator extends ObjectHydrator
); );
} }
private function flatListGenerator(array $hashMap, object $parent = null): \Generator private function flatListGenerator(array $hashMap, ?object $parent = null): \Generator
{ {
$parent = null === $parent ? null : spl_object_id($parent); $parent = null === $parent ? null : spl_object_id($parent);
$hashMap += [$parent => []]; $hashMap += [$parent => []];

View File

@ -440,7 +440,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
return $this->getIsNoAddress(); return $this->getIsNoAddress();
} }
public function setAddressReference(AddressReference $addressReference = null): Address public function setAddressReference(?AddressReference $addressReference = null): Address
{ {
$this->addressReference = $addressReference; $this->addressReference = $addressReference;
@ -529,7 +529,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
* *
* @return Address * @return Address
*/ */
public function setPostcode(PostalCode $postcode = null) public function setPostcode(?PostalCode $postcode = null)
{ {
$this->postcode = $postcode; $this->postcode = $postcode;
@ -620,7 +620,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
return $this; return $this;
} }
public function setValidTo(\DateTimeInterface $validTo = null): self public function setValidTo(?\DateTimeInterface $validTo = null): self
{ {
$this->validTo = $validTo; $this->validTo = $validTo;

View File

@ -219,7 +219,7 @@ class AddressReference
* *
* @return Address * @return Address
*/ */
public function setPostcode(PostalCode $postcode = null) public function setPostcode(?PostalCode $postcode = null)
{ {
$this->postcode = $postcode; $this->postcode = $postcode;

View File

@ -210,7 +210,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
* *
* @return PostalCode * @return PostalCode
*/ */
public function setCountry(Country $country = null) public function setCountry(?Country $country = null)
{ {
$this->country = $country; $this->country = $country;

View File

@ -78,14 +78,14 @@ class RoleScope
return $this->scope; return $this->scope;
} }
public function setRole(string $role = null): self public function setRole(?string $role = null): self
{ {
$this->role = $role; $this->role = $role;
return $this; return $this;
} }
public function setScope(Scope $scope = null): self public function setScope(?Scope $scope = null): self
{ {
$this->scope = $scope; $this->scope = $scope;

View File

@ -274,7 +274,7 @@ class User implements UserInterface, \Stringable
return $this->mainLocation; return $this->mainLocation;
} }
public function getMainScope(\DateTimeImmutable $at = null): ?Scope public function getMainScope(?\DateTimeImmutable $at = null): ?Scope
{ {
$at ??= new \DateTimeImmutable('now'); $at ??= new \DateTimeImmutable('now');
@ -326,7 +326,7 @@ class User implements UserInterface, \Stringable
return $this->salt; return $this->salt;
} }
public function getUserJob(\DateTimeImmutable $at = null): ?UserJob public function getUserJob(?\DateTimeImmutable $at = null): ?UserJob
{ {
$at ??= new \DateTimeImmutable('now'); $at ??= new \DateTimeImmutable('now');

View File

@ -84,7 +84,7 @@ class UserJobHistory
return $this; return $this;
} }
public function setJob(?UserJob $job): User\UserJobHistory public function setJob(?UserJob $job): UserJobHistory
{ {
$this->job = $job; $this->job = $job;
@ -98,7 +98,7 @@ class UserJobHistory
return $this; return $this;
} }
public function setUser(User $user): User\UserJobHistory public function setUser(User $user): UserJobHistory
{ {
$this->user = $user; $this->user = $user;

View File

@ -84,7 +84,7 @@ class UserScopeHistory
return $this; return $this;
} }
public function setScope(?Scope $scope): User\UserScopeHistory public function setScope(?Scope $scope): UserScopeHistory
{ {
$this->scope = $scope; $this->scope = $scope;
@ -98,7 +98,7 @@ class UserScopeHistory
return $this; return $this;
} }
public function setUser(User $user): User\UserScopeHistory public function setUser(User $user): UserScopeHistory
{ {
$this->user = $user; $this->user = $user;

Some files were not shown because too many files have changed in this diff Show More