mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 09:18:24 +00:00 
			
		
		
		
	php style fixer
This commit is contained in:
		| @@ -13,4 +13,6 @@ namespace Chill\ActivityBundle; | ||||
|  | ||||
| use Symfony\Component\HttpKernel\Bundle\Bundle; | ||||
|  | ||||
| class ChillActivityBundle extends Bundle {} | ||||
| class ChillActivityBundle extends Bundle | ||||
| { | ||||
| } | ||||
|   | ||||
| @@ -67,7 +67,8 @@ final class ActivityController extends AbstractController | ||||
|         private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper, | ||||
|         private readonly PaginatorFactory $paginatorFactory, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Deletes a Activity entity. | ||||
| @@ -673,8 +674,8 @@ final class ActivityController extends AbstractController | ||||
|                 throw $this->createNotFoundException('Accompanying Period not found'); | ||||
|             } | ||||
|  | ||||
|         // TODO Add permission | ||||
|         // $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person); | ||||
|             // TODO Add permission | ||||
|             // $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person); | ||||
|         } else { | ||||
|             throw $this->createNotFoundException('Person or Accompanying Period not found'); | ||||
|         } | ||||
|   | ||||
| @@ -56,7 +56,7 @@ class ActivityReasonCategoryController extends AbstractController | ||||
|     { | ||||
|         $em = $this->getDoctrine()->getManager(); | ||||
|  | ||||
|         $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id); | ||||
|         $entity = $em->getRepository(ActivityReasonCategory::class)->find($id); | ||||
|  | ||||
|         if (!$entity) { | ||||
|             throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); | ||||
| @@ -79,7 +79,7 @@ class ActivityReasonCategoryController extends AbstractController | ||||
|     { | ||||
|         $em = $this->getDoctrine()->getManager(); | ||||
|  | ||||
|         $entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->findAll(); | ||||
|         $entities = $em->getRepository(ActivityReasonCategory::class)->findAll(); | ||||
|  | ||||
|         return $this->render('@ChillActivity/ActivityReasonCategory/index.html.twig', [ | ||||
|             'entities' => $entities, | ||||
| @@ -111,7 +111,7 @@ class ActivityReasonCategoryController extends AbstractController | ||||
|     { | ||||
|         $em = $this->getDoctrine()->getManager(); | ||||
|  | ||||
|         $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id); | ||||
|         $entity = $em->getRepository(ActivityReasonCategory::class)->find($id); | ||||
|  | ||||
|         if (!$entity) { | ||||
|             throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); | ||||
| @@ -131,7 +131,7 @@ class ActivityReasonCategoryController extends AbstractController | ||||
|     { | ||||
|         $em = $this->getDoctrine()->getManager(); | ||||
|  | ||||
|         $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id); | ||||
|         $entity = $em->getRepository(ActivityReasonCategory::class)->find($id); | ||||
|  | ||||
|         if (!$entity) { | ||||
|             throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); | ||||
|   | ||||
| @@ -24,7 +24,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | ||||
|  */ | ||||
| class ActivityReasonController extends AbstractController | ||||
| { | ||||
|     public function __construct(private readonly ActivityReasonRepository $activityReasonRepository) {} | ||||
|     public function __construct(private readonly ActivityReasonRepository $activityReasonRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Creates a new ActivityReason entity. | ||||
| @@ -60,7 +62,7 @@ class ActivityReasonController extends AbstractController | ||||
|     { | ||||
|         $em = $this->getDoctrine()->getManager(); | ||||
|  | ||||
|         $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id); | ||||
|         $entity = $em->getRepository(ActivityReason::class)->find($id); | ||||
|  | ||||
|         if (null === $entity) { | ||||
|             throw new NotFoundHttpException('Unable to find ActivityReason entity.'); | ||||
| @@ -115,7 +117,7 @@ class ActivityReasonController extends AbstractController | ||||
|     { | ||||
|         $em = $this->getDoctrine()->getManager(); | ||||
|  | ||||
|         $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id); | ||||
|         $entity = $em->getRepository(ActivityReason::class)->find($id); | ||||
|  | ||||
|         if (!$entity) { | ||||
|             throw $this->createNotFoundException('Unable to find ActivityReason entity.'); | ||||
| @@ -135,7 +137,7 @@ class ActivityReasonController extends AbstractController | ||||
|     { | ||||
|         $em = $this->getDoctrine()->getManager(); | ||||
|  | ||||
|         $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id); | ||||
|         $entity = $em->getRepository(ActivityReason::class)->find($id); | ||||
|  | ||||
|         if (!$entity) { | ||||
|             throw $this->createNotFoundException('Unable to find ActivityReason entity.'); | ||||
|   | ||||
| @@ -19,7 +19,9 @@ use Doctrine\ORM\EntityManagerInterface; | ||||
|  | ||||
| class ActivityEntityListener | ||||
| { | ||||
|     public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository) {} | ||||
|     public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function persistActionToCourse(Activity $activity) | ||||
|     { | ||||
|   | ||||
| @@ -31,7 +31,8 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface | ||||
|         private RollingDateConverterInterface $rollingDateConverter, | ||||
|         private ActivityTypeRepositoryInterface $activityTypeRepository, | ||||
|         private TranslatableStringHelperInterface $translatableStringHelper, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
| @@ -56,7 +57,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface | ||||
|  | ||||
|     public function getLabels($key, array $values, mixed $data) | ||||
|     { | ||||
|         return function (null|int|string $value): string { | ||||
|         return function (int|string|null $value): string { | ||||
|             if ('_header' === $value) { | ||||
|                 return 'export.aggregator.acp.by_activity_type.activity_type'; | ||||
|             } | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class BySocialActionAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) {} | ||||
|     public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class BySocialIssueAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender) {} | ||||
|     public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -20,9 +20,13 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| final readonly class ActivityPresenceAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {} | ||||
|     public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
| @@ -31,7 +35,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface | ||||
|  | ||||
|     public function getLabels($key, array $values, mixed $data) | ||||
|     { | ||||
|         return function (null|int|string $value): string { | ||||
|         return function (int|string|null $value): string { | ||||
|             if ('_header' === $value) { | ||||
|                 return 'export.aggregator.activity.by_activity_presence.header'; | ||||
|             } | ||||
|   | ||||
| @@ -22,7 +22,9 @@ class ActivityTypeAggregator implements AggregatorInterface | ||||
| { | ||||
|     final public const KEY = 'activity_type_aggregator'; | ||||
|  | ||||
|     public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper) {} | ||||
|     public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
| @@ -56,7 +58,7 @@ class ActivityTypeAggregator implements AggregatorInterface | ||||
|  | ||||
|     public function getLabels($key, array $values, $data): \Closure | ||||
|     { | ||||
|         return function (null|int|string $value): string { | ||||
|         return function (int|string|null $value): string { | ||||
|             if ('_header' === $value) { | ||||
|                 return 'Activity type'; | ||||
|             } | ||||
|   | ||||
| @@ -22,7 +22,9 @@ class ActivityUserAggregator implements AggregatorInterface | ||||
| { | ||||
|     final public const KEY = 'activity_user_id'; | ||||
|  | ||||
|     public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender) {} | ||||
|     public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class ActivityUsersAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {} | ||||
|     public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -27,7 +27,8 @@ class ActivityUsersJobAggregator implements AggregatorInterface | ||||
|     public function __construct( | ||||
|         private readonly UserJobRepositoryInterface $userJobRepository, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
| @@ -65,7 +66,9 @@ class ActivityUsersJobAggregator implements AggregatorInterface | ||||
|         return Declarations::ACTIVITY; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -27,7 +27,8 @@ class ActivityUsersScopeAggregator implements AggregatorInterface | ||||
|     public function __construct( | ||||
|         private readonly ScopeRepositoryInterface $scopeRepository, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
| @@ -65,7 +66,9 @@ class ActivityUsersScopeAggregator implements AggregatorInterface | ||||
|         return Declarations::ACTIVITY; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class ByCreatorAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {} | ||||
|     public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class ByThirdpartyAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender) {} | ||||
|     public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -27,7 +27,8 @@ class CreatorJobAggregator implements AggregatorInterface | ||||
|     public function __construct( | ||||
|         private readonly UserJobRepositoryInterface $userJobRepository, | ||||
|         private readonly TranslatableStringHelper $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
| @@ -65,7 +66,9 @@ class CreatorJobAggregator implements AggregatorInterface | ||||
|         return Declarations::ACTIVITY; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -27,7 +27,8 @@ class CreatorScopeAggregator implements AggregatorInterface | ||||
|     public function __construct( | ||||
|         private readonly ScopeRepository $scopeRepository, | ||||
|         private readonly TranslatableStringHelper $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
| @@ -65,7 +66,9 @@ class CreatorScopeAggregator implements AggregatorInterface | ||||
|         return Declarations::ACTIVITY; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class LocationTypeAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper) {} | ||||
|     public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -25,7 +25,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; | ||||
|  | ||||
| class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface | ||||
| { | ||||
|     public function __construct(protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, protected ActivityReasonRepository $activityReasonRepository, protected TranslatableStringHelper $translatableStringHelper) {} | ||||
|     public function __construct(protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, protected ActivityReasonRepository $activityReasonRepository, protected TranslatableStringHelper $translatableStringHelper) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -19,7 +19,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| final readonly class PersonAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private LabelPersonHelper $labelPersonHelper) {} | ||||
|     public function __construct(private LabelPersonHelper $labelPersonHelper) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|   | ||||
| @@ -25,7 +25,9 @@ final readonly class PersonsAggregator implements AggregatorInterface | ||||
| { | ||||
|     private const PREFIX = 'act_persons_agg'; | ||||
|  | ||||
|     public function __construct(private LabelPersonHelper $labelPersonHelper) {} | ||||
|     public function __construct(private LabelPersonHelper $labelPersonHelper) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|   | ||||
| @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  | ||||
| class SentReceivedAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private readonly TranslatorInterface $translator) {} | ||||
|     public function __construct(private readonly TranslatorInterface $translator) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -36,7 +36,9 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface | ||||
|         $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -41,7 +41,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface | ||||
|         $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -42,7 +42,9 @@ 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) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -41,7 +41,9 @@ class CountPersonsOnActivity implements ExportInterface, GroupedExportInterface | ||||
|         $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -31,7 +31,8 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa | ||||
|         private EntityManagerInterface $entityManager, | ||||
|         private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper, | ||||
|         private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|   | ||||
| @@ -33,7 +33,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface | ||||
|         $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -34,7 +34,9 @@ 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) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -47,7 +47,9 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface | ||||
|         $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -40,7 +40,8 @@ class ListActivityHelper | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper, | ||||
|         private readonly TranslatableStringExportLabelHelper $translatableStringLabelHelper, | ||||
|         private readonly UserHelper $userHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addSelect(QueryBuilder $qb): void | ||||
|     { | ||||
| @@ -74,7 +75,9 @@ class ListActivityHelper | ||||
|             ->addGroupBy('location.id'); | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getAllowedFormattersTypes() | ||||
|     { | ||||
|   | ||||
| @@ -31,7 +31,8 @@ final readonly class ActivityTypeFilter implements FilterInterface | ||||
|         private ActivityTypeRepositoryInterface $activityTypeRepository, | ||||
|         private TranslatableStringHelperInterface $translatableStringHelper, | ||||
|         private RollingDateConverterInterface $rollingDateConverter, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class BySocialActionFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct(private readonly SocialActionRender $actionRender) {} | ||||
|     public function __construct(private readonly SocialActionRender $actionRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class BySocialIssueFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct(private readonly SocialIssueRender $issueRender) {} | ||||
|     public function __construct(private readonly SocialIssueRender $issueRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -23,7 +23,8 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt | ||||
| { | ||||
|     public function __construct( | ||||
|         private RollingDateConverterInterface $rollingDateConverter, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function getTitle() | ||||
|     { | ||||
|   | ||||
| @@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  | ||||
| class ActivityDateFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter) {} | ||||
|     public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -26,7 +26,8 @@ final readonly class ActivityPresenceFilter implements FilterInterface | ||||
|     public function __construct( | ||||
|         private TranslatableStringHelperInterface $translatableStringHelper, | ||||
|         private TranslatorInterface $translator | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function getTitle() | ||||
|     { | ||||
|   | ||||
| @@ -27,7 +27,8 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter | ||||
|     public function __construct( | ||||
|         protected TranslatableStringHelperInterface $translatableStringHelper, | ||||
|         protected ActivityTypeRepositoryInterface $activityTypeRepository | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class ActivityUsersFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct(private readonly UserRender $userRender) {} | ||||
|     public function __construct(private readonly UserRender $userRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class ByCreatorFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct(private readonly UserRender $userRender) {} | ||||
|     public function __construct(private readonly UserRender $userRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -32,7 +32,8 @@ final readonly class CreatorJobFilter implements FilterInterface | ||||
|         private TranslatableStringHelper $translatableStringHelper, | ||||
|         private TranslatorInterface $translator, | ||||
|         private UserJobRepositoryInterface $userJobRepository, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -27,7 +27,8 @@ class CreatorScopeFilter implements FilterInterface | ||||
|  | ||||
|     public function __construct( | ||||
|         private readonly TranslatableStringHelper $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -28,7 +28,9 @@ class EmergencyFilter implements FilterInterface | ||||
|  | ||||
|     private const DEFAULT_CHOICE = 'false'; | ||||
|  | ||||
|     public function __construct(private readonly TranslatorInterface $translator) {} | ||||
|     public function __construct(private readonly TranslatorInterface $translator) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class LocationTypeFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} | ||||
|     public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -26,7 +26,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; | ||||
|  | ||||
| class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInterface | ||||
| { | ||||
|     public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository) {} | ||||
|     public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -32,7 +32,8 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem | ||||
|         private TranslatableStringHelper $translatableStringHelper, | ||||
|         private ActivityReasonRepository $activityReasonRepository, | ||||
|         private RollingDateConverterInterface $rollingDateConverter, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -26,7 +26,9 @@ final readonly class PersonsFilter implements FilterInterface | ||||
| { | ||||
|     private const PREFIX = 'act_persons_filter'; | ||||
|  | ||||
|     public function __construct(private PersonRenderInterface $personRender) {} | ||||
|     public function __construct(private PersonRenderInterface $personRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -29,7 +29,9 @@ class SentReceivedFilter implements FilterInterface | ||||
|  | ||||
|     private const DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT; | ||||
|  | ||||
|     public function __construct(private readonly TranslatorInterface $translator) {} | ||||
|     public function __construct(private readonly TranslatorInterface $translator) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class UserFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct(private readonly UserRender $userRender) {} | ||||
|     public function __construct(private readonly UserRender $userRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -28,7 +28,8 @@ class UsersJobFilter implements FilterInterface | ||||
|  | ||||
|     public function __construct( | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -30,7 +30,8 @@ class UsersScopeFilter implements FilterInterface | ||||
|     public function __construct( | ||||
|         private readonly ScopeRepositoryInterface $scopeRepository, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -404,7 +404,7 @@ class ActivityType extends AbstractType | ||||
|             ->setAllowedTypes('center', ['null', Center::class, 'array']) | ||||
|             ->setAllowedTypes('role', ['string']) | ||||
|             ->setAllowedTypes('activityType', \Chill\ActivityBundle\Entity\ActivityType::class) | ||||
|             ->setAllowedTypes('accompanyingPeriod', [\Chill\PersonBundle\Entity\AccompanyingPeriod::class, 'null']); | ||||
|             ->setAllowedTypes('accompanyingPeriod', [AccompanyingPeriod::class, 'null']); | ||||
|     } | ||||
|  | ||||
|     public function getBlockPrefix(): string | ||||
|   | ||||
| @@ -25,7 +25,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; | ||||
|  | ||||
| class ActivityTypeType extends AbstractType | ||||
| { | ||||
|     public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} | ||||
|     public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder, array $options) | ||||
|     { | ||||
|   | ||||
| @@ -28,7 +28,8 @@ class PickActivityReasonType extends AbstractType | ||||
|         private readonly ActivityReasonRepository $activityReasonRepository, | ||||
|         private readonly ActivityReasonRender $reasonRender, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function configureOptions(OptionsResolver $resolver) | ||||
|     { | ||||
|   | ||||
| @@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  */ | ||||
| class TranslatableActivityReasonCategoryType extends AbstractType | ||||
| { | ||||
|     public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) {} | ||||
|     public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function configureOptions(OptionsResolver $resolver) | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; | ||||
|  | ||||
| class TranslatableActivityType extends AbstractType | ||||
| { | ||||
|     public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository) {} | ||||
|     public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function configureOptions(OptionsResolver $resolver) | ||||
|     { | ||||
|   | ||||
| @@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  */ | ||||
| class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface | ||||
| { | ||||
|     public function __construct(protected Security $security, protected TranslatorInterface $translator) {} | ||||
|     public function __construct(protected Security $security, protected TranslatorInterface $translator) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildMenu($menuId, MenuItem $menu, array $parameters) | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security; | ||||
|  */ | ||||
| final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface | ||||
| { | ||||
|     public function __construct(private Security $security) {} | ||||
|     public function __construct(private Security $security) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildMenu($menuId, MenuItem $menu, array $parameters) | ||||
|     { | ||||
|   | ||||
| @@ -23,11 +23,13 @@ use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  */ | ||||
| final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface | ||||
| { | ||||
|     public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator) {} | ||||
|     public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildMenu($menuId, MenuItem $menu, array $parameters) | ||||
|     { | ||||
|         /** @var \Chill\PersonBundle\Entity\Person $person */ | ||||
|         /** @var Person $person */ | ||||
|         $person = $parameters['person']; | ||||
|  | ||||
|         if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) { | ||||
|   | ||||
| @@ -18,7 +18,9 @@ use Chill\MainBundle\Notification\NotificationHandlerInterface; | ||||
|  | ||||
| final readonly class ActivityNotificationHandler implements NotificationHandlerInterface | ||||
| { | ||||
|     public function __construct(private ActivityRepository $activityRepository) {} | ||||
|     public function __construct(private ActivityRepository $activityRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getTemplate(Notification $notification, array $options = []): string | ||||
|     { | ||||
|   | ||||
| @@ -44,7 +44,8 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos | ||||
|         private EntityManagerInterface $em, | ||||
|         private Security $security, | ||||
|         private RequestStack $requestStack, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @throws NonUniqueResultException | ||||
|   | ||||
| @@ -33,16 +33,17 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum | ||||
|         private CenterResolverManagerInterface $centerResolverManager, | ||||
|         private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser, | ||||
|         private Security $security | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface | ||||
|     public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface | ||||
|     { | ||||
|         $query = $this->buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext($person, $startDate, $endDate, $content); | ||||
|  | ||||
|         return $this->addFetchQueryByPersonACL($query, $person); | ||||
|     } | ||||
|  | ||||
|     public function buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery | ||||
|     public function buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery | ||||
|     { | ||||
|         $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); | ||||
|         $activityMetadata = $this->em->getClassMetadata(Activity::class); | ||||
| @@ -71,7 +72,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum | ||||
|         return $this->addWhereClauses($query, $startDate, $endDate, $content); | ||||
|     } | ||||
|  | ||||
|     public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery | ||||
|     public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery | ||||
|     { | ||||
|         $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); | ||||
|         $activityMetadata = $this->em->getClassMetadata(Activity::class); | ||||
| @@ -122,7 +123,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum | ||||
|         return $this->addWhereClauses($query, $startDate, $endDate, $content); | ||||
|     } | ||||
|  | ||||
|     private function addWhereClauses(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery | ||||
|     private function addWhereClauses(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery | ||||
|     { | ||||
|         $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); | ||||
|  | ||||
|   | ||||
| @@ -25,12 +25,12 @@ interface ActivityDocumentACLAwareRepositoryInterface | ||||
|      * | ||||
|      * This method must check the rights to see a document: the user must be allowed to see the given activities | ||||
|      */ | ||||
|     public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface; | ||||
|     public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface; | ||||
|  | ||||
|     /** | ||||
|      * Return a fetch query for querying document's activities for an activity in accompanying periods, but for a given person. | ||||
|      * | ||||
|      * This method must check the rights to see a document: the user must be allowed to see the given accompanying periods | ||||
|      */ | ||||
|     public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery; | ||||
|     public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery; | ||||
| } | ||||
|   | ||||
| @@ -34,7 +34,7 @@ class ActivityPresenceRepository implements ActivityPresenceRepositoryInterface | ||||
|         return $this->repository->findAll(); | ||||
|     } | ||||
|  | ||||
|     public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array | ||||
|     public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array | ||||
|     { | ||||
|         return $this->findBy($criteria, $orderBy, $limit, $offset); | ||||
|     } | ||||
|   | ||||
| @@ -25,7 +25,7 @@ interface ActivityPresenceRepositoryInterface | ||||
|     /** | ||||
|      * @return array|ActivityPresence[] | ||||
|      */ | ||||
|     public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; | ||||
|     public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; | ||||
|  | ||||
|     public function findOneBy(array $criteria): ?ActivityPresence; | ||||
|  | ||||
|   | ||||
| @@ -48,7 +48,7 @@ final class ActivityTypeRepository implements ActivityTypeRepositoryInterface | ||||
|     /** | ||||
|      * @return array|ActivityType[] | ||||
|      */ | ||||
|     public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array | ||||
|     public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array | ||||
|     { | ||||
|         return $this->repository->findBy($criteria, $orderBy, $limit, $offset); | ||||
|     } | ||||
|   | ||||
| @@ -51,7 +51,8 @@ class ActivityContext implements | ||||
|         private readonly BaseContextData $baseContextData, | ||||
|         private readonly ThirdPartyRender $thirdPartyRender, | ||||
|         private readonly ThirdPartyRepository $thirdPartyRepository | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function adminFormReverseTransform(array $data): array | ||||
|     { | ||||
|   | ||||
| @@ -56,7 +56,8 @@ class ListActivitiesByAccompanyingPeriodContext implements | ||||
|         private readonly ThirdPartyRepository $thirdPartyRepository, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper, | ||||
|         private readonly UserRepository $userRepository | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function adminFormReverseTransform(array $data): array | ||||
|     { | ||||
|   | ||||
| @@ -34,9 +34,10 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen | ||||
|         private EntityManagerInterface $em, | ||||
|         private Security $security, | ||||
|         private ActivityDocumentACLAwareRepositoryInterface $activityDocumentACLAwareRepository, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface | ||||
|     public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface | ||||
|     { | ||||
|         $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); | ||||
|         $activityMetadata = $this->em->getClassMetadata(Activity::class); | ||||
| @@ -99,7 +100,7 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen | ||||
|         return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person); | ||||
|     } | ||||
|  | ||||
|     public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface | ||||
|     public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface | ||||
|     { | ||||
|         return $this->activityDocumentACLAwareRepository | ||||
|             ->buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext($person, $startDate, $endDate, $content); | ||||
|   | ||||
| @@ -25,9 +25,10 @@ final readonly class PersonActivityGenericDocProvider implements GenericDocForPe | ||||
|     public function __construct( | ||||
|         private Security $security, | ||||
|         private ActivityDocumentACLAwareRepositoryInterface $personActivityDocumentACLAwareRepository, | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface | ||||
|     public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface | ||||
|     { | ||||
|         return $this->personActivityDocumentACLAwareRepository->buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext( | ||||
|             $person, | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Chill\DocStoreBundle\Repository\StoredObjectRepository; | ||||
|  | ||||
| final readonly class AccompanyingPeriodActivityGenericDocRenderer implements GenericDocRendererInterface | ||||
| { | ||||
|     public function __construct(private StoredObjectRepository $objectRepository, private ActivityRepository $activityRepository) {} | ||||
|     public function __construct(private StoredObjectRepository $objectRepository, private ActivityRepository $activityRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function supports(GenericDocDTO $genericDocDTO, $options = []): bool | ||||
|     { | ||||
|   | ||||
| @@ -310,7 +310,7 @@ final class ActivityControllerTest extends WebTestCase | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @return \Chill\ActivityBundle\Entity\ActivityType | ||||
|      * @return ActivityType | ||||
|      */ | ||||
|     private function getRandomActivityType() | ||||
|     { | ||||
|   | ||||
| @@ -35,7 +35,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest | ||||
|         $this->filter = self::$container->get('chill.activity.export.person_having_an_activity_between_date_filter'); | ||||
|  | ||||
|         $request = $this->prophesize() | ||||
|             ->willExtend(\Symfony\Component\HttpFoundation\Request::class); | ||||
|             ->willExtend(Request::class); | ||||
|  | ||||
|         $request->getLocale()->willReturn('fr'); | ||||
|  | ||||
|   | ||||
| @@ -58,7 +58,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase | ||||
|  | ||||
|         $this->assertTrue($form->isSynchronized()); | ||||
|         $this->assertInstanceOf( | ||||
|             \Chill\ActivityBundle\Entity\ActivityType::class, | ||||
|             ActivityType::class, | ||||
|             $form->getData()['type'], | ||||
|             'The data is an instance of Chill\\ActivityBundle\\Entity\\ActivityType' | ||||
|         ); | ||||
| @@ -83,7 +83,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @return \Chill\ActivityBundle\Entity\ActivityType | ||||
|      * @return ActivityType | ||||
|      */ | ||||
|     protected function getRandomType(mixed $active = true) | ||||
|     { | ||||
|   | ||||
| @@ -157,7 +157,7 @@ final class ActivityVoterTest extends KernelTestCase | ||||
|      * | ||||
|      * @return \Symfony\Component\Security\Core\Authentication\Token\TokenInterface | ||||
|      */ | ||||
|     protected function prepareToken(User $user = null) | ||||
|     protected function prepareToken(?User $user = null) | ||||
|     { | ||||
|         $token = $this->prophet->prophesize(); | ||||
|         $token | ||||
|   | ||||
| @@ -13,4 +13,6 @@ namespace Chill\AsideActivityBundle; | ||||
|  | ||||
| use Symfony\Component\HttpKernel\Bundle\Bundle; | ||||
|  | ||||
| class ChillAsideActivityBundle extends Bundle {} | ||||
| class ChillAsideActivityBundle extends Bundle | ||||
| { | ||||
| } | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\HttpFoundation\Request; | ||||
|  | ||||
| final class AsideActivityController extends CRUDController | ||||
| { | ||||
|     public function __construct(private readonly AsideActivityCategoryRepository $categoryRepository) {} | ||||
|     public function __construct(private readonly AsideActivityCategoryRepository $categoryRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function createEntity(string $action, Request $request): object | ||||
|     { | ||||
| @@ -47,7 +49,7 @@ final class AsideActivityController extends CRUDController | ||||
|         return $asideActivity; | ||||
|     } | ||||
|  | ||||
|     protected function buildQueryEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null) | ||||
|     protected function buildQueryEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null) | ||||
|     { | ||||
|         $qb = parent::buildQueryEntities($action, $request); | ||||
|  | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Doctrine\Persistence\ObjectManager; | ||||
|  | ||||
| class LoadAsideActivity extends Fixture implements DependentFixtureInterface | ||||
| { | ||||
|     public function __construct(private readonly UserRepository $userRepository) {} | ||||
|     public function __construct(private readonly UserRepository $userRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getDependencies(): array | ||||
|     { | ||||
|   | ||||
| @@ -32,7 +32,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface | ||||
|      * | ||||
|      * @Assert\NotBlank | ||||
|      */ | ||||
|     private \Chill\MainBundle\Entity\User $agent; | ||||
|     private User $agent; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="datetime") | ||||
| @@ -44,7 +44,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface | ||||
|      * | ||||
|      * @ORM\JoinColumn(nullable=false) | ||||
|      */ | ||||
|     private \Chill\MainBundle\Entity\User $createdBy; | ||||
|     private User $createdBy; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="datetime") | ||||
| @@ -82,7 +82,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface | ||||
|      * | ||||
|      * @ORM\JoinColumn(nullable=false) | ||||
|      */ | ||||
|     private ?\Chill\AsideActivityBundle\Entity\AsideActivityCategory $type = null; | ||||
|     private ?AsideActivityCategory $type = null; | ||||
|  | ||||
|     /** | ||||
|      * @ORM\Column(type="datetime", nullable=true) | ||||
| @@ -92,7 +92,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface | ||||
|     /** | ||||
|      * @ORM\ManyToOne(targetEntity=User::class) | ||||
|      */ | ||||
|     private \Chill\MainBundle\Entity\User $updatedBy; | ||||
|     private User $updatedBy; | ||||
|  | ||||
|     public function getAgent(): ?User | ||||
|     { | ||||
|   | ||||
| @@ -23,7 +23,8 @@ class ByActivityTypeAggregator implements AggregatorInterface | ||||
|     public function __construct( | ||||
|         private readonly AsideActivityCategoryRepository $asideActivityCategoryRepository, | ||||
|         private readonly TranslatableStringHelper $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -19,7 +19,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class ByLocationAggregator implements AggregatorInterface | ||||
| { | ||||
|     public function __construct(private readonly LocationRepository $locationRepository) {} | ||||
|     public function __construct(private readonly LocationRepository $locationRepository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder): void | ||||
|     { | ||||
|   | ||||
| @@ -27,7 +27,8 @@ class ByUserJobAggregator implements AggregatorInterface | ||||
|     public function __construct( | ||||
|         private readonly UserJobRepositoryInterface $userJobRepository, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
| @@ -65,7 +66,9 @@ class ByUserJobAggregator implements AggregatorInterface | ||||
|         return Declarations::ASIDE_ACTIVITY_TYPE; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -27,7 +27,8 @@ class ByUserScopeAggregator implements AggregatorInterface | ||||
|     public function __construct( | ||||
|         private readonly ScopeRepositoryInterface $scopeRepository, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
| @@ -64,7 +65,9 @@ class ByUserScopeAggregator implements AggregatorInterface | ||||
|         return Declarations::ASIDE_ACTIVITY_TYPE; | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -22,9 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class AvgAsideActivityDuration implements ExportInterface, GroupedExportInterface | ||||
| { | ||||
|     public function __construct(private readonly AsideActivityRepository $repository) {} | ||||
|     public function __construct(private readonly AsideActivityRepository $repository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -22,9 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class CountAsideActivity implements ExportInterface, GroupedExportInterface | ||||
| { | ||||
|     public function __construct(private readonly AsideActivityRepository $repository) {} | ||||
|     public function __construct(private readonly AsideActivityRepository $repository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -42,9 +42,12 @@ final readonly class ListAsideActivity implements ListInterface, GroupedExportIn | ||||
|         private CategoryRender $categoryRender, | ||||
|         private LocationRepository $locationRepository, | ||||
|         private TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -22,9 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class SumAsideActivityDuration implements ExportInterface, GroupedExportInterface | ||||
| { | ||||
|     public function __construct(private readonly AsideActivityRepository $repository) {} | ||||
|     public function __construct(private readonly AsideActivityRepository $repository) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder) {} | ||||
|     public function buildForm(FormBuilderInterface $builder) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function getFormDefaultData(): array | ||||
|     { | ||||
|   | ||||
| @@ -28,7 +28,8 @@ class ByActivityTypeFilter implements FilterInterface | ||||
|         private readonly CategoryRender $categoryRender, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper, | ||||
|         private readonly AsideActivityCategoryRepository $asideActivityTypeRepository | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -22,7 +22,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  | ||||
| class ByDateFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, protected TranslatorInterface $translator) {} | ||||
|     public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, protected TranslatorInterface $translator) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -25,7 +25,8 @@ final readonly class ByLocationFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct( | ||||
|         private Security $security | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function getTitle(): string | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| class ByUserFilter implements FilterInterface | ||||
| { | ||||
|     public function __construct(private readonly UserRender $userRender) {} | ||||
|     public function __construct(private readonly UserRender $userRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -28,7 +28,8 @@ class ByUserJobFilter implements FilterInterface | ||||
|  | ||||
|     public function __construct( | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -30,7 +30,8 @@ class ByUserScopeFilter implements FilterInterface | ||||
|     public function __construct( | ||||
|         private readonly ScopeRepositoryInterface $scopeRepository, | ||||
|         private readonly TranslatableStringHelperInterface $translatableStringHelper | ||||
|     ) {} | ||||
|     ) { | ||||
|     } | ||||
|  | ||||
|     public function addRole(): ?string | ||||
|     { | ||||
|   | ||||
| @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; | ||||
|  | ||||
| final class AsideActivityCategoryType extends AbstractType | ||||
| { | ||||
|     public function __construct(private readonly CategoryRender $categoryRender) {} | ||||
|     public function __construct(private readonly CategoryRender $categoryRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildForm(FormBuilderInterface $builder, array $options) | ||||
|     { | ||||
|   | ||||
| @@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; | ||||
|  | ||||
| final class PickAsideActivityCategoryType extends AbstractType | ||||
| { | ||||
|     public function __construct(private readonly CategoryRender $categoryRender) {} | ||||
|     public function __construct(private readonly CategoryRender $categoryRender) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function configureOptions(OptionsResolver $resolver) | ||||
|     { | ||||
|   | ||||
| @@ -16,7 +16,9 @@ use Symfony\Component\Security\Core\Security; | ||||
|  | ||||
| final readonly class AdminMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuilderInterface | ||||
| { | ||||
|     public function __construct(private Security $security) {} | ||||
|     public function __construct(private Security $security) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildMenu($menuId, MenuItem $menu, array $parameters) | ||||
|     { | ||||
|   | ||||
| @@ -21,7 +21,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; | ||||
|  */ | ||||
| class SectionMenuBuilder implements LocalMenuBuilderInterface | ||||
| { | ||||
|     public function __construct(protected TranslatorInterface $translator, public AuthorizationCheckerInterface $authorizationChecker) {} | ||||
|     public function __construct(protected TranslatorInterface $translator, public AuthorizationCheckerInterface $authorizationChecker) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildMenu($menuId, MenuItem $menu, array $parameters) | ||||
|     { | ||||
|   | ||||
| @@ -49,7 +49,7 @@ class AsideActivityCategoryRepository implements ObjectRepository | ||||
|      * | ||||
|      * @return AsideActivityCategory[] | ||||
|      */ | ||||
|     public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array | ||||
|     public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array | ||||
|     { | ||||
|         return $this->repository->findBy($criteria, $orderBy, $limit, $offset); | ||||
|     } | ||||
|   | ||||
| @@ -26,7 +26,9 @@ final readonly class CategoryRender implements ChillEntityRenderInterface | ||||
|  | ||||
|     public const SEPERATOR_KEY = 'default.separator'; | ||||
|  | ||||
|     public function __construct(private TranslatableStringHelper $translatableStringHelper, private \Twig\Environment $engine) {} | ||||
|     public function __construct(private TranslatableStringHelper $translatableStringHelper, private \Twig\Environment $engine) | ||||
|     { | ||||
|     } | ||||
|  | ||||
|     public function buildParents(AsideActivityCategory $asideActivityCategory) | ||||
|     { | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user