mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-04 12:29:43 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class ChillCalendarBundle extends Bundle
|
||||
{
|
||||
public function build(ContainerBuilder $container)
|
||||
public function build(ContainerBuilder $container): void
|
||||
{
|
||||
parent::build($container);
|
||||
|
||||
|
@@ -30,6 +30,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
#[\Symfony\Component\Console\Attribute\AsCommand]
|
||||
final class MapAndSubscribeUserCalendarCommand extends Command
|
||||
{
|
||||
protected static $defaultDescription = 'MSGraph: collect user metadata and create subscription on events for users, and sync the user absence-presence';
|
||||
@@ -156,7 +157,7 @@ final class MapAndSubscribeUserCalendarCommand extends Command
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
protected function configure(): void
|
||||
{
|
||||
parent::configure();
|
||||
|
||||
|
@@ -36,6 +36,7 @@ use Symfony\Component\Console\Question\ConfirmationQuestion;
|
||||
use Symfony\Component\Console\Question\Question;
|
||||
use Symfony\Component\Notifier\TexterInterface;
|
||||
|
||||
#[\Symfony\Component\Console\Attribute\AsCommand]
|
||||
class SendTestShortMessageOnCalendarCommand extends Command
|
||||
{
|
||||
protected static $defaultDescription = 'Test sending a SMS for a dummy calendar appointment';
|
||||
|
@@ -20,7 +20,7 @@ class AdminController extends AbstractController
|
||||
* Calendar admin.
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/calendar', name: 'chill_calendar_admin_index')]
|
||||
public function indexAdminAction()
|
||||
public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillCalendar/Admin/index.html.twig');
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ class CalendarController extends AbstractController
|
||||
|
||||
if ($form->isValid()) {
|
||||
$this->logger->notice('A calendar event has been removed', [
|
||||
'by_user' => $this->getUser()->getUsername(),
|
||||
'by_user' => $this->getUser()->getUserIdentifier(),
|
||||
'calendar_id' => $entity->getId(),
|
||||
]);
|
||||
|
||||
|
@@ -26,7 +26,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
*/
|
||||
class ChillCalendarExtension 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);
|
||||
@@ -49,14 +49,14 @@ class ChillCalendarExtension extends Extension implements PrependExtensionInterf
|
||||
}
|
||||
}
|
||||
|
||||
public function prepend(ContainerBuilder $container)
|
||||
public function prepend(ContainerBuilder $container): void
|
||||
{
|
||||
$this->preprendRoutes($container);
|
||||
$this->prependCruds($container);
|
||||
$this->prependRoleHierarchy($container);
|
||||
}
|
||||
|
||||
private function prependCruds(ContainerBuilder $container)
|
||||
private function prependCruds(ContainerBuilder $container): void
|
||||
{
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'cruds' => [
|
||||
@@ -143,7 +143,7 @@ class ChillCalendarExtension extends Extension implements PrependExtensionInterf
|
||||
]);
|
||||
}
|
||||
|
||||
private function preprendRoutes(ContainerBuilder $container)
|
||||
private function preprendRoutes(ContainerBuilder $container): void
|
||||
{
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'routing' => [
|
||||
|
@@ -27,7 +27,7 @@ final readonly class AgentAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('caluser', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.mainUser', 'caluser');
|
||||
@@ -42,7 +42,7 @@ final readonly class AgentAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ class CancelReasonAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
// TODO: still needs to take into account calendars without a cancel reason somehow
|
||||
if (!\in_array('calcancel', $qb->getAllAliases(), true)) {
|
||||
@@ -43,7 +43,7 @@ class CancelReasonAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ final readonly class JobAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -65,7 +65,7 @@ final readonly class JobAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder): void {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -26,7 +26,7 @@ final readonly class LocationAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('calloc', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.location', 'calloc');
|
||||
@@ -40,7 +40,7 @@ final readonly class LocationAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ final readonly class LocationTypeAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('calloc', $qb->getAllAliases(), true)) {
|
||||
$qb->join('cal.location', 'calloc');
|
||||
@@ -42,7 +42,7 @@ final readonly class LocationTypeAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ class MonthYearAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect("to_char(cal.startDate, 'MM-YYYY') AS month_year_aggregator");
|
||||
// $qb->addSelect("extract(month from age(cal.startDate, cal.endDate)) AS month_aggregator");
|
||||
@@ -35,7 +35,7 @@ class MonthYearAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// No form needed
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -65,7 +65,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder): void {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -33,7 +33,7 @@ class UrgencyAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('cal.urgent AS urgency_aggregator');
|
||||
$qb->addGroupBy('urgency_aggregator');
|
||||
@@ -44,7 +44,7 @@ class UrgencyAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ class CountCalendars implements ExportInterface, GroupedExportInterface
|
||||
private readonly CalendarRepository $calendarRepository,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// No form necessary
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ class AgentFilter implements FilterInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$where = $qb->getDQLPart('where');
|
||||
$clause = $qb->expr()->in('cal.mainUser', ':agents');
|
||||
@@ -49,7 +49,7 @@ class AgentFilter implements FilterInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('accepted_agents', EntityType::class, [
|
||||
'class' => User::class,
|
||||
|
@@ -28,7 +28,7 @@ class BetweenDatesFilter implements FilterInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$clause = $qb->expr()->andX(
|
||||
$qb->expr()->gte('cal.startDate', ':dateFrom'),
|
||||
@@ -52,7 +52,7 @@ class BetweenDatesFilter implements FilterInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('date_from', PickRollingDateType::class, [])
|
||||
|
@@ -41,7 +41,7 @@ class CalendarRangeFilter implements FilterInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (null !== $data['hasCalendarRange']) {
|
||||
$qb->andWhere($qb->expr()->isNotNull('cal.calendarRange'));
|
||||
@@ -55,7 +55,7 @@ class CalendarRangeFilter implements FilterInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('hasCalendarRange', ChoiceType::class, [
|
||||
'choices' => self::CHOICES,
|
||||
|
@@ -36,7 +36,7 @@ final readonly class JobFilter implements FilterInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -70,7 +70,7 @@ final readonly class JobFilter implements FilterInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('job', EntityType::class, [
|
||||
|
@@ -38,7 +38,7 @@ class ScopeFilter implements FilterInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -72,7 +72,7 @@ class ScopeFilter implements FilterInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('scope', EntityType::class, [
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class CalendarDocCreateType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TextType::class, [
|
||||
@@ -33,7 +33,7 @@ class CalendarDocCreateType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => CalendarDocCreateDTO::class,
|
||||
|
@@ -19,7 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class CalendarDocEditType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TextType::class, [
|
||||
@@ -28,7 +28,7 @@ class CalendarDocEditType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => CalendarDocEditDTO::class,
|
||||
|
@@ -40,7 +40,7 @@ class CalendarType extends AbstractType
|
||||
private readonly IdToCalendarRangeDataTransformer $calendarRangeDataTransformer,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('comment', CommentType::class, [
|
||||
@@ -131,14 +131,14 @@ class CalendarType extends AbstractType
|
||||
->addModelTransformer($this->idToLocationDataTransformer);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Calendar::class,
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
// as the js share some hardcoded items from activity, we have to rewrite block prefix
|
||||
return 'chill_activitybundle_activity';
|
||||
|
@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class CancelReasonType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', TranslatableStringFormType::class)
|
||||
@@ -31,7 +31,7 @@ class CancelReasonType extends AbstractType
|
||||
->add('canceledBy', TextType::class);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', CancelReason::class);
|
||||
|
@@ -21,7 +21,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(private readonly Security $security, protected TranslatorInterface $translator) {}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters): void
|
||||
{
|
||||
$period = $parameters['accompanyingCourse'];
|
||||
|
||||
|
@@ -25,7 +25,7 @@ final readonly class AccompanyingCourseQuickMenuBuilder implements LocalMenuBuil
|
||||
return ['accompanying_course_quick_menu'];
|
||||
}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters): void
|
||||
{
|
||||
/** @var \Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingCourse */
|
||||
$accompanyingCourse = $parameters['accompanying-course'];
|
||||
|
@@ -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;
|
||||
|
@@ -21,7 +21,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(private readonly Security $security, protected TranslatorInterface $translator) {}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters): void
|
||||
{
|
||||
$person = $parameters['person'];
|
||||
|
||||
|
@@ -20,7 +20,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(private readonly Security $security, public TranslatorInterface $translator) {}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters): void
|
||||
{
|
||||
if ($this->security->isGranted('ROLE_USER')) {
|
||||
$menu->addChild('My calendar list', [
|
||||
|
@@ -33,7 +33,7 @@ class CalendarRangeRemoveToRemoteHandler implements MessageHandlerInterface
|
||||
{
|
||||
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository) {}
|
||||
|
||||
public function __invoke(CalendarRangeRemovedMessage $calendarRangeRemovedMessage)
|
||||
public function __invoke(CalendarRangeRemovedMessage $calendarRangeRemovedMessage): void
|
||||
{
|
||||
$this->remoteCalendarConnector->removeCalendarRange(
|
||||
$calendarRangeRemovedMessage->getRemoteId(),
|
||||
|
@@ -33,7 +33,7 @@ class CalendarRemoveHandler implements MessageHandlerInterface
|
||||
{
|
||||
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository) {}
|
||||
|
||||
public function __invoke(CalendarRemovedMessage $message)
|
||||
public function __invoke(CalendarRemovedMessage $message): void
|
||||
{
|
||||
if (null !== $message->getAssociatedCalendarRangeId()) {
|
||||
$associatedRange = $this->calendarRangeRepository->find($message->getAssociatedCalendarRangeId());
|
||||
|
@@ -39,7 +39,7 @@ class CalendarToRemoteHandler implements MessageHandlerInterface
|
||||
{
|
||||
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $entityManager, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $calendarConnector, private readonly UserRepository $userRepository) {}
|
||||
|
||||
public function __invoke(CalendarMessage $calendarMessage)
|
||||
public function __invoke(CalendarMessage $calendarMessage): void
|
||||
{
|
||||
$calendar = $this->calendarRepository->find($calendarMessage->getCalendarId());
|
||||
|
||||
|
@@ -72,4 +72,9 @@ class MachineHttpClient implements HttpClientInterface
|
||||
{
|
||||
return $this->decoratedClient->stream($responses, $timeout);
|
||||
}
|
||||
|
||||
public function withOptions(array $options): static
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ use TheNetworg\OAuth2\Client\Provider\Azure;
|
||||
|
||||
class RemoteCalendarCompilerPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
public function process(ContainerBuilder $container): void
|
||||
{
|
||||
$config = $container->getParameter('chill_calendar');
|
||||
|
||||
|
@@ -33,7 +33,7 @@ class BulkCalendarShortMessageSender
|
||||
private readonly ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder,
|
||||
) {}
|
||||
|
||||
public function sendBulkMessageToEligibleCalendars()
|
||||
public function sendBulkMessageToEligibleCalendars(): void
|
||||
{
|
||||
$countCalendars = 0;
|
||||
$countSms = 0;
|
||||
|
@@ -86,7 +86,7 @@ final class CalendarControllerTest extends WebTestCase
|
||||
/**
|
||||
* @dataProvider provideAccompanyingPeriod
|
||||
*/
|
||||
public function testList(int $accompanyingPeriodId)
|
||||
public function testList(int $accompanyingPeriodId): void
|
||||
{
|
||||
$this->client->request(
|
||||
Request::METHOD_GET,
|
||||
@@ -99,7 +99,7 @@ final class CalendarControllerTest extends WebTestCase
|
||||
/**
|
||||
* @dataProvider provideAccompanyingPeriod
|
||||
*/
|
||||
public function testNew(int $accompanyingPeriodId)
|
||||
public function testNew(int $accompanyingPeriodId): void
|
||||
{
|
||||
$this->client->request(
|
||||
Request::METHOD_GET,
|
||||
|
@@ -29,7 +29,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
final class CalendarTest extends TestCase
|
||||
{
|
||||
public function testAddUser()
|
||||
public function testAddUser(): void
|
||||
{
|
||||
$calendar = new Calendar();
|
||||
|
||||
|
@@ -39,7 +39,7 @@ final class AgentAggregatorTest extends AbstractAggregatorTest
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.agent_aggregator');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\AgentAggregator
|
||||
{
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ final class CancelReasonAggregatorTest extends AbstractAggregatorTest
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.cancel_reason_aggregator');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\CancelReasonAggregator
|
||||
{
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.job_aggregator');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\JobAggregator
|
||||
{
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ final class LocationAggregatorTest extends AbstractAggregatorTest
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_aggregator');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\LocationAggregator
|
||||
{
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_type_aggregator');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\LocationTypeAggregator
|
||||
{
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ final class MonthYearAggregatorTest extends AbstractAggregatorTest
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.month_aggregator');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\MonthYearAggregator
|
||||
{
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
|
||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.scope_aggregator');
|
||||
}
|
||||
|
||||
public function getAggregator()
|
||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\ScopeAggregator
|
||||
{
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ final class AgentFilterTest extends AbstractFilterTest
|
||||
$this->filter = self::getContainer()->get('chill.calendar.export.agent_filter');
|
||||
}
|
||||
|
||||
public function getFilter()
|
||||
public function getFilter(): \Chill\CalendarBundle\Export\Filter\AgentFilter
|
||||
{
|
||||
return $this->filter;
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ final class BetweenDatesFilterTest extends AbstractFilterTest
|
||||
$this->filter = self::getContainer()->get('chill.calendar.export.between_dates_filter');
|
||||
}
|
||||
|
||||
public function getFilter()
|
||||
public function getFilter(): \Chill\CalendarBundle\Export\Filter\BetweenDatesFilter
|
||||
{
|
||||
return $this->filter;
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ final class JobFilterTest extends AbstractFilterTest
|
||||
$this->filter = self::getContainer()->get('chill.calendar.export.job_filter');
|
||||
}
|
||||
|
||||
public function getFilter()
|
||||
public function getFilter(): \Chill\CalendarBundle\Export\Filter\JobFilter
|
||||
{
|
||||
return $this->filter;
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ final class ScopeFilterTest extends AbstractFilterTest
|
||||
$this->filter = self::getContainer()->get('chill.calendar.export.scope_filter');
|
||||
}
|
||||
|
||||
public function getFilter()
|
||||
public function getFilter(): \Chill\CalendarBundle\Export\Filter\ScopeFilter
|
||||
{
|
||||
return $this->filter;
|
||||
}
|
||||
|
@@ -84,7 +84,7 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function testSubmitValidData()
|
||||
public function testSubmitValidData(): void
|
||||
{
|
||||
$formData = [
|
||||
'mainUser' => '1',
|
||||
|
@@ -37,7 +37,7 @@ final class AddressConverterTest extends TestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
public function testConvertAddress()
|
||||
public function testConvertAddress(): void
|
||||
{
|
||||
$country = (new Country())->setName(['fr' => 'Belgique']);
|
||||
$postalCode = (new PostalCode())->setName('Houte-Si-Plout')->setCode('4122')
|
||||
|
@@ -39,7 +39,7 @@ final class CalendarACLAwareRepositoryTest extends KernelTestCase
|
||||
$this->entityManager = self::getContainer()->get(EntityManagerInterface::class);
|
||||
}
|
||||
|
||||
public function testCountByPerosn()
|
||||
public function testCountByPerosn(): void
|
||||
{
|
||||
$person = $this->getRandomPerson($this->entityManager);
|
||||
|
||||
@@ -59,7 +59,7 @@ final class CalendarACLAwareRepositoryTest extends KernelTestCase
|
||||
/**
|
||||
* Test that the query does not throw any error.
|
||||
*/
|
||||
public function testFindByPerson()
|
||||
public function testFindByPerson(): void
|
||||
{
|
||||
$person = $this->getRandomPerson($this->entityManager);
|
||||
|
||||
|
@@ -35,7 +35,7 @@ final class CalendarNormalizerTest extends KernelTestCase
|
||||
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
|
||||
}
|
||||
|
||||
public function testNormalizationCalendar()
|
||||
public function testNormalizationCalendar(): void
|
||||
{
|
||||
$calendar = (new Calendar())
|
||||
->setComment(
|
||||
@@ -88,7 +88,7 @@ final class CalendarNormalizerTest extends KernelTestCase
|
||||
$this->assertIsArray($actual['duration']);
|
||||
}
|
||||
|
||||
public function testNormalizationOnNullHasSameKeys()
|
||||
public function testNormalizationOnNullHasSameKeys(): void
|
||||
{
|
||||
$calendar = new Calendar();
|
||||
|
||||
|
@@ -43,7 +43,7 @@ final class CalendarContextTest extends TestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
public function testAdminFormReverseTransform()
|
||||
public function testAdminFormReverseTransform(): void
|
||||
{
|
||||
$expected =
|
||||
[
|
||||
@@ -57,7 +57,7 @@ final class CalendarContextTest extends TestCase
|
||||
$this->assertEqualsCanonicalizing($expected, $this->buildCalendarContext()->adminFormReverseTransform([]));
|
||||
}
|
||||
|
||||
public function testAdminFormTransform()
|
||||
public function testAdminFormTransform(): void
|
||||
{
|
||||
$expected =
|
||||
[
|
||||
@@ -71,7 +71,7 @@ final class CalendarContextTest extends TestCase
|
||||
$this->assertEqualsCanonicalizing($expected, $this->buildCalendarContext()->adminFormTransform($expected));
|
||||
}
|
||||
|
||||
public function testBuildPublicForm()
|
||||
public function testBuildPublicForm(): void
|
||||
{
|
||||
$formBuilder = $this->prophesize(FormBuilderInterface::class);
|
||||
$calendar = new Calendar();
|
||||
@@ -138,7 +138,7 @@ final class CalendarContextTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testGetData()
|
||||
public function testGetData(): void
|
||||
{
|
||||
$calendar = (new Calendar())
|
||||
->addPerson($p1 = new Person())
|
||||
@@ -167,7 +167,7 @@ final class CalendarContextTest extends TestCase
|
||||
], $actual);
|
||||
}
|
||||
|
||||
public function testStoreGenerated()
|
||||
public function testStoreGenerated(): void
|
||||
{
|
||||
$calendar = new Calendar();
|
||||
$storedObject = new StoredObject();
|
||||
|
@@ -68,7 +68,7 @@ final class BulkCalendarShortMessageSenderTest extends KernelTestCase
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
public function testSendBulkMessageToEligibleCalendar()
|
||||
public function testSendBulkMessageToEligibleCalendar(): void
|
||||
{
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
$calendar = new Calendar();
|
||||
|
@@ -37,7 +37,7 @@ final class CalendarForShortMessageProviderTest extends TestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
public function testGenerateRangeIsNull()
|
||||
public function testGenerateRangeIsNull(): void
|
||||
{
|
||||
$calendarRepository = $this->prophesize(CalendarRepository::class);
|
||||
$calendarRepository->findByNotificationAvailable(
|
||||
@@ -63,7 +63,7 @@ final class CalendarForShortMessageProviderTest extends TestCase
|
||||
$this->assertEquals(0, \count($calendars));
|
||||
}
|
||||
|
||||
public function testGetCalendars()
|
||||
public function testGetCalendars(): void
|
||||
{
|
||||
$calendarRepository = $this->prophesize(CalendarRepository::class);
|
||||
$calendarRepository->findByNotificationAvailable(
|
||||
@@ -95,7 +95,7 @@ final class CalendarForShortMessageProviderTest extends TestCase
|
||||
$this->assertContainsOnly(Calendar::class, $calendars);
|
||||
}
|
||||
|
||||
public function testGetCalendarsWithOnlyOneCalendar()
|
||||
public function testGetCalendarsWithOnlyOneCalendar(): void
|
||||
{
|
||||
$calendarRepository = $this->prophesize(CalendarRepository::class);
|
||||
$calendarRepository->findByNotificationAvailable(
|
||||
|
@@ -83,7 +83,7 @@ final class DefaultRangeGeneratorTest extends TestCase
|
||||
/**
|
||||
* @dataProvider generateData
|
||||
*/
|
||||
public function testGenerateRange(\DateTimeImmutable $date, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate)
|
||||
public function testGenerateRange(\DateTimeImmutable $date, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate): void
|
||||
{
|
||||
$generator = new DefaultRangeGenerator();
|
||||
|
||||
|
@@ -44,7 +44,7 @@ final class DefaultShortMessageForCalendarBuilderTest extends TestCase
|
||||
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
|
||||
}
|
||||
|
||||
public function testBuildMessageForCalendar()
|
||||
public function testBuildMessageForCalendar(): void
|
||||
{
|
||||
$calendar = new Calendar();
|
||||
$calendar
|
||||
|
Reference in New Issue
Block a user