mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
upgrade php-cs 3.49
This commit is contained in:
parent
51ebc253aa
commit
036fe8d6f8
@ -57,7 +57,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
||||
|
||||
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) {
|
||||
return 'export.aggregator.acp.by_activity_type.activity_type';
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
|
||||
|
||||
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) {
|
||||
return 'export.aggregator.activity.by_activity_presence.header';
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ class ActivityTypeAggregator implements AggregatorInterface
|
||||
|
||||
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) {
|
||||
return 'Activity type';
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
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);
|
||||
$activityMetadata = $this->em->getClassMetadata(Activity::class);
|
||||
@ -72,7 +72,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
|
||||
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);
|
||||
$activityMetadata = $this->em->getClassMetadata(Activity::class);
|
||||
@ -123,7 +123,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
|
||||
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);
|
||||
|
||||
|
@ -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
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class ActivityPresenceRepository implements ActivityPresenceRepositoryInterface
|
||||
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);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ interface ActivityPresenceRepositoryInterface
|
||||
/**
|
||||
* @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;
|
||||
|
||||
|
@ -48,7 +48,7 @@ final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
|
@ -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);
|
||||
$activityMetadata = $this->em->getClassMetadata(Activity::class);
|
||||
@ -100,7 +100,7 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen
|
||||
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
|
||||
->buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext($person, $startDate, $endDate, $content);
|
||||
|
@ -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(
|
||||
$person,
|
||||
|
@ -157,7 +157,7 @@ final class ActivityVoterTest extends KernelTestCase
|
||||
*
|
||||
* @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
|
||||
|
@ -49,7 +49,7 @@ final class AsideActivityController extends CRUDController
|
||||
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);
|
||||
|
||||
|
@ -49,7 +49,7 @@ class AsideActivityCategoryRepository implements ObjectRepository
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
@ -132,14 +132,14 @@ abstract class AbstractElement
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setComment(string $comment = null): self
|
||||
public function setComment(?string $comment = null): self
|
||||
{
|
||||
$this->comment = $comment;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setEndDate(\DateTimeInterface $endDate = null): self
|
||||
public function setEndDate(?\DateTimeInterface $endDate = null): self
|
||||
{
|
||||
if ($endDate instanceof \DateTime) {
|
||||
$this->endDate = \DateTimeImmutable::createFromMutable($endDate);
|
||||
|
@ -66,7 +66,7 @@ final class ChargeKindRepository implements ChargeKindRepositoryInterface
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ interface ChargeKindRepositoryInterface extends ObjectRepository
|
||||
/**
|
||||
* @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;
|
||||
|
||||
|
@ -71,7 +71,7 @@ final class ResourceKindRepository implements ResourceKindRepositoryInterface
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ interface ResourceKindRepositoryInterface extends ObjectRepository
|
||||
/**
|
||||
* @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;
|
||||
|
||||
|
@ -32,7 +32,7 @@ final class Version20221207105407 extends AbstractMigration implements Container
|
||||
return 'Use new budget admin entities';
|
||||
}
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
public function setContainer(?ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace Chill\CalendarBundle\Exception;
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface
|
||||
/**
|
||||
* @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);
|
||||
|
||||
|
@ -18,5 +18,5 @@ interface MSUserAbsenceReaderInterface
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ class MachineHttpClient implements HttpClientInterface
|
||||
|
||||
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();
|
||||
}
|
||||
@ -68,7 +68,7 @@ class MachineHttpClient implements HttpClientInterface
|
||||
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);
|
||||
}
|
||||
|
@ -178,8 +178,8 @@ class MapCalendarToUser
|
||||
public function writeSubscriptionMetadata(
|
||||
User $user,
|
||||
int $expiration,
|
||||
string $id = null,
|
||||
string $secret = null
|
||||
?string $id = null,
|
||||
?string $secret = null
|
||||
): void {
|
||||
$user->setAttributeByDomain(self::METADATA_KEY, self::EXPIRATION_SUBSCRIPTION_EVENT, $expiration);
|
||||
|
||||
|
@ -29,7 +29,7 @@ class OnBehalfOfUserHttpClient
|
||||
|
||||
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();
|
||||
}
|
||||
@ -63,7 +63,7 @@ class OnBehalfOfUserHttpClient
|
||||
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);
|
||||
}
|
||||
|
@ -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) {
|
||||
return;
|
||||
|
@ -46,7 +46,7 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface
|
||||
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
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ interface RemoteCalendarConnectorInterface
|
||||
*/
|
||||
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;
|
||||
|
||||
|
@ -159,7 +159,7 @@ class CalendarACLAwareRepository implements CalendarACLAwareRepositoryInterface
|
||||
/**
|
||||
* @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');
|
||||
|
||||
@ -178,7 +178,7 @@ class CalendarACLAwareRepository implements CalendarACLAwareRepositoryInterface
|
||||
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)
|
||||
->select('c');
|
||||
|
@ -46,7 +46,7 @@ interface CalendarACLAwareRepositoryInterface
|
||||
/**
|
||||
* @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.
|
||||
@ -58,5 +58,5 @@ interface CalendarACLAwareRepositoryInterface
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class CalendarDocRepository implements ObjectRepository, CalendarDocRepositoryIn
|
||||
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);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ interface CalendarDocRepositoryInterface
|
||||
/**
|
||||
* @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;
|
||||
|
||||
|
@ -52,7 +52,7 @@ class CalendarRangeRepository implements ObjectRepository
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
@ -64,8 +64,8 @@ class CalendarRangeRepository implements ObjectRepository
|
||||
User $user,
|
||||
\DateTimeImmutable $from,
|
||||
\DateTimeImmutable $to,
|
||||
int $limit = null,
|
||||
int $offset = null
|
||||
?int $limit = null,
|
||||
?int $offset = null
|
||||
): array {
|
||||
$qb = $this->buildQueryAvailableRangesForUser($user, $from, $to);
|
||||
|
||||
|
@ -46,7 +46,7 @@ class CalendarRepository implements ObjectRepository
|
||||
->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);
|
||||
}
|
||||
@ -67,7 +67,7 @@ class CalendarRepository implements ObjectRepository
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
@ -75,7 +75,7 @@ class CalendarRepository implements ObjectRepository
|
||||
/**
|
||||
* @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(
|
||||
[
|
||||
@ -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');
|
||||
|
||||
@ -105,7 +105,7 @@ class CalendarRepository implements ObjectRepository
|
||||
/**
|
||||
* @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');
|
||||
|
||||
|
@ -41,7 +41,7 @@ class InviteRepository implements ObjectRepository
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen
|
||||
/**
|
||||
* @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);
|
||||
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
|
||||
@ -91,7 +91,7 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen
|
||||
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);
|
||||
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
|
||||
|
@ -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);
|
||||
|
||||
@ -74,7 +74,7 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe
|
||||
/**
|
||||
* @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);
|
||||
$storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class);
|
||||
|
@ -202,8 +202,8 @@ final class CalendarContextTest extends TestCase
|
||||
}
|
||||
|
||||
private function buildCalendarContext(
|
||||
EntityManagerInterface $entityManager = null,
|
||||
NormalizerInterface $normalizer = null
|
||||
?EntityManagerInterface $entityManager = null,
|
||||
?NormalizerInterface $normalizer = null
|
||||
): CalendarContext {
|
||||
$baseContext = $this->prophesize(BaseContextData::class);
|
||||
$baseContext->getData(null)->willReturn(['base_context' => 'data']);
|
||||
|
@ -363,7 +363,7 @@ class CustomFieldsGroupController extends AbstractController
|
||||
*
|
||||
* @return \Symfony\Component\Form\Form
|
||||
*/
|
||||
private function createMakeDefaultForm(CustomFieldsGroup $group = null)
|
||||
private function createMakeDefaultForm(?CustomFieldsGroup $group = null)
|
||||
{
|
||||
return $this->createFormBuilder($group, [
|
||||
'method' => 'POST',
|
||||
|
@ -156,7 +156,7 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
return $serialized;
|
||||
}
|
||||
|
||||
public function extractOtherValue(CustomField $cf, array $data = null)
|
||||
public function extractOtherValue(CustomField $cf, ?array $data = null)
|
||||
{
|
||||
return $data['_other'];
|
||||
}
|
||||
@ -355,7 +355,7 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
* If the value had an 'allow_other' = true option, the returned value
|
||||
* **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) {
|
||||
return null;
|
||||
|
@ -212,7 +212,7 @@ class CustomField
|
||||
*
|
||||
* @return CustomField
|
||||
*/
|
||||
public function setCustomFieldsGroup(CustomFieldsGroup $customFieldGroup = null)
|
||||
public function setCustomFieldsGroup(?CustomFieldsGroup $customFieldGroup = null)
|
||||
{
|
||||
$this->customFieldGroup = $customFieldGroup;
|
||||
|
||||
|
@ -182,7 +182,7 @@ class Option
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function setParent(Option $parent = null)
|
||||
public function setParent(?Option $parent = null)
|
||||
{
|
||||
$this->parent = $parent;
|
||||
$this->key = $parent->getKey();
|
||||
|
@ -139,7 +139,7 @@ class CustomFieldsGroup
|
||||
/**
|
||||
* 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
|
||||
if (null !== $language) {
|
||||
|
@ -84,7 +84,7 @@ class CustomFieldProvider implements ContainerAwareInterface
|
||||
*
|
||||
* @see \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer()
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
public function setContainer(?ContainerInterface $container = null)
|
||||
{
|
||||
if (null === $container) {
|
||||
throw new \LogicException('container should not be null');
|
||||
|
@ -13,5 +13,5 @@ namespace Chill\DocGeneratorBundle\GeneratorDriver;
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ namespace Chill\DocGeneratorBundle\GeneratorDriver\Exception;
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ final class RelatorioDriver implements DriverInterface
|
||||
$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(
|
||||
[
|
||||
|
@ -58,7 +58,7 @@ final class DocGeneratorTemplateRepository implements ObjectRepository
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
@ -85,7 +85,7 @@ final class DocGeneratorTemplateRepository implements ObjectRepository
|
||||
->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);
|
||||
}
|
||||
|
@ -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['isNull'] = true;
|
||||
|
@ -21,7 +21,7 @@ class BaseContextData
|
||||
{
|
||||
}
|
||||
|
||||
public function getData(User $user = null): array
|
||||
public function getData(?User $user = null): array
|
||||
{
|
||||
$data = [];
|
||||
|
||||
|
@ -46,10 +46,10 @@ class Generator implements GeneratorInterface
|
||||
DocGeneratorTemplate $template,
|
||||
int $entityId,
|
||||
array $contextGenerationDataNormalized,
|
||||
StoredObject $destinationStoredObject = null,
|
||||
?StoredObject $destinationStoredObject = null,
|
||||
bool $isTest = false,
|
||||
File $testFile = null,
|
||||
User $creator = null
|
||||
?File $testFile = null,
|
||||
?User $creator = null
|
||||
): ?string {
|
||||
if ($destinationStoredObject instanceof StoredObject && StoredObject::STATUS_PENDING !== $destinationStoredObject->getStatus()) {
|
||||
$this->logger->info(self::LOG_PREFIX.'Aborting generation of an already generated document');
|
||||
|
@ -16,7 +16,7 @@ class GeneratorException extends \RuntimeException
|
||||
/**
|
||||
* @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(
|
||||
'Could not generate the document',
|
||||
|
@ -33,9 +33,9 @@ interface GeneratorInterface
|
||||
DocGeneratorTemplate $template,
|
||||
int $entityId,
|
||||
array $contextGenerationDataNormalized,
|
||||
StoredObject $destinationStoredObject = null,
|
||||
?StoredObject $destinationStoredObject = null,
|
||||
bool $isTest = false,
|
||||
File $testFile = null,
|
||||
User $creator = null
|
||||
?File $testFile = null,
|
||||
?User $creator = null
|
||||
): ?string;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace Chill\DocGeneratorBundle\Service\Generator;
|
||||
|
||||
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(
|
||||
sprintf('Related entity not found: %s, %s', $relatedEntityClass, $relatedEntityId),
|
||||
|
@ -56,7 +56,7 @@ final class BaseContextDataTest extends KernelTestCase
|
||||
}
|
||||
|
||||
private function buildBaseContext(
|
||||
NormalizerInterface $normalizer = null
|
||||
?NormalizerInterface $normalizer = null
|
||||
): BaseContextData {
|
||||
return new BaseContextData(
|
||||
$normalizer ?? self::$container->get(NormalizerInterface::class)
|
||||
|
@ -138,7 +138,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setObject(StoredObject $object = null)
|
||||
public function setObject(?StoredObject $object = null)
|
||||
{
|
||||
$this->object = $object;
|
||||
|
||||
|
@ -17,10 +17,10 @@ interface GenericDocForAccompanyingPeriodProviderInterface
|
||||
{
|
||||
public function buildFetchQueryForAccompanyingPeriod(
|
||||
AccompanyingPeriod $accompanyingPeriod,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null,
|
||||
string $origin = null
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
?string $origin = null
|
||||
): FetchQueryInterface;
|
||||
|
||||
/**
|
||||
|
@ -17,10 +17,10 @@ interface GenericDocForPersonProviderInterface
|
||||
{
|
||||
public function buildFetchQueryForPerson(
|
||||
Person $person,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null,
|
||||
string $origin = null
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
?string $origin = null
|
||||
): FetchQueryInterface;
|
||||
|
||||
/**
|
||||
|
@ -43,9 +43,9 @@ final readonly class Manager
|
||||
*/
|
||||
public function countDocForAccompanyingPeriod(
|
||||
AccompanyingPeriod $accompanyingPeriod,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null,
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
array $places = []
|
||||
): int {
|
||||
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places);
|
||||
@ -73,9 +73,9 @@ final readonly class Manager
|
||||
|
||||
public function countDocForPerson(
|
||||
Person $person,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null,
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
array $places = []
|
||||
): int {
|
||||
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places);
|
||||
@ -94,9 +94,9 @@ final readonly class Manager
|
||||
AccompanyingPeriod $accompanyingPeriod,
|
||||
int $offset = 0,
|
||||
int $limit = 20,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null,
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
array $places = []
|
||||
): iterable {
|
||||
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places);
|
||||
@ -137,9 +137,9 @@ final readonly class Manager
|
||||
Person $person,
|
||||
int $offset = 0,
|
||||
int $limit = 20,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null,
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
array $places = []
|
||||
): iterable {
|
||||
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places);
|
||||
@ -183,9 +183,9 @@ final readonly class Manager
|
||||
*/
|
||||
private function buildUnionQuery(
|
||||
AccompanyingPeriod|Person $linked,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null,
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
array $places = [],
|
||||
): array {
|
||||
$queries = [];
|
||||
|
@ -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);
|
||||
|
||||
@ -59,7 +59,7 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen
|
||||
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);
|
||||
|
||||
@ -108,7 +108,7 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen
|
||||
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);
|
||||
|
||||
|
@ -32,10 +32,10 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe
|
||||
|
||||
public function buildFetchQueryForPerson(
|
||||
Person $person,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null,
|
||||
string $origin = null
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null,
|
||||
?string $origin = null
|
||||
): FetchQueryInterface {
|
||||
return $this->personDocumentACLAwareRepository->buildFetchQueryForPerson(
|
||||
$person,
|
||||
@ -50,7 +50,7 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe
|
||||
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);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ class AccompanyingCourseDocumentRepository implements ObjectRepository
|
||||
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);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class DocumentCategoryRepository implements ObjectRepository
|
||||
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);
|
||||
}
|
||||
|
@ -48,14 +48,14 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA
|
||||
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);
|
||||
|
||||
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);
|
||||
$participationMetadata = $this->em->getClassMetadata(AccompanyingPeriodParticipation::class);
|
||||
@ -114,7 +114,7 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA
|
||||
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);
|
||||
|
||||
@ -134,7 +134,7 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA
|
||||
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);
|
||||
|
||||
|
@ -29,15 +29,15 @@ interface PersonDocumentACLAwareRepositoryInterface
|
||||
|
||||
public function buildFetchQueryForPerson(
|
||||
Person $person,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null
|
||||
): FetchQueryInterface;
|
||||
|
||||
public function buildFetchQueryForAccompanyingPeriod(
|
||||
AccompanyingPeriod $period,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null
|
||||
): FetchQueryInterface;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ readonly class PersonDocumentRepository implements ObjectRepository
|
||||
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);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ final class StoredObjectRepository implements ObjectRepository
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
@ -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\RuntimeError
|
||||
* @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, [
|
||||
'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, [
|
||||
'document' => $document,
|
||||
|
@ -174,7 +174,7 @@ class ManagerTest extends KernelTestCase
|
||||
|
||||
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(
|
||||
'accompanying_course_document_dummy',
|
||||
@ -196,7 +196,7 @@ final readonly class SimpleGenericDocAccompanyingPeriodProvider implements Gener
|
||||
|
||||
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(
|
||||
'dummy_person_doc',
|
||||
|
@ -40,7 +40,7 @@ class AccompanyingCourseDocumentGenericDocProviderTest extends KernelTestCase
|
||||
/**
|
||||
* @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')
|
||||
->setMaxResults(1)
|
||||
|
@ -53,7 +53,7 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase
|
||||
* @throws \Doctrine\ORM\NoResultException
|
||||
* @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->resolveCenters(Argument::type(Person::class))
|
||||
@ -92,9 +92,9 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase
|
||||
*/
|
||||
public function testBuildFetchQueryForAccompanyingPeriod(
|
||||
AccompanyingPeriod $period,
|
||||
\DateTimeImmutable $startDate = null,
|
||||
\DateTimeImmutable $endDate = null,
|
||||
string $content = null
|
||||
?\DateTimeImmutable $startDate = null,
|
||||
?\DateTimeImmutable $endDate = null,
|
||||
?string $content = null
|
||||
): void {
|
||||
$centerManager = $this->prophesize(CenterResolverManagerInterface::class);
|
||||
$centerManager->resolveCenters(Argument::type(Person::class))
|
||||
|
@ -90,7 +90,7 @@ final class StoredObjectManagerTest extends TestCase
|
||||
/**
|
||||
* @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) {
|
||||
$this->expectException($exceptionClass);
|
||||
@ -104,7 +104,7 @@ final class StoredObjectManagerTest extends TestCase
|
||||
/**
|
||||
* @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) {
|
||||
$this->expectException($exceptionClass);
|
||||
|
@ -136,7 +136,7 @@ class Event implements HasCenterInterface, HasScopeInterface
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getModerator(): null|User
|
||||
public function getModerator(): User|null
|
||||
{
|
||||
return $this->moderator;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
|
||||
/**
|
||||
* Get event.
|
||||
*/
|
||||
public function getEvent(): null|Event
|
||||
public function getEvent(): Event|null
|
||||
{
|
||||
return $this->event;
|
||||
}
|
||||
@ -121,7 +121,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
|
||||
/**
|
||||
* Get role.
|
||||
*/
|
||||
public function getRole(): null|Role
|
||||
public function getRole(): Role|null
|
||||
{
|
||||
return $this->role;
|
||||
}
|
||||
@ -141,7 +141,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
|
||||
/**
|
||||
* Get status.
|
||||
*/
|
||||
public function getStatus(): null|Status
|
||||
public function getStatus(): Status|null
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
@ -233,7 +233,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
|
||||
*
|
||||
* @return Participation
|
||||
*/
|
||||
public function setEvent(Event $event = null)
|
||||
public function setEvent(?Event $event = null)
|
||||
{
|
||||
if ($this->event !== $event) {
|
||||
$this->update();
|
||||
@ -249,7 +249,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
|
||||
*
|
||||
* @return Participation
|
||||
*/
|
||||
public function setPerson(Person $person = null)
|
||||
public function setPerson(?Person $person = null)
|
||||
{
|
||||
if ($person !== $this->person) {
|
||||
$this->update();
|
||||
@ -265,7 +265,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
|
||||
*
|
||||
* @return Participation
|
||||
*/
|
||||
public function setRole(Role $role = null)
|
||||
public function setRole(?Role $role = null)
|
||||
{
|
||||
if ($role !== $this->role) {
|
||||
$this->update();
|
||||
@ -280,7 +280,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
|
||||
*
|
||||
* @return Participation
|
||||
*/
|
||||
public function setStatus(Status $status = null)
|
||||
public function setStatus(?Status $status = null)
|
||||
{
|
||||
if ($this->status !== $status) {
|
||||
$this->update();
|
||||
|
@ -125,7 +125,7 @@ class Role
|
||||
*
|
||||
* @return Role
|
||||
*/
|
||||
public function setType(EventType $type = null)
|
||||
public function setType(?EventType $type = null)
|
||||
{
|
||||
$this->type = $type;
|
||||
|
||||
|
@ -125,7 +125,7 @@ class Status
|
||||
*
|
||||
* @return Status
|
||||
*/
|
||||
public function setType(EventType $type = null)
|
||||
public function setType(?EventType $type = null)
|
||||
{
|
||||
$this->type = $type;
|
||||
|
||||
|
@ -41,7 +41,7 @@ class EventChoiceLoader implements ChoiceLoaderInterface
|
||||
*/
|
||||
public function __construct(
|
||||
EntityRepository $eventRepository,
|
||||
array $centers = null
|
||||
?array $centers = null
|
||||
) {
|
||||
$this->eventRepository = $eventRepository;
|
||||
|
||||
|
@ -181,7 +181,7 @@ class CRUDController extends AbstractController
|
||||
/**
|
||||
* 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)
|
||||
->select('COUNT(e)')
|
||||
@ -210,7 +210,7 @@ class CRUDController extends AbstractController
|
||||
* It is preferable to override customizeForm instead of overriding
|
||||
* 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);
|
||||
|
||||
@ -463,7 +463,7 @@ class CRUDController extends AbstractController
|
||||
*
|
||||
* @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);
|
||||
|
||||
@ -660,7 +660,7 @@ class CRUDController extends AbstractController
|
||||
Request $request,
|
||||
int $totalItems,
|
||||
PaginatorInterface $paginator,
|
||||
FilterOrderHelper $filterOrder = null
|
||||
?FilterOrderHelper $filterOrder = null
|
||||
) {
|
||||
$query = $this->queryEntities($action, $request, $paginator, $filterOrder);
|
||||
|
||||
@ -670,7 +670,7 @@ class CRUDController extends AbstractController
|
||||
/**
|
||||
* @return \Chill\MainBundle\Entity\Center[]
|
||||
*/
|
||||
protected function getReachableCenters(string $role, Scope $scope = null)
|
||||
protected function getReachableCenters(string $role, ?Scope $scope = null)
|
||||
{
|
||||
return $this->getAuthorizationHelper()
|
||||
->getReachableCenters($this->getUser(), $role, $scope);
|
||||
@ -934,7 +934,7 @@ class CRUDController extends AbstractController
|
||||
*
|
||||
* @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)
|
||||
->setFirstResult($paginator->getCurrentPage()->getFirstItemNumber())
|
||||
|
@ -334,7 +334,7 @@ class ExportController extends AbstractController
|
||||
* When the method is POST, the form is stored if valid, and a redirection
|
||||
* 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;
|
||||
|
||||
@ -392,7 +392,7 @@ class ExportController extends AbstractController
|
||||
* If the form is posted and valid, store the data in session and
|
||||
* 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)
|
||||
$data = $this->session->get('export_step', null);
|
||||
@ -521,7 +521,7 @@ class ExportController extends AbstractController
|
||||
*
|
||||
* @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) {
|
||||
return $this->redirectToRoute('chill_main_export_new', [
|
||||
|
@ -400,7 +400,7 @@ final class PermissionsGroupController extends AbstractController
|
||||
* get a role scope by his parameters. The role scope is persisted if it
|
||||
* 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
|
||||
->findOneBy(['role' => $role, 'scope' => $scope]);
|
||||
|
@ -268,7 +268,7 @@ class UserController extends CRUDController
|
||||
->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) {
|
||||
return parent::countEntities($action, $request, $filterOrder);
|
||||
@ -281,7 +281,7 @@ class UserController extends CRUDController
|
||||
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
|
||||
if ('new' === $action) {
|
||||
@ -325,7 +325,7 @@ class UserController extends CRUDController
|
||||
Request $request,
|
||||
int $totalItems,
|
||||
PaginatorInterface $paginator,
|
||||
FilterOrderHelper $filterOrder = null
|
||||
?FilterOrderHelper $filterOrder = null
|
||||
) {
|
||||
if (0 === $totalItems) {
|
||||
return [];
|
||||
|
@ -28,5 +28,5 @@ interface CronJobInterface
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
@ -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) {
|
||||
$this->runForce($forceJob);
|
||||
|
@ -16,5 +16,5 @@ interface CronManagerInterface
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
public function setContainer(?ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class LoadCountries extends AbstractFixture implements ContainerAwareInterface,
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
public function setContainer(?ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface,
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
public function setContainer(?ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class LoadLocationType extends AbstractFixture implements ContainerAwareInterfac
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
public function setContainer(?ContainerInterface $container = null)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
public function setContainer(?ContainerInterface $container = null)
|
||||
{
|
||||
if (null === $container) {
|
||||
throw new \LogicException('$container should not be null');
|
||||
|
@ -29,7 +29,7 @@ class Extract extends FunctionNode
|
||||
{
|
||||
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 FunctionNode $value;
|
||||
// private DateDiffFunction $value;
|
||||
|
@ -18,7 +18,7 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -23,7 +23,7 @@ class ToChar extends FunctionNode
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
@ -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);
|
||||
$hashMap += [$parent => []];
|
||||
|
@ -440,7 +440,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->getIsNoAddress();
|
||||
}
|
||||
|
||||
public function setAddressReference(AddressReference $addressReference = null): Address
|
||||
public function setAddressReference(?AddressReference $addressReference = null): Address
|
||||
{
|
||||
$this->addressReference = $addressReference;
|
||||
|
||||
@ -529,7 +529,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @return Address
|
||||
*/
|
||||
public function setPostcode(PostalCode $postcode = null)
|
||||
public function setPostcode(?PostalCode $postcode = null)
|
||||
{
|
||||
$this->postcode = $postcode;
|
||||
|
||||
@ -620,7 +620,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setValidTo(\DateTimeInterface $validTo = null): self
|
||||
public function setValidTo(?\DateTimeInterface $validTo = null): self
|
||||
{
|
||||
$this->validTo = $validTo;
|
||||
|
||||
|
@ -219,7 +219,7 @@ class AddressReference
|
||||
*
|
||||
* @return Address
|
||||
*/
|
||||
public function setPostcode(PostalCode $postcode = null)
|
||||
public function setPostcode(?PostalCode $postcode = null)
|
||||
{
|
||||
$this->postcode = $postcode;
|
||||
|
||||
|
@ -210,7 +210,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function setCountry(Country $country = null)
|
||||
public function setCountry(?Country $country = null)
|
||||
{
|
||||
$this->country = $country;
|
||||
|
||||
|
@ -78,14 +78,14 @@ class RoleScope
|
||||
return $this->scope;
|
||||
}
|
||||
|
||||
public function setRole(string $role = null): self
|
||||
public function setRole(?string $role = null): self
|
||||
{
|
||||
$this->role = $role;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setScope(Scope $scope = null): self
|
||||
public function setScope(?Scope $scope = null): self
|
||||
{
|
||||
$this->scope = $scope;
|
||||
|
||||
|
@ -274,7 +274,7 @@ class User implements UserInterface, \Stringable
|
||||
return $this->mainLocation;
|
||||
}
|
||||
|
||||
public function getMainScope(\DateTimeImmutable $at = null): ?Scope
|
||||
public function getMainScope(?\DateTimeImmutable $at = null): ?Scope
|
||||
{
|
||||
$at ??= new \DateTimeImmutable('now');
|
||||
|
||||
@ -326,7 +326,7 @@ class User implements UserInterface, \Stringable
|
||||
return $this->salt;
|
||||
}
|
||||
|
||||
public function getUserJob(\DateTimeImmutable $at = null): ?UserJob
|
||||
public function getUserJob(?\DateTimeImmutable $at = null): ?UserJob
|
||||
{
|
||||
$at ??= new \DateTimeImmutable('now');
|
||||
|
||||
|
@ -84,7 +84,7 @@ class UserJobHistory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setJob(?UserJob $job): User\UserJobHistory
|
||||
public function setJob(?UserJob $job): UserJobHistory
|
||||
{
|
||||
$this->job = $job;
|
||||
|
||||
@ -98,7 +98,7 @@ class UserJobHistory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUser(User $user): User\UserJobHistory
|
||||
public function setUser(User $user): UserJobHistory
|
||||
{
|
||||
$this->user = $user;
|
||||
|
||||
|
@ -84,7 +84,7 @@ class UserScopeHistory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setScope(?Scope $scope): User\UserScopeHistory
|
||||
public function setScope(?Scope $scope): UserScopeHistory
|
||||
{
|
||||
$this->scope = $scope;
|
||||
|
||||
@ -98,7 +98,7 @@ class UserScopeHistory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUser(User $user): User\UserScopeHistory
|
||||
public function setUser(User $user): UserScopeHistory
|
||||
{
|
||||
$this->user = $user;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user