mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 07:33:50 +00:00
Merge branch 'master' into upgrade-sf5
This commit is contained in:
@@ -29,7 +29,8 @@ final readonly class GenericDocForAccompanyingPeriodController
|
||||
private PaginatorFactory $paginator,
|
||||
private Security $security,
|
||||
private \Twig\Environment $twig,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Doctrine\DBAL\Exception
|
||||
|
@@ -29,7 +29,8 @@ final readonly class GenericDocForPerson
|
||||
private PaginatorFactory $paginator,
|
||||
private Security $security,
|
||||
private \Twig\Environment $twig,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Doctrine\DBAL\Exception
|
||||
|
@@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class StoredObjectApiController
|
||||
{
|
||||
public function __construct(private readonly Security $security) {}
|
||||
public function __construct(private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/doc-store/stored-object/{uuid}/is-ready")
|
||||
|
@@ -37,7 +37,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @ORM\JoinColumn(name="category_id_inside_bundle", referencedColumnName="id_inside_bundle")
|
||||
* })
|
||||
*/
|
||||
private ?\Chill\DocStoreBundle\Entity\DocumentCategory $category = null;
|
||||
private ?DocumentCategory $category = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
@@ -61,12 +61,12 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
|
||||
* message="Upload a document"
|
||||
* )
|
||||
*/
|
||||
private ?\Chill\DocStoreBundle\Entity\StoredObject $object = null;
|
||||
private ?StoredObject $object = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate")
|
||||
*/
|
||||
private ?\Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate $template = null;
|
||||
private ?DocGeneratorTemplate $template = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
@@ -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;
|
||||
|
||||
|
@@ -53,7 +53,8 @@ class DocumentCategory
|
||||
* @var int The id which is unique inside the bundle
|
||||
*/
|
||||
private $idInsideBundle
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function getBundleId() // ::class BundleClass (FQDN)
|
||||
{
|
||||
|
@@ -43,7 +43,7 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt
|
||||
*
|
||||
* @var Scope The document's center
|
||||
*/
|
||||
private ?\Chill\MainBundle\Entity\Scope $scope = null;
|
||||
private ?Scope $scope = null;
|
||||
|
||||
public function getCenter()
|
||||
{
|
||||
|
@@ -30,7 +30,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PersonDocumentType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly ScopeResolverDispatcher $scopeResolverDispatcher, private readonly ParameterBagInterface $parameterBag, private readonly CenterResolverDispatcher $centerResolverDispatcher) {}
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly ScopeResolverDispatcher $scopeResolverDispatcher, private readonly ParameterBagInterface $parameterBag, private readonly CenterResolverDispatcher $centerResolverDispatcher)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -54,7 +54,8 @@ class FetchQuery implements FetchQueryInterface
|
||||
private array $selectIdentifierTypes = [],
|
||||
private array $selectDateParams = [],
|
||||
private array $selectDateTypes = [],
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addJoinClause(string $sql, array $params = [], array $types = []): int
|
||||
{
|
||||
|
@@ -21,7 +21,8 @@ final readonly class GenericDocDTO
|
||||
public array $identifiers,
|
||||
public \DateTimeImmutable $docDate,
|
||||
public AccompanyingPeriod|Person $linked,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function getContext(): string
|
||||
{
|
||||
|
@@ -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 = [];
|
||||
|
@@ -31,9 +31,10 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen
|
||||
public function __construct(
|
||||
private Security $security,
|
||||
private EntityManagerInterface $entityManager,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -58,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);
|
||||
|
||||
@@ -107,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);
|
||||
|
||||
|
@@ -27,14 +27,15 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe
|
||||
public function __construct(
|
||||
private Security $security,
|
||||
private PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
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,
|
||||
@@ -49,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);
|
||||
}
|
||||
|
@@ -23,7 +23,8 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen
|
||||
public function __construct(
|
||||
private AccompanyingCourseDocumentRepository $accompanyingCourseDocumentRepository,
|
||||
private PersonDocumentRepository $personDocumentRepository,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
|
||||
{
|
||||
|
@@ -25,7 +25,8 @@ final readonly class GenericDocExtensionRuntime implements RuntimeExtensionInter
|
||||
* @var list<GenericDocRendererInterface>
|
||||
*/
|
||||
private iterable $renderers,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws RuntimeError
|
||||
|
@@ -20,7 +20,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final readonly class MenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(private Security $security, private TranslatorInterface $translator) {}
|
||||
public function __construct(private Security $security, private TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -34,7 +34,8 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA
|
||||
private CenterResolverManagerInterface $centerResolverManager,
|
||||
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
|
||||
private Security $security,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function buildQueryByPerson(Person $person): QueryBuilder
|
||||
{
|
||||
@@ -47,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);
|
||||
@@ -113,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);
|
||||
|
||||
@@ -133,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);
|
||||
}
|
||||
|
@@ -20,7 +20,9 @@ class StoredObjectDenormalizer implements DenormalizerInterface
|
||||
{
|
||||
use ObjectToPopulateTrait;
|
||||
|
||||
public function __construct(private readonly StoredObjectRepository $storedObjectRepository) {}
|
||||
public function __construct(private readonly StoredObjectRepository $storedObjectRepository)
|
||||
{
|
||||
}
|
||||
|
||||
public function denormalize($data, $type, $format = null, array $context = [])
|
||||
{
|
||||
|
@@ -30,7 +30,9 @@ final class StoredObjectManager implements StoredObjectManagerInterface
|
||||
public function __construct(
|
||||
private readonly HttpClientInterface $client,
|
||||
private readonly TempUrlGeneratorInterface $tempUrlGenerator
|
||||
) {}
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
public function getLastModified(StoredObject $document): \DateTimeInterface
|
||||
{
|
||||
|
@@ -120,7 +120,9 @@ final readonly class WopiEditTwigExtensionRuntime implements RuntimeExtensionInt
|
||||
|
||||
private const TEMPLATE_BUTTON_GROUP = '@ChillDocStore/Button/button_group.html.twig';
|
||||
|
||||
public function __construct(private DiscoveryInterface $discovery, private NormalizerInterface $normalizer) {}
|
||||
public function __construct(private DiscoveryInterface $discovery, private NormalizerInterface $normalizer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* return true if the document is editable.
|
||||
@@ -134,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,
|
||||
@@ -151,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))
|
||||
|
@@ -91,7 +91,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);
|
||||
@@ -105,7 +105,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);
|
||||
|
Reference in New Issue
Block a user