mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 09:34:59 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -21,7 +21,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class ChillDocStoreBundle extends Bundle
|
||||
{
|
||||
public function build(ContainerBuilder $container)
|
||||
public function build(ContainerBuilder $container): void
|
||||
{
|
||||
$container->registerForAutoconfiguration(GenericDocForAccompanyingPeriodProviderInterface::class)
|
||||
->addTag('chill_doc_store.generic_doc_accompanying_period_provider');
|
||||
|
@@ -22,7 +22,7 @@ class AdminController extends AbstractController
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/document', name: 'chill_docstore_admin', options: [null])]
|
||||
public function indexAction()
|
||||
public function indexAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillDocStore/Admin/layout.html.twig');
|
||||
}
|
||||
@@ -31,7 +31,7 @@ class AdminController extends AbstractController
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
*/
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/document_redirect_to_main', name: 'chill_docstore_admin_redirect_to_admin_index', options: [null])]
|
||||
public function redirectToAdminIndexAction()
|
||||
public function redirectToAdminIndexAction(): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
return $this->redirectToRoute('chill_main_admin_central');
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
*/
|
||||
class ChillDocStoreExtension extends Extension implements PrependExtensionInterface
|
||||
{
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
public function load(array $configs, ContainerBuilder $container): void
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
@@ -46,14 +46,14 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
|
||||
$loader->load('services/security.yaml');
|
||||
}
|
||||
|
||||
public function prepend(ContainerBuilder $container)
|
||||
public function prepend(ContainerBuilder $container): void
|
||||
{
|
||||
$this->prependRoute($container);
|
||||
$this->prependAuthorization($container);
|
||||
$this->prependTwig($container);
|
||||
}
|
||||
|
||||
private function prependAuthorization(ContainerBuilder $container)
|
||||
private function prependAuthorization(ContainerBuilder $container): void
|
||||
{
|
||||
$container->prependExtensionConfig('security', [
|
||||
'role_hierarchy' => [
|
||||
@@ -69,7 +69,7 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
|
||||
]);
|
||||
}
|
||||
|
||||
private function prependRoute(ContainerBuilder $container)
|
||||
private function prependRoute(ContainerBuilder $container): void
|
||||
{
|
||||
// declare routes for task bundle
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
@@ -81,7 +81,7 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
|
||||
]);
|
||||
}
|
||||
|
||||
private function prependTwig(ContainerBuilder $container)
|
||||
private function prependTwig(ContainerBuilder $container): void
|
||||
{
|
||||
$twigConfig = [
|
||||
'form_themes' => ['@ChillDocStore/Form/fields.html.twig'],
|
||||
|
@@ -35,7 +35,7 @@ class StorageConfigurationCompilerPass implements CompilerPassInterface
|
||||
StoredObjectContentToLocalStorageController::class,
|
||||
];
|
||||
|
||||
public function process(ContainerBuilder $container)
|
||||
public function process(ContainerBuilder $container): void
|
||||
{
|
||||
$config = $container
|
||||
->getParameterBag()
|
||||
|
@@ -40,7 +40,7 @@ class AccompanyingCourseDocument extends Document implements HasScopesInterface,
|
||||
return $this->course;
|
||||
}
|
||||
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
|
||||
return (string) $this->getObject()?->getTitle();
|
||||
}
|
||||
|
||||
public function getUser()
|
||||
public function getUser(): ?\Chill\MainBundle\Entity\User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ class DocumentCategory
|
||||
return $this->bundleId;
|
||||
}
|
||||
|
||||
public function getDocumentClass()
|
||||
public function getDocumentClass(): ?string
|
||||
{
|
||||
return $this->documentClass;
|
||||
}
|
||||
|
@@ -36,12 +36,12 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt
|
||||
#[ORM\ManyToOne(targetEntity: Scope::class)]
|
||||
private ?Scope $scope = null;
|
||||
|
||||
public function getCenter()
|
||||
public function getCenter(): ?\Chill\MainBundle\Entity\Center
|
||||
{
|
||||
return $this->getPerson()->getCenter();
|
||||
}
|
||||
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
@@ -186,7 +186,7 @@ class StoredObject implements Document, TrackCreationInterface
|
||||
/**
|
||||
* @deprecated use method "getFilename()"
|
||||
*/
|
||||
public function getObjectName()
|
||||
public function getObjectName(): string
|
||||
{
|
||||
return $this->getFilename();
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ final class AccompanyingCourseDocumentType extends AbstractType
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TextType::class)
|
||||
@@ -52,7 +52,7 @@ final class AccompanyingCourseDocumentType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Document::class,
|
||||
|
@@ -17,7 +17,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class CollectionStoredObjectType extends AbstractType
|
||||
{
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('entry_type', StoredObjectType::class)
|
||||
@@ -30,7 +30,7 @@ class CollectionStoredObjectType extends AbstractType
|
||||
->setDefault('js_caller', 'data-collection-stored-object');
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return ChillCollectionType::class;
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ class StoredObjectDataMapper implements DataMapperInterface
|
||||
/**
|
||||
* @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances
|
||||
*/
|
||||
public function mapDataToForms($viewData, \Traversable $forms)
|
||||
public function mapDataToForms($viewData, \Traversable $forms): void
|
||||
{
|
||||
if (null === $viewData) {
|
||||
return;
|
||||
@@ -43,7 +43,7 @@ class StoredObjectDataMapper implements DataMapperInterface
|
||||
/**
|
||||
* @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances
|
||||
*/
|
||||
public function mapFormsToData(\Traversable $forms, &$viewData)
|
||||
public function mapFormsToData(\Traversable $forms, &$viewData): void
|
||||
{
|
||||
$forms = iterator_to_array($forms);
|
||||
|
||||
|
@@ -23,7 +23,7 @@ class DocumentCategoryType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$bundles = [
|
||||
'chill-doc-store' => 'chill-doc-store',
|
||||
@@ -51,7 +51,7 @@ class DocumentCategoryType extends AbstractType
|
||||
->add('name', TranslatableStringFormType::class);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => DocumentCategory::class,
|
||||
|
@@ -32,7 +32,7 @@ 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 buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$document = $options['data'];
|
||||
$isScopeConcerned = $this->scopeResolverDispatcher->isConcerned($document);
|
||||
@@ -63,7 +63,7 @@ class PersonDocumentType extends AbstractType
|
||||
}
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Document::class,
|
||||
|
@@ -30,7 +30,7 @@ final class StoredObjectType extends AbstractType
|
||||
private readonly StoredObjectDataMapper $storedObjectDataMapper,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
if (true === $options['has_title']) {
|
||||
$builder
|
||||
@@ -44,7 +44,7 @@ final class StoredObjectType extends AbstractType
|
||||
$builder->setDataMapper($this->storedObjectDataMapper);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('data_class', StoredObject::class);
|
||||
|
@@ -36,7 +36,7 @@ class AsyncUploaderType extends AbstractType
|
||||
$this->max_post_file_size = $config['max_post_file_size'];
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'expires_delay' => $this->expires_delay,
|
||||
@@ -56,7 +56,7 @@ class AsyncUploaderType extends AbstractType
|
||||
FormView $view,
|
||||
FormInterface $form,
|
||||
array $options,
|
||||
) {
|
||||
): void {
|
||||
$view->vars['attr']['data-async-file-upload'] = true;
|
||||
$view->vars['attr']['data-generate-temp-url-post'] = $this
|
||||
->url_generator->generate('async_upload.generate_url', [
|
||||
@@ -70,7 +70,7 @@ class AsyncUploaderType extends AbstractType
|
||||
$view->vars['attr']['data-max-post-size'] = $options['max_post_size'];
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return HiddenType::class;
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||
$this->authorizationChecker = $authorizationChecker;
|
||||
}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters): void
|
||||
{
|
||||
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
|
||||
return;
|
||||
|
@@ -22,7 +22,7 @@ final readonly class MenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(private Security $security, private TranslatorInterface $translator) {}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters): void
|
||||
{
|
||||
match ($menuId) {
|
||||
'accompanyingCourse' => $this->buildMenuAccompanyingCourse($menu, $parameters),
|
||||
@@ -36,7 +36,7 @@ final readonly class MenuBuilder implements LocalMenuBuilderInterface
|
||||
return ['person', 'accompanyingCourse'];
|
||||
}
|
||||
|
||||
private function buildMenuAccompanyingCourse(MenuItem $menu, array $parameters)
|
||||
private function buildMenuAccompanyingCourse(MenuItem $menu, array $parameters): void
|
||||
{
|
||||
$course = $parameters['accompanyingCourse'];
|
||||
|
||||
@@ -53,7 +53,7 @@ final readonly class MenuBuilder implements LocalMenuBuilderInterface
|
||||
}
|
||||
}
|
||||
|
||||
private function buildMenuPerson(MenuItem $menu, array $parameters)
|
||||
private function buildMenuPerson(MenuItem $menu, array $parameters): void
|
||||
{
|
||||
/** @var \Chill\PersonBundle\Entity\Person $person */
|
||||
$person = $parameters['person'];
|
||||
|
@@ -70,7 +70,7 @@ class PersonDocumentVoter extends AbstractChillVoter implements ProvideRoleHiera
|
||||
return [];
|
||||
}
|
||||
|
||||
protected function supports($attribute, $subject)
|
||||
protected function supports($attribute, $subject): bool
|
||||
{
|
||||
return $this->voterHelper->supports($attribute, $subject);
|
||||
}
|
||||
@@ -81,7 +81,7 @@ class PersonDocumentVoter extends AbstractChillVoter implements ProvideRoleHiera
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
|
||||
protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
|
||||
{
|
||||
$this->logger->debug(sprintf('Voting from %s class', self::class));
|
||||
|
||||
|
@@ -60,8 +60,19 @@ class GenericDocNormalizer implements NormalizerInterface, NormalizerAwareInterf
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, ?string $format = null): bool
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
return 'json' === $format && $data instanceof GenericDocDTO;
|
||||
}
|
||||
|
||||
public function getSupportedTypes(?string $format): array
|
||||
{
|
||||
if ('json' !== $format) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
GenericDocDTO::class => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ class StoredObjectDenormalizer implements DenormalizerInterface
|
||||
return $storedObject;
|
||||
}
|
||||
|
||||
public function supportsDenormalization($data, $type, $format = null): bool
|
||||
public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
|
||||
{
|
||||
if (StoredObject::class !== $type) {
|
||||
return false;
|
||||
@@ -83,4 +83,9 @@ class StoredObjectDenormalizer implements DenormalizerInterface
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getSupportedTypes(?string $format): array
|
||||
{
|
||||
// TODO: Implement getSupportedTypes() method.
|
||||
}
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ final class StoredObjectNormalizer implements NormalizerInterface, NormalizerAwa
|
||||
private readonly TempUrlGeneratorInterface $tempUrlGenerator,
|
||||
) {}
|
||||
|
||||
public function normalize($object, ?string $format = null, array $context = [])
|
||||
public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
|
||||
{
|
||||
/** @var StoredObject $object */
|
||||
$datas = [
|
||||
@@ -113,8 +113,19 @@ final class StoredObjectNormalizer implements NormalizerInterface, NormalizerAwa
|
||||
return $datas;
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, ?string $format = null)
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
return $data instanceof StoredObject && 'json' === $format;
|
||||
}
|
||||
|
||||
public function getSupportedTypes(?string $format): array
|
||||
{
|
||||
if ('json' !== $format) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
StoredObject::class => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@ class StoredObjectPointInTimeNormalizer implements NormalizerInterface, Normaliz
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
public function normalize($object, ?string $format = null, array $context = [])
|
||||
public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
|
||||
{
|
||||
/* @var StoredObjectPointInTime $object */
|
||||
return [
|
||||
@@ -31,8 +31,15 @@ class StoredObjectPointInTimeNormalizer implements NormalizerInterface, Normaliz
|
||||
];
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, ?string $format = null)
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
return $data instanceof StoredObjectPointInTime;
|
||||
}
|
||||
|
||||
public function getSupportedTypes(?string $format): array
|
||||
{
|
||||
return [
|
||||
StoredObjectPointInTime::class => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ class StoredObjectVersionNormalizer implements NormalizerInterface, NormalizerAw
|
||||
|
||||
final public const WITH_RESTORED_CONTEXT = 'with-restored';
|
||||
|
||||
public function normalize($object, ?string $format = null, array $context = [])
|
||||
public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
|
||||
{
|
||||
if (!$object instanceof StoredObjectVersion) {
|
||||
throw new \InvalidArgumentException('The object must be an instance of '.StoredObjectVersion::class);
|
||||
@@ -54,8 +54,15 @@ class StoredObjectVersionNormalizer implements NormalizerInterface, NormalizerAw
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = [])
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
return $data instanceof StoredObjectVersion;
|
||||
}
|
||||
|
||||
public function getSupportedTypes(?string $format): array
|
||||
{
|
||||
return [
|
||||
StoredObjectVersion::class => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -31,12 +31,12 @@ class PDFSignatureZoneAvailable implements LocaleAwareInterface
|
||||
private readonly WopiConverter $converter,
|
||||
) {}
|
||||
|
||||
public function setLocale(string $locale)
|
||||
public function setLocale(string $locale): void
|
||||
{
|
||||
$this->locale = $locale;
|
||||
}
|
||||
|
||||
public function getLocale()
|
||||
public function getLocale(): string
|
||||
{
|
||||
return $this->locale;
|
||||
}
|
||||
|
@@ -153,7 +153,7 @@ final class StoredObjectManagerTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getDataProviderForRead
|
||||
*/
|
||||
public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null)
|
||||
public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null): void
|
||||
{
|
||||
if (null !== $exceptionClass) {
|
||||
$this->expectException($exceptionClass);
|
||||
@@ -167,7 +167,7 @@ final class StoredObjectManagerTest extends TestCase
|
||||
/**
|
||||
* @dataProvider getDataProviderForWrite
|
||||
*/
|
||||
public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null, ?int $errorCode = null)
|
||||
public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null, ?int $errorCode = null): void
|
||||
{
|
||||
if (null !== $exceptionClass) {
|
||||
$this->expectException($exceptionClass);
|
||||
@@ -228,7 +228,7 @@ final class StoredObjectManagerTest extends TestCase
|
||||
$storedObjectManager->delete($version);
|
||||
}
|
||||
|
||||
public function testWriteWithDeleteAt()
|
||||
public function testWriteWithDeleteAt(): void
|
||||
{
|
||||
$storedObject = new StoredObject();
|
||||
|
||||
|
@@ -42,7 +42,7 @@ class GenericDocNormalizerTest extends TestCase
|
||||
$this->normalizer->setNormalizer($innerNormalizer);
|
||||
}
|
||||
|
||||
public function testNormalize()
|
||||
public function testNormalize(): void
|
||||
{
|
||||
$docDate = new \DateTimeImmutable('2023-10-01T15:03:01.012345Z');
|
||||
|
||||
|
@@ -113,18 +113,18 @@ class RequestPdfSignMessageSerializerTest extends TestCase
|
||||
];
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, ?string $format = null): bool
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
return $data instanceof PDFSignatureZone;
|
||||
}
|
||||
};
|
||||
$denormalizer = new class () implements DenormalizerInterface {
|
||||
public function denormalize($data, string $type, ?string $format = null, array $context = [])
|
||||
public function denormalize($data, string $type, ?string $format = null, array $context = []): mixed
|
||||
{
|
||||
return new PDFSignatureZone(0, 10.0, 10.0, 180.0, 180.0, new PDFPage(0, 500.0, 800.0));
|
||||
}
|
||||
|
||||
public function supportsDenormalization($data, string $type, ?string $format = null)
|
||||
public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
return PDFSignatureZone::class === $type;
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ class AsyncFileExistsValidatorTest extends ConstraintValidatorTestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
protected function createValidator()
|
||||
protected function createValidator(): \Symfony\Component\Validator\ConstraintValidatorInterface
|
||||
{
|
||||
$storedObjectManager = $this->prophesize(StoredObjectManagerInterface::class);
|
||||
$storedObjectManager->exists(Argument::any())
|
||||
|
@@ -35,7 +35,7 @@ class AccompanyingCourseDocumentWorkflowHandlerTest extends TestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
public function testGetSuggestedUsers()
|
||||
public function testGetSuggestedUsers(): void
|
||||
{
|
||||
$accompanyingPeriod = new AccompanyingPeriod();
|
||||
$document = new AccompanyingCourseDocument();
|
||||
@@ -60,7 +60,7 @@ class AccompanyingCourseDocumentWorkflowHandlerTest extends TestCase
|
||||
self::assertContains($user1, $users);
|
||||
}
|
||||
|
||||
public function testGetSuggestedUsersWithDuplicates()
|
||||
public function testGetSuggestedUsersWithDuplicates(): void
|
||||
{
|
||||
$accompanyingPeriod = new AccompanyingPeriod();
|
||||
$document = new AccompanyingCourseDocument();
|
||||
|
@@ -27,12 +27,12 @@ final class AsyncFileExists extends Constraint
|
||||
}
|
||||
}
|
||||
|
||||
public function validatedBy()
|
||||
public function validatedBy(): string
|
||||
{
|
||||
return AsyncFileExistsValidator::class;
|
||||
}
|
||||
|
||||
public function getTargets()
|
||||
public function getTargets(): string|array
|
||||
{
|
||||
return [Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT];
|
||||
}
|
||||
|
Reference in New Issue
Block a user