mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-16 17:17:35 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -31,7 +31,7 @@ class PersonAddressMoveEventSubscriber implements EventSubscriberInterface
|
||||
];
|
||||
}
|
||||
|
||||
public function resetPeriodLocation(PersonAddressMoveEvent $event)
|
||||
public function resetPeriodLocation(PersonAddressMoveEvent $event): void
|
||||
{
|
||||
if ($event->getPreviousAddress() !== $event->getNextAddress()
|
||||
&& null !== $event->getPreviousAddress()
|
||||
|
||||
@@ -25,7 +25,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
public function __construct(private readonly Security $security, private readonly TranslatorInterface $translator, private readonly \Twig\Environment $engine, private readonly NotificationPersisterInterface $notificationPersister) {}
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
public static function getSubscribedEvents(): array
|
||||
{
|
||||
return [
|
||||
'workflow.accompanying_period_lifecycle.entered' => [
|
||||
@@ -56,7 +56,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
}
|
||||
}
|
||||
|
||||
private function generateNotificationToUser(AccompanyingPeriod $period)
|
||||
private function generateNotificationToUser(AccompanyingPeriod $period): void
|
||||
{
|
||||
$notification = new Notification();
|
||||
|
||||
@@ -78,7 +78,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
|
||||
$this->notificationPersister->persist($notification);
|
||||
}
|
||||
|
||||
private function onPeriodConfirmed(AccompanyingPeriod $period)
|
||||
private function onPeriodConfirmed(AccompanyingPeriod $period): void
|
||||
{
|
||||
if ($period->getUser() instanceof User
|
||||
&& $period->getUser() !== $this->security->getUser()) {
|
||||
|
||||
@@ -27,22 +27,22 @@ use Doctrine\ORM\Event\PreUpdateEventArgs;
|
||||
*/
|
||||
final class AccompanyingPeriodSocialIssueConsistencyEntityListener
|
||||
{
|
||||
public function prePersist(AccompanyingPeriodLinkedWithSocialIssuesEntityInterface $entity, PrePersistEventArgs $eventArgs)
|
||||
public function prePersist(AccompanyingPeriodLinkedWithSocialIssuesEntityInterface $entity, PrePersistEventArgs $eventArgs): void
|
||||
{
|
||||
$this->ensureConsistencyEntity($entity);
|
||||
}
|
||||
|
||||
public function prePersistAccompanyingPeriod(AccompanyingPeriod $period, PrePersistEventArgs $eventArgs)
|
||||
public function prePersistAccompanyingPeriod(AccompanyingPeriod $period, PrePersistEventArgs $eventArgs): void
|
||||
{
|
||||
$this->ensureConsistencyAccompanyingPeriod($period);
|
||||
}
|
||||
|
||||
public function preUpdate(AccompanyingPeriodLinkedWithSocialIssuesEntityInterface $entity, PreUpdateEventArgs $eventArgs)
|
||||
public function preUpdate(AccompanyingPeriodLinkedWithSocialIssuesEntityInterface $entity, PreUpdateEventArgs $eventArgs): void
|
||||
{
|
||||
$this->ensureConsistencyEntity($entity);
|
||||
}
|
||||
|
||||
public function preUpdateAccompanyingPeriod(AccompanyingPeriod $period, PreUpdateEventArgs $eventArgs)
|
||||
public function preUpdateAccompanyingPeriod(AccompanyingPeriod $period, PreUpdateEventArgs $eventArgs): void
|
||||
{
|
||||
$this->ensureConsistencyAccompanyingPeriod($period);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class EntityPersonCRUDController extends CRUDController
|
||||
*
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
protected function buildQueryEntities(string $action, Request $request)
|
||||
protected function buildQueryEntities(string $action, Request $request): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$qb = parent::buildQueryEntities($action, $request);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class ChillPersonBundle extends Bundle
|
||||
{
|
||||
public function build(ContainerBuilder $container)
|
||||
public function build(ContainerBuilder $container): void
|
||||
{
|
||||
parent::build($container);
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:person:move')]
|
||||
final class ChillPersonMoveCommand extends Command
|
||||
{
|
||||
protected static $defaultDescription = 'Move all the associated entities on a "from" person to a "to" person and remove the old person';
|
||||
@@ -51,10 +52,9 @@ final class ChillPersonMoveCommand extends Command
|
||||
return $ctxt;
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
protected function configure(): void
|
||||
{
|
||||
$this
|
||||
->setName('chill:person:move')
|
||||
->addOption('from', 'f', InputOption::VALUE_REQUIRED, 'The person id to delete, all associated data will be moved before')
|
||||
->addOption('to', 't', InputOption::VALUE_REQUIRED, 'The person id which will received data')
|
||||
->addOption('dump-sql', null, InputOption::VALUE_NONE, 'dump sql to stdout')
|
||||
@@ -103,7 +103,7 @@ final class ChillPersonMoveCommand extends Command
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
||||
protected function interact(InputInterface $input, OutputInterface $output)
|
||||
protected function interact(InputInterface $input, OutputInterface $output): void
|
||||
{
|
||||
if (false === $input->hasOption('dump-sql') && false === $input->hasOption('force')) {
|
||||
$msg = 'You must use "--dump-sql" or "--force"';
|
||||
|
||||
@@ -19,6 +19,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:person:import-socialwork')]
|
||||
final class ImportSocialWorkMetadata extends Command
|
||||
{
|
||||
protected EntityManagerInterface $em;
|
||||
@@ -29,7 +30,7 @@ final class ImportSocialWorkMetadata extends Command
|
||||
parent::__construct('chill:person:import-socialwork');
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
protected function configure(): void
|
||||
{
|
||||
$description = 'Imports a structured table containing social issues, social actions, objectives, results and evaluations.';
|
||||
$help = 'File to csv format, no headers, semi-colon as delimiter, datas sorted by alphabetical order, column after column.'.PHP_EOL
|
||||
@@ -38,7 +39,6 @@ final class ImportSocialWorkMetadata extends Command
|
||||
.'See social_work_metadata.csv as example.'.PHP_EOL;
|
||||
|
||||
$this
|
||||
->setName('chill:person:import-socialwork')
|
||||
->addOption('filepath', 'f', InputOption::VALUE_REQUIRED, 'The file to import.')
|
||||
->addOption('language', 'l', InputOption::VALUE_OPTIONAL, 'The default language')
|
||||
->setHelp($help);
|
||||
|
||||
@@ -18,6 +18,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
#[\Symfony\Component\Console\Attribute\AsCommand]
|
||||
class RemoveOldDraftAccompanyingPeriodCommand extends Command
|
||||
{
|
||||
protected static $defaultDescription = 'Remove draft accompanying period which are still draft and unused';
|
||||
|
||||
@@ -131,7 +131,7 @@ final class AccompanyingCourseApiController extends ApiController
|
||||
/**
|
||||
* @ParamConverter("person", options={"id": "person_id"})
|
||||
*/
|
||||
public function getAccompanyingPeriodsByPerson(Person $person)
|
||||
public function getAccompanyingPeriodsByPerson(Person $person): \Symfony\Component\HttpFoundation\JsonResponse
|
||||
{
|
||||
$accompanyingPeriods = $person->getCurrentAccompanyingPeriods();
|
||||
$accompanyingPeriodsChecked = array_filter(
|
||||
@@ -142,7 +142,7 @@ final class AccompanyingCourseApiController extends ApiController
|
||||
return $this->json(\array_values($accompanyingPeriodsChecked), Response::HTTP_OK, [], ['groups' => ['read']]);
|
||||
}
|
||||
|
||||
public function participationApi($id, Request $request, $_format)
|
||||
public function participationApi($id, Request $request, $_format): \Symfony\Component\HttpFoundation\JsonResponse
|
||||
{
|
||||
/** @var AccompanyingPeriod $accompanyingPeriod */
|
||||
$accompanyingPeriod = $this->getEntity('participation', $id, $request);
|
||||
@@ -275,7 +275,7 @@ final class AccompanyingCourseApiController extends ApiController
|
||||
* @ParamConverter("accompanyingCourse", options={"id": "id"})
|
||||
*/
|
||||
#[Route(path: '/api/1.0/person/accompanying-course/{id}/confidential.json', name: 'chill_api_person_accompanying_period_confidential')]
|
||||
public function toggleConfidentialApi(AccompanyingPeriod $accompanyingCourse, mixed $id, Request $request)
|
||||
public function toggleConfidentialApi(AccompanyingPeriod $accompanyingCourse, mixed $id, Request $request): \Symfony\Component\HttpFoundation\JsonResponse
|
||||
{
|
||||
if ('POST' === $request->getMethod()) {
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::TOGGLE_CONFIDENTIAL, $accompanyingCourse);
|
||||
@@ -292,7 +292,7 @@ final class AccompanyingCourseApiController extends ApiController
|
||||
* @ParamConverter("accompanyingCourse", options={"id": "id"})
|
||||
*/
|
||||
#[Route(path: '/api/1.0/person/accompanying-course/{id}/intensity.json', name: 'chill_api_person_accompanying_period_intensity')]
|
||||
public function toggleIntensityApi(AccompanyingPeriod $accompanyingCourse, Request $request)
|
||||
public function toggleIntensityApi(AccompanyingPeriod $accompanyingCourse, Request $request): \Symfony\Component\HttpFoundation\JsonResponse
|
||||
{
|
||||
if ('POST' === $request->getMethod()) {
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::TOGGLE_INTENSITY, $accompanyingCourse);
|
||||
|
||||
@@ -98,7 +98,7 @@ final class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle
|
||||
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
|
||||
*/
|
||||
#[Route(path: '/{_locale}/parcours/{accompanying_period_id}/delete', name: 'chill_person_accompanying_course_delete')]
|
||||
public function deleteAction(Request $request, AccompanyingPeriod $accompanyingCourse)
|
||||
public function deleteAction(Request $request, AccompanyingPeriod $accompanyingCourse): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ final class AccompanyingCourseWorkController extends AbstractController
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$this->chillLogger->notice('An accompanying period work has been removed', [
|
||||
'by_user' => $this->getUser()->getUsername(),
|
||||
'by_user' => $this->getUser()->getUserIdentifier(),
|
||||
'work_id' => $work->getId(),
|
||||
'accompanying_period_id' => $work->getAccompanyingPeriod()->getId(),
|
||||
]);
|
||||
|
||||
@@ -20,25 +20,25 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
#[Route(path: '/{_locale}/admin/accompanying-course', name: 'chill_accompanying-course_admin_index')]
|
||||
public function indexAccompanyingCourseAdminAction()
|
||||
public function indexAccompanyingCourseAdminAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillPerson/Admin/indexAccompanyingCourse.html.twig');
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/household', name: 'chill_household_admin_index')]
|
||||
public function indexHouseholdAdminAction()
|
||||
public function indexHouseholdAdminAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillPerson/Admin/indexHousehold.html.twig');
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/person', name: 'chill_person_admin_index')]
|
||||
public function indexPersonAdminAction()
|
||||
public function indexPersonAdminAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillPerson/Admin/indexPerson.html.twig');
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/social-work', name: 'chill_social-work_admin_index')]
|
||||
public function indexSocialWorkAdminAction()
|
||||
public function indexSocialWorkAdminAction(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('@ChillPerson/Admin/indexSocialWork.html.twig');
|
||||
}
|
||||
@@ -47,7 +47,7 @@ class AdminController extends AbstractController
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
*/
|
||||
#[Route(path: '/{_locale}/admin/person_redirect_to_main', name: 'chill_person_admin_redirect_to_admin_index', options: [null])]
|
||||
public function redirectToAdminIndexAction()
|
||||
public function redirectToAdminIndexAction(): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
return $this->redirectToRoute('chill_main_admin_central');
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class HouseholdApiController extends ApiController
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/api/1.0/person/address/suggest/by-household/{household_id}.{_format}', name: 'chill_person_address_suggest_by_household', requirements: ['_format' => 'json'])]
|
||||
public function suggestAddressByHousehold(Household $household, string $_format)
|
||||
public function suggestAddressByHousehold(Household $household, string $_format): \Symfony\Component\HttpFoundation\JsonResponse
|
||||
{
|
||||
// TODO add acl
|
||||
|
||||
@@ -149,7 +149,7 @@ class HouseholdApiController extends ApiController
|
||||
*
|
||||
* @ParamConverter("person", options={"id": "person_id"})
|
||||
*/
|
||||
public function suggestHouseholdByAccompanyingPeriodParticipationApi(Person $person, string $_format)
|
||||
public function suggestHouseholdByAccompanyingPeriodParticipationApi(Person $person, string $_format): \Symfony\Component\HttpFoundation\JsonResponse
|
||||
{
|
||||
// TODO add acl
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class HouseholdController extends AbstractController
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/{household_id}/accompanying-period', name: 'chill_person_household_accompanying_period', methods: ['GET', 'HEAD'])]
|
||||
public function accompanyingPeriod(Request $request, Household $household)
|
||||
public function accompanyingPeriod(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$currentMembers = $household->getCurrentPersons();
|
||||
$accompanyingPeriods = [];
|
||||
@@ -88,7 +88,7 @@ class HouseholdController extends AbstractController
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/{household_id}/address/edit', name: 'chill_person_household_address_edit', methods: ['GET', 'HEAD', 'POST'])]
|
||||
public function addressEdit(Request $request, Household $household)
|
||||
public function addressEdit(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
// TODO ACL
|
||||
|
||||
@@ -110,7 +110,7 @@ class HouseholdController extends AbstractController
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/{household_id}/addresses', name: 'chill_person_household_addresses', methods: ['GET', 'HEAD'])]
|
||||
public function addresses(Request $request, Household $household)
|
||||
public function addresses(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
// TODO ACL
|
||||
|
||||
@@ -136,7 +136,7 @@ class HouseholdController extends AbstractController
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/{household_id}/address/move', name: 'chill_person_household_address_move', methods: ['GET', 'HEAD', 'POST'])]
|
||||
public function addressMove(Request $request, Household $household)
|
||||
public function addressMove(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
// TODO ACL
|
||||
|
||||
@@ -152,7 +152,7 @@ class HouseholdController extends AbstractController
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/{household_id}/address/edit_valid_from', name: 'chill_person_household_address_valid_from_edit', methods: ['GET', 'HEAD', 'POST'])]
|
||||
public function addressValidFromEdit(Request $request, Household $household)
|
||||
public function addressValidFromEdit(Request $request, Household $household): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted(HouseholdVoter::EDIT, $household);
|
||||
|
||||
@@ -204,7 +204,7 @@ class HouseholdController extends AbstractController
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/{household_id}/members/metadata/edit', name: 'chill_person_household_members_metadata_edit', methods: ['GET', 'POST'])]
|
||||
public function editHouseholdMetadata(Request $request, Household $household)
|
||||
public function editHouseholdMetadata(Request $request, Household $household): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
// TODO ACL
|
||||
$form = $this->createMetadataForm($household);
|
||||
@@ -237,7 +237,7 @@ class HouseholdController extends AbstractController
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/{household_id}/relationship', name: 'chill_person_household_relationship', methods: ['GET', 'HEAD'])]
|
||||
public function showRelationship(Request $request, Household $household)
|
||||
public function showRelationship(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$jsonString = $this->serializer->serialize(
|
||||
$household->getCurrentPersons(),
|
||||
@@ -258,7 +258,7 @@ class HouseholdController extends AbstractController
|
||||
* @ParamConverter("household", options={"id": "household_id"})
|
||||
*/
|
||||
#[Route(path: '/{household_id}/summary', name: 'chill_person_household_summary', methods: ['GET', 'HEAD'])]
|
||||
public function summary(Request $request, Household $household)
|
||||
public function summary(Request $request, Household $household): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
// TODO ACL
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class HouseholdMemberController extends ApiController
|
||||
* to leave household without joining another
|
||||
*/
|
||||
#[Route(path: '/{_locale}/person/household/members/editor', name: 'chill_person_household_members_editor')]
|
||||
public function editor(Request $request)
|
||||
public function editor(Request $request): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$ids = $request->query->all('persons');
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class PersonAddressController extends AbstractController
|
||||
public function __construct(private readonly ValidatorInterface $validator, private readonly TranslatorInterface $translator, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/create', name: 'chill_person_address_create', methods: ['POST'])]
|
||||
public function createAction(mixed $person_id, Request $request)
|
||||
public function createAction(mixed $person_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->managerRegistry->getManager()
|
||||
->getRepository(Person::class)
|
||||
@@ -87,7 +87,7 @@ class PersonAddressController extends AbstractController
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/{address_id}/edit', name: 'chill_person_address_edit')]
|
||||
public function editAction(mixed $person_id, mixed $address_id)
|
||||
public function editAction(mixed $person_id, mixed $address_id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->managerRegistry->getManager()
|
||||
->getRepository(Person::class)
|
||||
@@ -115,7 +115,7 @@ class PersonAddressController extends AbstractController
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/list', name: 'chill_person_address_list')]
|
||||
public function listAction(mixed $person_id)
|
||||
public function listAction(mixed $person_id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->managerRegistry->getManager()
|
||||
->getRepository(Person::class)
|
||||
@@ -137,7 +137,7 @@ class PersonAddressController extends AbstractController
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/new', name: 'chill_person_address_new')]
|
||||
public function newAction(mixed $person_id)
|
||||
public function newAction(mixed $person_id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->managerRegistry->getManager()
|
||||
->getRepository(Person::class)
|
||||
@@ -164,7 +164,7 @@ class PersonAddressController extends AbstractController
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/address/{address_id}/update', name: 'chill_person_address_update')]
|
||||
public function updateAction(mixed $person_id, mixed $address_id, Request $request)
|
||||
public function updateAction(mixed $person_id, mixed $address_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->managerRegistry->getManager()
|
||||
->getRepository(Person::class)
|
||||
|
||||
@@ -50,7 +50,7 @@ final class PersonController extends AbstractController
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{_locale}/person/{person_id}/general/edit', name: 'chill_person_general_edit')]
|
||||
public function editAction(int $person_id, Request $request)
|
||||
public function editAction(int $person_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->_getPerson($person_id);
|
||||
|
||||
@@ -241,7 +241,7 @@ final class PersonController extends AbstractController
|
||||
}
|
||||
|
||||
#[Route(path: '/{_locale}/person/{person_id}/general', name: 'chill_person_view')]
|
||||
public function viewAction(int $person_id)
|
||||
public function viewAction(int $person_id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->_getPerson($person_id);
|
||||
|
||||
@@ -273,7 +273,7 @@ final class PersonController extends AbstractController
|
||||
*
|
||||
* @return Person
|
||||
*/
|
||||
private function _getPerson(int $id)
|
||||
private function _getPerson(int $id): ?\Chill\PersonBundle\Entity\Person
|
||||
{
|
||||
return $this->personRepository->find($id);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
|
||||
) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person1_id}/duplicate/{person2_id}/confirm', name: 'chill_person_duplicate_confirm')]
|
||||
public function confirmAction(mixed $person1_id, mixed $person2_id, Request $request)
|
||||
public function confirmAction(mixed $person1_id, mixed $person2_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
if ($person1_id === $person2_id) {
|
||||
throw new \InvalidArgumentException('Can not merge same person');
|
||||
@@ -105,7 +105,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/find-manually', name: 'chill_person_find_manually_duplicate')]
|
||||
public function findManuallyDuplicateAction(mixed $person_id, Request $request)
|
||||
public function findManuallyDuplicateAction(mixed $person_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->_getPerson($person_id);
|
||||
|
||||
@@ -161,7 +161,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person1_id}/duplicate/{person2_id}/not-duplicate', name: 'chill_person_duplicate_not_duplicate')]
|
||||
public function notDuplicateAction(mixed $person1_id, mixed $person2_id)
|
||||
public function notDuplicateAction(mixed $person1_id, mixed $person2_id): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
|
||||
@@ -194,7 +194,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person1_id}/duplicate/{person2_id}/remove-not-duplicate', name: 'chill_person_remove_duplicate_not_duplicate')]
|
||||
public function removeNotDuplicateAction(mixed $person1_id, mixed $person2_id)
|
||||
public function removeNotDuplicateAction(mixed $person1_id, mixed $person2_id): \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
{
|
||||
[$person1, $person2] = $this->_getPersonsByPriority($person1_id, $person2_id);
|
||||
|
||||
@@ -216,7 +216,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/duplicate/view', name: 'chill_person_duplicate_view')]
|
||||
public function viewAction(mixed $person_id, PersonNotDuplicateRepository $personNotDuplicateRepository)
|
||||
public function viewAction(mixed $person_id, PersonNotDuplicateRepository $personNotDuplicateRepository): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->_getPerson($person_id);
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ final class PersonResourceController extends AbstractController
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/resources/list', name: 'chill_person_resource_list')]
|
||||
public function listAction(Request $request, mixed $person_id)
|
||||
public function listAction(Request $request, mixed $person_id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$personOwner = $this->personRepository->find($person_id);
|
||||
$this->denyAccessUnlessGranted(PersonVoter::SEE, $personOwner);
|
||||
@@ -127,7 +127,7 @@ final class PersonResourceController extends AbstractController
|
||||
}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/resources/new', name: 'chill_person_resource_new')]
|
||||
public function newAction(Request $request, mixed $person_id)
|
||||
public function newAction(Request $request, mixed $person_id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$personOwner = $this->personRepository->find($person_id);
|
||||
$personResource = new PersonResource();
|
||||
|
||||
@@ -25,7 +25,7 @@ class RelationshipApiController extends ApiController
|
||||
/**
|
||||
* @ParamConverter("person", options={"id": "person_id"})
|
||||
*/
|
||||
public function getRelationshipsByPerson(Person $person)
|
||||
public function getRelationshipsByPerson(Person $person): \Symfony\Component\HttpFoundation\JsonResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted(PersonVoter::SEE, $person);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ final class SocialWorkSocialActionApiController extends ApiController
|
||||
private readonly ClockInterface $clock,
|
||||
) {}
|
||||
|
||||
public function listBySocialIssueApi($id, Request $request)
|
||||
public function listBySocialIssueApi($id, Request $request): \Symfony\Component\HttpFoundation\JsonResponse
|
||||
{
|
||||
$socialIssue = $this->socialIssueRepository
|
||||
->find($id);
|
||||
|
||||
@@ -25,7 +25,7 @@ class TimelinePersonController extends AbstractController
|
||||
public function __construct(protected EventDispatcherInterface $eventDispatcher, protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
||||
|
||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/person/{person_id}/timeline', name: 'chill_person_timeline')]
|
||||
public function personAction(Request $request, mixed $person_id)
|
||||
public function personAction(Request $request, mixed $person_id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
$person = $this->managerRegistry
|
||||
->getRepository(Person::class)
|
||||
|
||||
@@ -52,17 +52,17 @@ class LoadCustomFields extends AbstractFixture implements OrderedFixtureInterfac
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
private function createCustomFieldChoice()
|
||||
private function createCustomFieldChoice(): \Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice
|
||||
{
|
||||
return $this->customFieldChoice;
|
||||
}
|
||||
|
||||
private function createCustomFieldText()
|
||||
private function createCustomFieldText(): \Chill\CustomFieldsBundle\CustomFields\CustomFieldText
|
||||
{
|
||||
return $this->customFieldText;
|
||||
}
|
||||
|
||||
private function loadData(ObjectManager $manager)
|
||||
private function loadData(ObjectManager $manager): void
|
||||
{
|
||||
$personIds = $this->entityManager
|
||||
->createQuery('SELECT person.id FROM ChillPersonBundle:Person person')
|
||||
@@ -91,7 +91,7 @@ class LoadCustomFields extends AbstractFixture implements OrderedFixtureInterfac
|
||||
}
|
||||
}
|
||||
|
||||
private function loadFields(ObjectManager $manager)
|
||||
private function loadFields(ObjectManager $manager): void
|
||||
{
|
||||
$cfGroup = (new CustomFieldsGroup())
|
||||
->setEntity(Person::class)
|
||||
|
||||
@@ -70,7 +70,7 @@ class LoadHousehold extends Fixture implements DependentFixtureInterface
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
private function addAddressToHousehold(Household $household, \DateTimeImmutable $date, ObjectManager $manager)
|
||||
private function addAddressToHousehold(Household $household, \DateTimeImmutable $date, ObjectManager $manager): void
|
||||
{
|
||||
if (\random_int(0, 10) > 8) {
|
||||
// 20% of household without address
|
||||
@@ -113,7 +113,7 @@ class LoadHousehold extends Fixture implements DependentFixtureInterface
|
||||
return $objectSet->getObjects()['address1'];
|
||||
}
|
||||
|
||||
private function generateHousehold(ObjectManager $manager, \DateTimeImmutable $startDate)
|
||||
private function generateHousehold(ObjectManager $manager, \DateTimeImmutable $startDate): void
|
||||
{
|
||||
for ($i = 0; self::NUMBER_OF_HOUSEHOLD > $i; ++$i) {
|
||||
$household = new Household();
|
||||
@@ -179,7 +179,7 @@ class LoadHousehold extends Fixture implements DependentFixtureInterface
|
||||
return $persons;
|
||||
}
|
||||
|
||||
private function preparePersonIds()
|
||||
private function preparePersonIds(): void
|
||||
{
|
||||
$centers = LoadCenters::$centers;
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ class LoadPeople extends AbstractFixture implements ContainerAwareInterface, Ord
|
||||
$manager->flush();
|
||||
}
|
||||
|
||||
public function loadExpectedPeople(ObjectManager $manager)
|
||||
public function loadExpectedPeople(ObjectManager $manager): void
|
||||
{
|
||||
echo "loading expected people...\n";
|
||||
|
||||
@@ -343,7 +343,7 @@ class LoadPeople extends AbstractFixture implements ContainerAwareInterface, Ord
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
private function addAPerson(Person $person, ObjectManager $manager)
|
||||
private function addAPerson(Person $person, ObjectManager $manager): void
|
||||
{
|
||||
$accompanyingPeriod = new AccompanyingPeriod(
|
||||
(new \DateTime())
|
||||
|
||||
@@ -47,7 +47,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
public function load(array $configs, ContainerBuilder $container): void
|
||||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
@@ -117,7 +117,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
/**
|
||||
* @throws MissingBundleException
|
||||
*/
|
||||
public function prepend(ContainerBuilder $container)
|
||||
public function prepend(ContainerBuilder $container): void
|
||||
{
|
||||
$this->prependRoleHierarchy($container);
|
||||
$this->prependHomepageWidget($container);
|
||||
@@ -1112,7 +1112,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
/**
|
||||
* @throws MissingBundleException
|
||||
*/
|
||||
private function declarePersonAsCustomizable(ContainerBuilder $container)
|
||||
private function declarePersonAsCustomizable(ContainerBuilder $container): void
|
||||
{
|
||||
$bundles = $container->getParameter('kernel.bundles');
|
||||
|
||||
@@ -1129,7 +1129,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
);
|
||||
}
|
||||
|
||||
private function handleAccompanyingPeriodsFieldsParameters(ContainerBuilder $container, $config)
|
||||
private function handleAccompanyingPeriodsFieldsParameters(ContainerBuilder $container, $config): void
|
||||
{
|
||||
$container->setParameter('chill_person.accompanying_period_fields', $config);
|
||||
|
||||
@@ -1146,7 +1146,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
}
|
||||
}
|
||||
|
||||
private function handleHouseholdFieldsParameters(ContainerBuilder $container, $config)
|
||||
private function handleHouseholdFieldsParameters(ContainerBuilder $container, $config): void
|
||||
{
|
||||
$container->setParameter('chill_person.household_fields', $config);
|
||||
|
||||
@@ -1163,7 +1163,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
}
|
||||
}
|
||||
|
||||
private function handlePersonFieldsParameters(ContainerBuilder $container, $config)
|
||||
private function handlePersonFieldsParameters(ContainerBuilder $container, $config): void
|
||||
{
|
||||
if (\array_key_exists('enabled', $config)) {
|
||||
unset($config['enabled']);
|
||||
|
||||
@@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
*/
|
||||
class AccompanyingPeriodTimelineCompilerPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
public function process(ContainerBuilder $container): void
|
||||
{
|
||||
// remove services when accompanying period are hidden
|
||||
if ('hidden' !== $container->getParameter('chill_person.accompanying_period')) {
|
||||
|
||||
@@ -70,7 +70,7 @@ abstract class AddressPart extends FunctionNode
|
||||
);
|
||||
}
|
||||
|
||||
public function parse(Parser $parser)
|
||||
public function parse(Parser $parser): void
|
||||
{
|
||||
$a = $parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
|
||||
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
|
||||
|
||||
@@ -631,7 +631,7 @@ class AccompanyingPeriod implements
|
||||
return $this->getOpenParticipations();
|
||||
}
|
||||
|
||||
public function getGroupSequence()
|
||||
public function getGroupSequence(): \Symfony\Component\Validator\Constraints\GroupSequence|array
|
||||
{
|
||||
if (self::STEP_DRAFT === $this->getStep()) {
|
||||
return [[self::STEP_DRAFT]];
|
||||
@@ -989,7 +989,7 @@ class AccompanyingPeriod implements
|
||||
/**
|
||||
* Validation functions.
|
||||
*/
|
||||
public function isDateConsistent(ExecutionContextInterface $context)
|
||||
public function isDateConsistent(ExecutionContextInterface $context): void
|
||||
{
|
||||
if ($this->isOpen()) {
|
||||
return;
|
||||
@@ -1048,7 +1048,7 @@ class AccompanyingPeriod implements
|
||||
/**
|
||||
* Remove Participation.
|
||||
*/
|
||||
public function removeParticipation(AccompanyingPeriodParticipation $participation)
|
||||
public function removeParticipation(AccompanyingPeriodParticipation $participation): void
|
||||
{
|
||||
$participation->setAccompanyingPeriod(null);
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
|
||||
/**
|
||||
* @return Collection<AccompanyingPeriodWorkEvaluationDocument>
|
||||
*/
|
||||
public function getDocuments()
|
||||
public function getDocuments(): \Doctrine\Common\Collections\Collection
|
||||
{
|
||||
return $this->documents;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class ClosingMotive
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ class ClosingMotive
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getName()
|
||||
public function getName(): array
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ class ClosingMotive
|
||||
/**
|
||||
* @return ClosingMotive
|
||||
*/
|
||||
public function getParent()
|
||||
public function getParent(): ?\Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive
|
||||
{
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ class AccompanyingPeriodParticipation
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function checkSameStartEnd()
|
||||
private function checkSameStartEnd(): void
|
||||
{
|
||||
if ($this->endDate === $this->startDate) {
|
||||
$this->accompanyingPeriod->removeParticipation($this);
|
||||
|
||||
@@ -530,7 +530,7 @@ class Household implements HasCentersInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function removeAddress(Address $address)
|
||||
public function removeAddress(Address $address): void
|
||||
{
|
||||
$this->addresses->removeElement($address);
|
||||
}
|
||||
@@ -572,7 +572,7 @@ class Household implements HasCentersInterface
|
||||
* Used on household creation.
|
||||
*/
|
||||
#[Serializer\Groups(['create'])]
|
||||
public function setForceAddress(Address $address)
|
||||
public function setForceAddress(Address $address): void
|
||||
{
|
||||
$address->setValidFrom(new \DateTime('today'));
|
||||
$this->addAddress($address);
|
||||
|
||||
@@ -55,8 +55,8 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
*/
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['person' => Person::class])]
|
||||
#[ORM\Entity]
|
||||
#[ORM\Index(name: 'person_names', columns: ['firstName', 'lastName'])] // ,
|
||||
#[ORM\Index(name: 'person_birthdate', columns: ['birthdate'])] // @ORM\HasLifecycleCallbacks
|
||||
#[ORM\Index(columns: ['firstName', 'lastName'], name: 'person_names')] // ,
|
||||
#[ORM\Index(columns: ['birthdate'], name: 'person_birthdate')] // @ORM\HasLifecycleCallbacks
|
||||
#[ORM\Table(name: 'chill_person_person')]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
#[PersonHasCenter]
|
||||
@@ -85,7 +85,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @var Collection<int, AccompanyingPeriodParticipation>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: AccompanyingPeriodParticipation::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'])]
|
||||
#[ORM\OneToMany(mappedBy: 'person', targetEntity: AccompanyingPeriodParticipation::class, cascade: ['persist', 'remove', 'merge', 'detach'])]
|
||||
#[ORM\OrderBy(['startDate' => Criteria::DESC])]
|
||||
private Collection $accompanyingPeriodParticipations;
|
||||
|
||||
@@ -94,7 +94,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @var Collection<int, AccompanyingPeriod>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: AccompanyingPeriod::class, mappedBy: 'requestorPerson')]
|
||||
#[ORM\OneToMany(mappedBy: 'requestorPerson', targetEntity: AccompanyingPeriod::class)]
|
||||
private Collection $accompanyingPeriodRequested;
|
||||
|
||||
/**
|
||||
@@ -110,7 +110,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
/**
|
||||
* @var Collection<int, PersonAltName>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: PersonAltName::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
|
||||
#[ORM\OneToMany(mappedBy: 'person', targetEntity: PersonAltName::class, cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
|
||||
private Collection $altNames;
|
||||
|
||||
/**
|
||||
@@ -123,13 +123,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
/**
|
||||
* @var Collection<int, Charge>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: Charge::class, mappedBy: 'person')]
|
||||
#[ORM\OneToMany(mappedBy: 'person', targetEntity: Charge::class)]
|
||||
private Collection $budgetCharges;
|
||||
|
||||
/**
|
||||
* @var Collection<int, \Chill\BudgetBundle\Entity\Resource>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: Resource::class, mappedBy: 'person')]
|
||||
#[ORM\OneToMany(mappedBy: 'person', targetEntity: Resource::class)]
|
||||
private Collection $budgetResources;
|
||||
|
||||
/**
|
||||
@@ -1144,7 +1144,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getLastAddress(?\DateTime $from = null)
|
||||
public function getLastAddress(?\DateTime $from = null): ?\Chill\MainBundle\Entity\Address
|
||||
{
|
||||
return $this->getCurrentHouseholdAddress(
|
||||
null !== $from ? \DateTimeImmutable::createFromMutable($from) : null
|
||||
@@ -1257,7 +1257,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
*
|
||||
* @return Collection<Language>
|
||||
*/
|
||||
public function getSpokenLanguages()
|
||||
public function getSpokenLanguages(): \Doctrine\Common\Collections\Collection
|
||||
{
|
||||
return $this->spokenLanguages;
|
||||
}
|
||||
@@ -1303,7 +1303,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* This method add violation errors.
|
||||
*/
|
||||
#[Assert\Callback(groups: ['accompanying_period_consistent'])]
|
||||
public function isAccompanyingPeriodValid(ExecutionContextInterface $context)
|
||||
public function isAccompanyingPeriodValid(ExecutionContextInterface $context): void
|
||||
{
|
||||
$r = $this->checkAccompanyingPeriodsAreNotCollapsing();
|
||||
|
||||
@@ -1329,7 +1329,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* This method add violation errors.
|
||||
*/
|
||||
#[Assert\Callback(groups: ['addresses_consistent'])]
|
||||
public function isAddressesValid(ExecutionContextInterface $context)
|
||||
public function isAddressesValid(ExecutionContextInterface $context): void
|
||||
{
|
||||
if ($this->hasTwoAdressWithSameValidFromDate()) {
|
||||
$context
|
||||
@@ -1387,7 +1387,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
}
|
||||
}
|
||||
|
||||
public function removeAddress(Address $address)
|
||||
public function removeAddress(Address $address): void
|
||||
{
|
||||
$this->addresses->removeElement($address);
|
||||
}
|
||||
|
||||
@@ -88,9 +88,7 @@ class AbstractPersonResource implements TrackCreationInterface, TrackUpdateInter
|
||||
return $this->personOwner;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
public function getResourceKind(): string
|
||||
{
|
||||
if ($this->getPerson() instanceof Person) {
|
||||
@@ -180,9 +178,7 @@ class AbstractPersonResource implements TrackCreationInterface, TrackUpdateInter
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Assert\Callback
|
||||
*/
|
||||
#[Assert\Callback]
|
||||
public function validate(ExecutionContextInterface $context, mixed $payload): void
|
||||
{
|
||||
if (null === $this->person && null === $this->thirdParty && (null === $this->freeText || '' === $this->freeText)) {
|
||||
|
||||
@@ -42,7 +42,7 @@ class PersonAltName
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class PersonAltName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getKey()
|
||||
public function getKey(): string
|
||||
{
|
||||
return $this->key;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ class PersonAltName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLabel()
|
||||
public function getLabel(): string
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
@@ -46,52 +46,52 @@ class PersonNotDuplicate
|
||||
$this->date = new \DateTime();
|
||||
}
|
||||
|
||||
public function getDate()
|
||||
public function getDate(): \DateTime
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function getId()
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getPerson1()
|
||||
public function getPerson1(): ?\Chill\PersonBundle\Entity\Person
|
||||
{
|
||||
return $this->person1;
|
||||
}
|
||||
|
||||
public function getPerson2()
|
||||
public function getPerson2(): ?\Chill\PersonBundle\Entity\Person
|
||||
{
|
||||
return $this->person2;
|
||||
}
|
||||
|
||||
public function getUser()
|
||||
public function getUser(): ?\Chill\MainBundle\Entity\User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
public function setDate(\DateTime $date)
|
||||
public function setDate(\DateTime $date): void
|
||||
{
|
||||
$this->date = $date;
|
||||
}
|
||||
|
||||
public function setId(?int $id)
|
||||
public function setId(?int $id): void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
public function setPerson1(Person $person1)
|
||||
public function setPerson1(Person $person1): void
|
||||
{
|
||||
$this->person1 = $person1;
|
||||
}
|
||||
|
||||
public function setPerson2(Person $person2)
|
||||
public function setPerson2(Person $person2): void
|
||||
{
|
||||
$this->person2 = $person2;
|
||||
}
|
||||
|
||||
public function setUser(User $user)
|
||||
public function setUser(User $user): void
|
||||
{
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use Chill\PersonBundle\Entity\PersonAltName;
|
||||
|
||||
class PersonEventListener
|
||||
{
|
||||
public function prePersistAltName(PersonAltName $altname)
|
||||
public function prePersistAltName(PersonAltName $altname): void
|
||||
{
|
||||
$altnameCaps = mb_strtoupper($altname->getLabel(), 'UTF-8');
|
||||
$altname->setLabel($altnameCaps);
|
||||
|
||||
@@ -27,7 +27,7 @@ class AdministrativeLocationAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('acploc', $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin('acp.administrativeLocation', 'acploc');
|
||||
@@ -42,7 +42,7 @@ class AdministrativeLocationAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ final readonly class ClosingDateAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class ClosingMotiveAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('IDENTITY(acp.closingMotive) AS closingmotive_aggregator');
|
||||
$qb->addGroupBy('closingmotive_aggregator');
|
||||
@@ -38,7 +38,7 @@ class ClosingMotiveAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class ConfidentialAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('acp.confidential AS confidential_aggregator');
|
||||
$qb->addGroupBy('confidential_aggregator');
|
||||
@@ -37,7 +37,7 @@ class ConfidentialAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ final readonly class DurationAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
match ($data['precision']) {
|
||||
'day' => $qb->addSelect('(COALESCE(acp.closingDate, :now) - acp.openingDate) AS duration_aggregator'),
|
||||
@@ -54,7 +54,7 @@ final readonly class DurationAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('precision', ChoiceType::class, [
|
||||
'choices' => array_combine(self::CHOICES, self::CHOICES),
|
||||
|
||||
@@ -26,7 +26,7 @@ class EmergencyAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('acp.emergency AS emergency_aggregator');
|
||||
$qb->addGroupBy('emergency_aggregator');
|
||||
@@ -37,7 +37,7 @@ class EmergencyAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class EvaluationAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('acpw', $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin('acp.works', 'acpw');
|
||||
@@ -46,7 +46,7 @@ final readonly class EvaluationAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->leftJoin('acp.locationHistories', 'acp_geog_agg_location_history');
|
||||
|
||||
@@ -105,7 +105,7 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('date_calc', PickRollingDateType::class, [
|
||||
|
||||
@@ -26,7 +26,7 @@ class IntensityAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('acp.intensity AS intensity_aggregator');
|
||||
$qb->addGroupBy('intensity_aggregator');
|
||||
@@ -37,7 +37,7 @@ class IntensityAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -72,7 +72,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder): void {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ final readonly class OpeningDateAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ final readonly class OriginAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('acporigin', $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin('acp.origin', 'acporigin');
|
||||
@@ -51,7 +51,7 @@ final readonly class OriginAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ final readonly class PersonParticipatingAggregator implements AggregatorInterfac
|
||||
private LabelPersonHelper $labelPersonHelper,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// nothing to do here
|
||||
}
|
||||
@@ -58,7 +58,7 @@ final readonly class PersonParticipatingAggregator implements AggregatorInterfac
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$k = self::KEY;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface, DataTran
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb
|
||||
->addSelect('IDENTITY('.self::A.'.user) AS referrer_aggregator')
|
||||
@@ -66,7 +66,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface, DataTran
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('start_date', PickRollingDateType::class, [
|
||||
|
||||
@@ -39,7 +39,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTrans
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -76,7 +76,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTrans
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('start_date', PickRollingDateType::class, [
|
||||
|
||||
@@ -26,7 +26,7 @@ final readonly class RequestorAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('acppart', $qb->getAllAliases(), true)) {
|
||||
$qb->join('acp.participations', 'acppart');
|
||||
@@ -58,7 +58,7 @@ final readonly class RequestorAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('acpscope', $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin('acp.scopes', 'acpscope');
|
||||
@@ -42,7 +42,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -72,7 +72,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder): void {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class SocialActionAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('acpw', $qb->getAllAliases(), true)) {
|
||||
// here, we will only see accompanying period linked with a socialAction
|
||||
@@ -43,7 +43,7 @@ final readonly class SocialActionAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class SocialIssueAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('acpsocialissue', $qb->getAllAliases(), true)) {
|
||||
// we will see accompanying period linked with social issues
|
||||
@@ -43,7 +43,7 @@ final readonly class SocialIssueAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ final readonly class StepAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array(self::A, $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin('acp.stepHistories', self::A);
|
||||
@@ -63,7 +63,7 @@ final readonly class StepAggregator implements AggregatorInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('on_date', PickRollingDateType::class, []);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ final readonly class UserJobAggregator implements AggregatorInterface, DataTrans
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -76,7 +76,7 @@ final readonly class UserJobAggregator implements AggregatorInterface, DataTrans
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('start_date', PickRollingDateType::class, [
|
||||
|
||||
@@ -29,7 +29,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac
|
||||
private UserRepositoryInterface $userRepository,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// nothing to add here
|
||||
}
|
||||
@@ -73,7 +73,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!in_array('acpinfo', $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin(
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class ByClosingMotiveAggregator implements AggregatorInterface
|
||||
private ClosingMotiveRender $closingMotiveRender,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// nothing to add here
|
||||
}
|
||||
@@ -69,7 +69,7 @@ final readonly class ByClosingMotiveAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb
|
||||
->addSelect('IDENTITY(acpstephistory.closingMotive) AS '.self::KEY)
|
||||
|
||||
@@ -26,7 +26,7 @@ final readonly class ByDateAggregator implements AggregatorInterface
|
||||
{
|
||||
private const KEY = 'acpstephistory_by_date_agg';
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('frequency', ChoiceType::class, [
|
||||
'choices' => array_combine(
|
||||
@@ -74,7 +74,7 @@ final readonly class ByDateAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::KEY;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ final readonly class ByStepAggregator implements AggregatorInterface
|
||||
private TranslatorInterface $translator,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// nothing in this form
|
||||
}
|
||||
@@ -71,7 +71,7 @@ final readonly class ByStepAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb
|
||||
->addSelect('acpstephistory.step AS '.self::KEY)
|
||||
|
||||
@@ -32,7 +32,7 @@ final class ByEndDateAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$fmt = match ($data['frequency']) {
|
||||
'week' => 'YYYY-IW',
|
||||
@@ -51,7 +51,7 @@ final class ByEndDateAggregator implements AggregatorInterface
|
||||
return Declarations::EVAL_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('frequency', ChoiceType::class, [
|
||||
'choices' => self::CHOICES,
|
||||
|
||||
@@ -32,7 +32,7 @@ final class ByMaxDateAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$fmt = match ($data['frequency']) {
|
||||
'week' => 'YYYY-IW',
|
||||
@@ -51,7 +51,7 @@ final class ByMaxDateAggregator implements AggregatorInterface
|
||||
return Declarations::EVAL_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('frequency', ChoiceType::class, [
|
||||
'choices' => self::CHOICES,
|
||||
|
||||
@@ -32,7 +32,7 @@ final class ByStartDateAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$fmt = match ($data['frequency']) {
|
||||
'week' => 'YYYY-IW',
|
||||
@@ -51,7 +51,7 @@ final class ByStartDateAggregator implements AggregatorInterface
|
||||
return Declarations::EVAL_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('frequency', ChoiceType::class, [
|
||||
'choices' => self::CHOICES,
|
||||
|
||||
@@ -27,7 +27,7 @@ class EvaluationTypeAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('IDENTITY(workeval.evaluation) AS eval_evaluationtype_aggregator');
|
||||
$qb->addGroupBy('eval_evaluationtype_aggregator');
|
||||
@@ -38,7 +38,7 @@ class EvaluationTypeAggregator implements AggregatorInterface
|
||||
return Declarations::EVAL_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class HavingEndDateAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb
|
||||
->addSelect('CASE WHEN workeval.endDate IS NULL THEN true ELSE false END AS eval_enddate_aggregator')
|
||||
@@ -38,7 +38,7 @@ class HavingEndDateAggregator implements AggregatorInterface
|
||||
return Declarations::EVAL_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// No form needed
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class ChildrenNumberAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('composition_children', $qb->getAllAliases(), true)) {
|
||||
$clause = $qb->expr()->andX(
|
||||
@@ -58,7 +58,7 @@ class ChildrenNumberAggregator implements AggregatorInterface
|
||||
return Declarations::HOUSEHOLD_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('on_date', PickRollingDateType::class, []);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class CompositionAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('composition_type', $qb->getAllAliases(), true)) {
|
||||
$clause = $qb->expr()->andX(
|
||||
@@ -60,7 +60,7 @@ class CompositionAggregator implements AggregatorInterface
|
||||
return Declarations::HOUSEHOLD_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('on_date', PickRollingDateType::class, []);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class AdministrativeStatusAggregator implements AggregatorInterfa
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->leftJoin('person.administrativeStatus', 'admin_status');
|
||||
$qb->addSelect('admin_status.id as administrative_status_aggregator');
|
||||
@@ -40,7 +40,7 @@ final readonly class AdministrativeStatusAggregator implements AggregatorInterfa
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder): void {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->addSelect('DATE_DIFF(:date_age_calculation, person.birthdate)/365 as person_age');
|
||||
$qb->setParameter('date_age_calculation', $this->rollingDateConverter->convert($data['date_age_calculation']));
|
||||
@@ -43,7 +43,7 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement
|
||||
return 'person';
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('date_age_calculation', PickRollingDateType::class, [
|
||||
'label' => 'Calculate age in relation to this date',
|
||||
@@ -78,7 +78,7 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement
|
||||
return 'Aggregate by age';
|
||||
}
|
||||
|
||||
public function validateForm($data, ExecutionContextInterface $context)
|
||||
public function validateForm($data, ExecutionContextInterface $context): void
|
||||
{
|
||||
if (null === $data['date_age_calculation']) {
|
||||
$context->buildViolation('The date should not be empty')
|
||||
|
||||
@@ -34,7 +34,7 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -76,7 +76,7 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('date_calc', PickRollingDateType::class, [
|
||||
'label' => 'export.aggregator.person.by_household_composition.Calc date',
|
||||
|
||||
@@ -29,7 +29,7 @@ final readonly class CenterAggregator implements AggregatorInterface
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('at_date', PickRollingDateType::class, [
|
||||
'label' => 'export.aggregator.person.by_center.at_date',
|
||||
@@ -73,7 +73,7 @@ final readonly class CenterAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$alias = 'pers_center_agg';
|
||||
$atDate = 'pers_center_agg_at_date';
|
||||
|
||||
@@ -80,7 +80,7 @@ final readonly class CountryOfBirthAggregator implements AggregatorInterface, Ex
|
||||
return 'person';
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('group_by_level', ChoiceType::class, [
|
||||
'choices' => [
|
||||
@@ -148,7 +148,7 @@ final readonly class CountryOfBirthAggregator implements AggregatorInterface, Ex
|
||||
return 'Group people by country of birth';
|
||||
}
|
||||
|
||||
public function validateForm($data, ExecutionContextInterface $context)
|
||||
public function validateForm($data, ExecutionContextInterface $context): void
|
||||
{
|
||||
if (null === $data['group_by_level']) {
|
||||
$context->buildViolation('You should select an option')
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class EmploymentStatusAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->leftJoin('person.employmentStatus', 'es');
|
||||
$qb->addSelect('es.id as employment_status_aggregator');
|
||||
@@ -40,7 +40,7 @@ final readonly class EmploymentStatusAggregator implements AggregatorInterface
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder): void {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ final readonly class GenderAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$qb->leftJoin('person.gender', 'g');
|
||||
$qb->addSelect('g.id as gender');
|
||||
@@ -41,7 +41,7 @@ final readonly class GenderAggregator implements AggregatorInterface
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder): void {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ class GeographicalUnitAggregator implements AggregatorInterface
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('date_calc', PickRollingDateType::class, [
|
||||
|
||||
@@ -35,7 +35,7 @@ final readonly class HouseholdPositionAggregator implements AggregatorInterface,
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('householdmember', $qb->getAllAliases(), true)) {
|
||||
$qb->join(HouseholdMember::class, 'householdmember', Expr\Join::WITH, 'householdmember.person = person');
|
||||
@@ -67,7 +67,7 @@ final readonly class HouseholdPositionAggregator implements AggregatorInterface,
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('date_position', PickRollingDateType::class, [
|
||||
'label' => 'Household position in relation to this date',
|
||||
@@ -108,7 +108,7 @@ final readonly class HouseholdPositionAggregator implements AggregatorInterface,
|
||||
return 'Aggregate by household position';
|
||||
}
|
||||
|
||||
public function validateForm($data, ExecutionContextInterface $context)
|
||||
public function validateForm($data, ExecutionContextInterface $context): void
|
||||
{
|
||||
if (null === $data['date_position']) {
|
||||
$context->buildViolation('The date should not be empty')
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class MaritalStatusAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('personmarital', $qb->getAllAliases(), true)) {
|
||||
$qb->join('person.maritalStatus', 'personmarital');
|
||||
@@ -42,7 +42,7 @@ final readonly class MaritalStatusAggregator implements AggregatorInterface
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ final readonly class NationalityAggregator implements AggregatorInterface, Expor
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
// add a clause in select part
|
||||
if ('country' === $data['group_by_level']) {
|
||||
@@ -75,7 +75,7 @@ final readonly class NationalityAggregator implements AggregatorInterface, Expor
|
||||
return 'person';
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('group_by_level', ChoiceType::class, [
|
||||
'choices' => [
|
||||
@@ -145,7 +145,7 @@ final readonly class NationalityAggregator implements AggregatorInterface, Expor
|
||||
return 'Group people by nationality';
|
||||
}
|
||||
|
||||
public function validateForm($data, ExecutionContextInterface $context)
|
||||
public function validateForm($data, ExecutionContextInterface $context): void
|
||||
{
|
||||
if (null === $data['group_by_level']) {
|
||||
$context->buildViolation('You should select an option')
|
||||
|
||||
@@ -28,7 +28,7 @@ final readonly class PostalCodeAggregator implements AggregatorInterface
|
||||
private RollingDateConverterInterface $rollingDateConverter,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('calc_date', PickRollingDateType::class, [
|
||||
@@ -71,7 +71,7 @@ final readonly class PostalCodeAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ final readonly class ActionTypeAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('acpwsocialaction', $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin('acpw.socialAction', 'acpwsocialaction');
|
||||
@@ -51,7 +51,7 @@ final readonly class ActionTypeAggregator implements AggregatorInterface
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class CreatorAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class GoalAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('goal', $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin('acpw.goals', 'goal');
|
||||
@@ -42,7 +42,7 @@ final readonly class GoalAggregator implements AggregatorInterface
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class GoalResultAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('goal', $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin('acpw.goals', 'goal');
|
||||
@@ -48,7 +48,7 @@ class GoalResultAggregator implements AggregatorInterface
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface
|
||||
|
||||
public function __construct(private LabelThirdPartyHelper $labelThirdPartyHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form needed here
|
||||
}
|
||||
@@ -37,7 +37,7 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return $this->labelThirdPartyHelper->getLabel($key, $values, 'export.aggregator.course_work.by_handling_third_party.header');
|
||||
}
|
||||
@@ -57,7 +57,7 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ final readonly class JobAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -58,7 +58,7 @@ final readonly class JobAggregator implements AggregatorInterface
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder): void {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -56,7 +56,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder->add('referrer_at', PickRollingDateType::class, [
|
||||
'label' => 'export.aggregator.course_work.by_treating_agent.Calc date',
|
||||
|
||||
@@ -27,7 +27,7 @@ final readonly class ResultAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
if (!\in_array('result', $qb->getAllAliases(), true)) {
|
||||
$qb->leftJoin('acpw.results', 'result');
|
||||
@@ -42,7 +42,7 @@ final readonly class ResultAggregator implements AggregatorInterface
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
// no form
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
$p = self::PREFIX;
|
||||
|
||||
@@ -58,7 +58,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder): void {}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ class CountHouseholdInPeriod 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
|
||||
{
|
||||
$builder
|
||||
->add('calc_date', PickRollingDateType::class, [
|
||||
|
||||
@@ -34,7 +34,7 @@ class CountPerson 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
|
||||
{
|
||||
// No form necessary
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor
|
||||
$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.
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp
|
||||
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('calc_date', PickRollingDateType::class, [
|
||||
@@ -73,7 +73,7 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp
|
||||
return $this->listAccompanyingPeriodHelper->getLabels($key, $values, $data);
|
||||
}
|
||||
|
||||
public function getQueryKeys($data)
|
||||
public function getQueryKeys($data): array
|
||||
{
|
||||
return $this->listAccompanyingPeriodHelper->getQueryKeys($data);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeri
|
||||
private readonly FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
$builder
|
||||
->add('calc_date', PickRollingDateType::class, [
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user