Rector changes and immplementations of required methods

This commit is contained in:
2025-05-22 17:47:07 +02:00
parent 053b92b77c
commit 17db59d221
1138 changed files with 2656 additions and 2616 deletions

View File

@@ -33,7 +33,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
private TranslatableStringHelperInterface $translatableStringHelper,
) {}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('after_date', PickRollingDateType::class, [
@@ -84,7 +84,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;

View File

@@ -27,7 +27,7 @@ class BySocialActionAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.socialActions', 'actsocialaction');
@@ -42,7 +42,7 @@ class BySocialActionAggregator implements AggregatorInterface
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// no form
}

View File

@@ -27,7 +27,7 @@ class BySocialIssueAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.socialIssues', 'actsocialissue');
@@ -42,7 +42,7 @@ class BySocialIssueAggregator implements AggregatorInterface
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// no form
}

View File

@@ -25,7 +25,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.location', 'actloc');
@@ -39,7 +39,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// no form required for this aggregator
}

View File

@@ -22,7 +22,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
{
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {}
public function buildForm(FormBuilderInterface $builder) {}
public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{

View File

@@ -36,7 +36,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
// add select element
if ('reasons' === $data['level']) {
@@ -72,7 +72,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add(
'level',
@@ -144,7 +144,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
return 'Aggregate by activity reason';
}
public function validateForm($data, ExecutionContextInterface $context)
public function validateForm($data, ExecutionContextInterface $context): void
{
if (null === $data['level']) {
$context

View File

@@ -29,7 +29,7 @@ class ActivityTypeAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('acttype', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.activityType', 'acttype');
@@ -44,7 +44,7 @@ class ActivityTypeAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// no form required for this aggregator
}

View File

@@ -29,7 +29,7 @@ class ActivityUserAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
// add select element
$qb->addSelect(sprintf('IDENTITY(activity.user) AS %s', self::KEY));
@@ -43,7 +43,7 @@ class ActivityUserAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add
}

View File

@@ -27,7 +27,7 @@ class ActivityUsersAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actusers', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.users', 'actusers');
@@ -43,7 +43,7 @@ class ActivityUsersAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add on the form
}

View File

@@ -34,7 +34,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;

View File

@@ -34,7 +34,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;

View File

@@ -27,7 +27,7 @@ class ByCreatorAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->addSelect('IDENTITY(activity.createdBy) AS creator_aggregator');
$qb->addGroupBy('creator_aggregator');
@@ -38,7 +38,7 @@ class ByCreatorAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// no form
}

View File

@@ -27,7 +27,7 @@ class ByThirdpartyAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('acttparty', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.thirdParties', 'acttparty');
@@ -42,7 +42,7 @@ class ByThirdpartyAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// no form
}

View File

@@ -34,7 +34,7 @@ class CreatorJobAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;

View File

@@ -34,7 +34,7 @@ class CreatorScopeAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;

View File

@@ -32,7 +32,7 @@ class DateAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$order = null;
@@ -67,7 +67,7 @@ class DateAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('frequency', ChoiceType::class, [
'choices' => self::CHOICES,

View File

@@ -27,7 +27,7 @@ class LocationTypeAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.location', 'actloc');
@@ -42,7 +42,7 @@ class LocationTypeAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// no form
}

View File

@@ -24,7 +24,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface
{
public function __construct(private HouseholdRepository $householdRepository) {}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add here
}
@@ -64,7 +64,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->join(
HouseholdMember::class,

View File

@@ -21,7 +21,7 @@ final readonly class PersonAggregator implements AggregatorInterface
{
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add here
}
@@ -31,7 +31,7 @@ final readonly class PersonAggregator implements AggregatorInterface
return [];
}
public function getLabels($key, array $values, mixed $data)
public function getLabels($key, array $values, mixed $data): callable
{
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.person.by_person.person');
}
@@ -51,7 +51,7 @@ final readonly class PersonAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->addSelect('IDENTITY(activity.person) AS activity_by_person_agg')

View File

@@ -27,7 +27,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add here
}
@@ -37,7 +37,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
return [];
}
public function getLabels($key, array $values, mixed $data)
public function getLabels($key, array $values, mixed $data): callable
{
if ($key !== self::PREFIX.'_pid') {
throw new \UnexpectedValueException('this key should not be handled: '.$key);
@@ -61,7 +61,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;

View File

@@ -41,7 +41,7 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// TODO: Implement buildForm() method.
}

View File

@@ -42,7 +42,7 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
public function buildForm(FormBuilderInterface $builder) {}
public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{

View File

@@ -33,7 +33,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
) {}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$this->helper->buildForm($builder);
}
@@ -73,7 +73,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
};
}
public function getQueryKeys($data)
public function getQueryKeys($data): array
{
return
array_merge(
@@ -95,7 +95,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
return ListActivityHelper::MSG_KEY.'List activity linked to a course';
}
public function getType()
public function getType(): string
{
return $this->helper->getType();
}
@@ -140,7 +140,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
return ActivityStatsVoter::LISTS;
}
public function supportsModifiers()
public function supportsModifiers(): array
{
return array_merge(
$this->helper->supportsModifiers(),

View File

@@ -40,7 +40,7 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// TODO: Implement buildForm() method.
}

View File

@@ -40,7 +40,7 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// TODO: Implement buildForm() method.
}

View File

@@ -34,7 +34,7 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
public function buildForm(FormBuilderInterface $builder) {}
public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{

View File

@@ -59,7 +59,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('fields', ChoiceType::class, [
'multiple' => true,

View File

@@ -38,7 +38,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$exists = self::BASE_EXISTS;
@@ -67,7 +67,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_activitytypes', EntityType::class, [
'class' => ActivityType::class,

View File

@@ -28,7 +28,7 @@ class BySocialActionFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
$qb->join('activity.socialActions', 'actsocialaction');
@@ -48,7 +48,7 @@ class BySocialActionFilter implements FilterInterface
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_socialactions', PickSocialActionType::class, [
'multiple' => true,

View File

@@ -28,7 +28,7 @@ class BySocialIssueFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
$qb->join('activity.socialIssues', 'actsocialissue');
@@ -48,7 +48,7 @@ class BySocialIssueFilter implements FilterInterface
return Declarations::ACTIVITY_ACP;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_socialissues', PickSocialIssueType::class, [
'multiple' => true,

View File

@@ -27,7 +27,7 @@ class HasNoActivityFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->andWhere('
@@ -43,7 +43,7 @@ class HasNoActivityFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
// no form needed
}

View File

@@ -30,7 +30,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
return 'export.filter.activity.course_having_activity_between_date.Title';
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('start_date', PickRollingDateType::class, [
@@ -65,7 +65,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$alias = 'act_period_having_act_betw_date_alias';
$from = 'act_period_having_act_betw_date_start';

View File

@@ -30,7 +30,7 @@ class ActivityDateFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->between(
@@ -61,7 +61,7 @@ class ActivityDateFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_from', PickRollingDateType::class, [

View File

@@ -33,7 +33,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface
return 'export.filter.activity.by_presence.Filter activity by activity presence';
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('presences', EntityType::class, [
'class' => ActivityPresence::class,
@@ -68,7 +68,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->andWhere('activity.attendee IN (:activity_presence_filter_presences)')

View File

@@ -34,7 +34,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->in('activity.activityType', ':selected_activity_types');
@@ -47,7 +47,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('types', EntityType::class, [
'choices' => $this->activityTypeRepository->findAllActive(),
@@ -93,7 +93,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
return 'Filter by activity type';
}
public function validateForm($data, ExecutionContextInterface $context)
public function validateForm($data, ExecutionContextInterface $context): void
{
if (null === $data['types'] || 0 === \count($data['types'])) {
$context

View File

@@ -27,7 +27,7 @@ class ActivityUsersFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$orX = $qb->expr()->orX();
@@ -44,7 +44,7 @@ class ActivityUsersFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_users', PickUserDynamicType::class, [
'multiple' => true,

View File

@@ -27,7 +27,7 @@ class ByCreatorFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->andWhere(
@@ -41,7 +41,7 @@ class ByCreatorFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_users', PickUserDynamicType::class, [
'multiple' => true,

View File

@@ -39,7 +39,7 @@ final readonly class CreatorJobFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -75,7 +75,7 @@ final readonly class CreatorJobFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('jobs', EntityType::class, [

View File

@@ -36,7 +36,7 @@ class CreatorScopeFilter 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 CreatorScopeFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('scopes', EntityType::class, [

View File

@@ -35,7 +35,7 @@ class EmergencyFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -56,7 +56,7 @@ class EmergencyFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_emergency', ChoiceType::class, [
'choices' => self::CHOICES,

View File

@@ -24,7 +24,7 @@ class LocationFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->andWhere(
$qb->expr()->in('activity.location', ':location')
@@ -38,7 +38,7 @@ class LocationFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_location', PickUserLocationType::class, [
'multiple' => true,

View File

@@ -28,7 +28,7 @@ class LocationTypeFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
$qb->join('activity.location', 'actloc');
@@ -52,7 +52,7 @@ class LocationTypeFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_locationtype', PickLocationTypeType::class, [
'multiple' => true,

View File

@@ -33,7 +33,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$join = $qb->getDQLPart('join');
@@ -58,7 +58,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
return Declarations::ACTIVITY_PERSON;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('reasons', EntityType::class, [
'class' => ActivityReason::class,
@@ -96,7 +96,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
return 'Filter by reason';
}
public function validateForm($data, ExecutionContextInterface $context)
public function validateForm($data, ExecutionContextInterface $context): void
{
if (null === $data['reasons'] || 0 === \count($data['reasons'])) {
$context

View File

@@ -92,7 +92,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
return Declarations::PERSON_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('date_from_rolling', PickRollingDateType::class, [
'label' => 'export.filter.activity.person_between_dates.Implied in an activity after this date',
@@ -150,7 +150,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
return 'export.filter.activity.person_between_dates.title';
}
public function validateForm($data, ExecutionContextInterface $context)
public function validateForm($data, ExecutionContextInterface $context): void
{
if ($this->rollingDateConverter->convert($data['date_from_rolling'])
>= $this->rollingDateConverter->convert($data['date_to_rolling'])) {

View File

@@ -33,7 +33,7 @@ final readonly class PersonsFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -52,7 +52,7 @@ final readonly class PersonsFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_persons', PickPersonDynamicType::class, [
'multiple' => true,

View File

@@ -36,7 +36,7 @@ class SentReceivedFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -57,7 +57,7 @@ class SentReceivedFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_sentreceived', ChoiceType::class, [
'choices' => self::CHOICES,

View File

@@ -28,7 +28,7 @@ class UserFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -49,7 +49,7 @@ class UserFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_users', PickUserDynamicType::class, [
'multiple' => true,

View File

@@ -37,7 +37,7 @@ class UsersJobFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ class UsersJobFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('jobs', EntityType::class, [

View File

@@ -37,7 +37,7 @@ class UsersScopeFilter implements FilterInterface
return null;
}
public function alterQuery(QueryBuilder $qb, $data)
public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ class UsersScopeFilter implements FilterInterface
return Declarations::ACTIVITY;
}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('scopes', EntityType::class, [