diff --git a/docs/source/_static/code/exports/BirthdateFilter.php b/docs/source/_static/code/exports/BirthdateFilter.php
index fca768ab3..d32b5676f 100644
--- a/docs/source/_static/code/exports/BirthdateFilter.php
+++ b/docs/source/_static/code/exports/BirthdateFilter.php
@@ -28,7 +28,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
}
// here, we alter the query created by Export
- public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data)
+ public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
// we create the clause here
@@ -58,7 +58,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
}
// we build a form to collect some parameters from the users
- public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder)
+ public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder): void
{
$builder->add('date_from', DateType::class, [
'label' => 'Born after this date',
@@ -99,7 +99,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
// is executed here. This function is added by the interface
// `ExportElementValidatedInterface`, and can be ignore if there is
// no need for a validation
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
$date_from = $data['date_from'];
$date_to = $data['date_to'];
diff --git a/docs/source/_static/code/exports/CountPerson.php b/docs/source/_static/code/exports/CountPerson.php
index a0f6931ac..b864ef61c 100644
--- a/docs/source/_static/code/exports/CountPerson.php
+++ b/docs/source/_static/code/exports/CountPerson.php
@@ -32,7 +32,7 @@ class CountPerson implements ExportInterface
$this->entityManager = $em;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// this export does not add any form
}
diff --git a/docs/source/development/pagination/example.php b/docs/source/development/pagination/example.php
index ef565e941..bdf18f166 100644
--- a/docs/source/development/pagination/example.php
+++ b/docs/source/development/pagination/example.php
@@ -18,7 +18,7 @@ class example extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractControl
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry)
{
}
- public function yourAction()
+ public function yourAction(): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
// first, get the number of total item are available
diff --git a/docs/source/development/useful-snippets/controller-secured-for-person.php b/docs/source/development/useful-snippets/controller-secured-for-person.php
index 35028f524..94f7777fd 100644
--- a/docs/source/development/useful-snippets/controller-secured-for-person.php
+++ b/docs/source/development/useful-snippets/controller-secured-for-person.php
@@ -28,7 +28,7 @@ class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\
*
* @return \Symfony\Component\HttpFoundation\Response
*/
- public function listAction($id)
+ public function listAction($id): \Symfony\Component\HttpFoundation\Response
{
/** @var \Chill\PersonBundle\Entity\Person $person */
$person = $this->get('chill.person.repository.person')
diff --git a/docs/source/development/user-interface/widgets/ChillMainConfiguration.php b/docs/source/development/user-interface/widgets/ChillMainConfiguration.php
index c3a90dfee..ec8f19166 100644
--- a/docs/source/development/user-interface/widgets/ChillMainConfiguration.php
+++ b/docs/source/development/user-interface/widgets/ChillMainConfiguration.php
@@ -31,7 +31,7 @@ class ChillMainConfiguration implements ConfigurationInterface
$this->setWidgetFactories($widgetFactories);
}
- public function getConfigTreeBuilder()
+ public function getConfigTreeBuilder(): \Symfony\Component\Config\Definition\Builder\TreeBuilder
{
$treeBuilder = new TreeBuilder('chill_main');
$rootNode = $treeBuilder->getRootNode();
diff --git a/docs/source/development/user-interface/widgets/ChillMainExtension.php b/docs/source/development/user-interface/widgets/ChillMainExtension.php
index cadc560e9..2e484b30e 100644
--- a/docs/source/development/user-interface/widgets/ChillMainExtension.php
+++ b/docs/source/development/user-interface/widgets/ChillMainExtension.php
@@ -27,12 +27,12 @@ class ChillMainExtension extends Extension implements Widget\HasWidgetFactoriesE
*/
protected $widgetFactories = [];
- public function addWidgetFactory(WidgetFactoryInterface $factory)
+ public function addWidgetFactory(WidgetFactoryInterface $factory): void
{
$this->widgetFactories[] = $factory;
}
- public function getConfiguration(array $config, ContainerBuilder $container)
+ public function getConfiguration(array $config, ContainerBuilder $container): ?\Symfony\Component\Config\Definition\ConfigurationInterface
{
return new Configuration($this->widgetFactories, $container);
}
@@ -45,7 +45,7 @@ class ChillMainExtension extends Extension implements Widget\HasWidgetFactoriesE
return $this->widgetFactories;
}
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
// configuration for main bundle
$configuration = $this->getConfiguration($configs, $container);
diff --git a/docs/source/development/user-interface/widgets/ChillPersonAddAPersonListWidgetFactory.php b/docs/source/development/user-interface/widgets/ChillPersonAddAPersonListWidgetFactory.php
index 2859a12c2..dbc25f2b9 100644
--- a/docs/source/development/user-interface/widgets/ChillPersonAddAPersonListWidgetFactory.php
+++ b/docs/source/development/user-interface/widgets/ChillPersonAddAPersonListWidgetFactory.php
@@ -25,7 +25,7 @@ class ChillPersonAddAPersonListWidgetFactory extends AbstractWidgetFactory
* see http://symfony.com/doc/current/components/config/definition.html
*
*/
- public function configureOptions($place, NodeBuilder $node)
+ public function configureOptions($place, NodeBuilder $node): void
{
$node->booleanNode('only_active')
->defaultTrue()
diff --git a/docs/source/development/user-interface/widgets/ChillPersonAddAPersonWidget.php b/docs/source/development/user-interface/widgets/ChillPersonAddAPersonWidget.php
index 0c3f2c182..0774dc7c1 100644
--- a/docs/source/development/user-interface/widgets/ChillPersonAddAPersonWidget.php
+++ b/docs/source/development/user-interface/widgets/ChillPersonAddAPersonWidget.php
@@ -124,7 +124,7 @@ class ChillPersonAddAPersonWidget implements WidgetInterface
/**
* @return UserInterface
*/
- private function getUser()
+ private function getUser(): void
{
// return a user
}
diff --git a/docs/source/development/user-interface/widgets/ChillPersonExtension.php b/docs/source/development/user-interface/widgets/ChillPersonExtension.php
index efb2b0e66..a1689ceb1 100644
--- a/docs/source/development/user-interface/widgets/ChillPersonExtension.php
+++ b/docs/source/development/user-interface/widgets/ChillPersonExtension.php
@@ -22,7 +22,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillPersonExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
// ...
}
@@ -32,7 +32,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
*
* @param \Chill\PersonBundle\DependencyInjection\containerBuilder $container
*/
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$container->prependExtensionConfig('chill_main', [
'widgets' => [
diff --git a/rector.php b/rector.php
index 3923d37e4..ec4725aaf 100644
--- a/rector.php
+++ b/rector.php
@@ -36,6 +36,12 @@ return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rule(Rector\TypeDeclaration\Rector\Class_\MergeDateTimePropertyTypeDeclarationRector::class);
$rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationBasedOnParentClassMethodRector::class);
+ // Add return types to controller methods
+ $rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector::class);
+ $rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector::class);
+ $rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector::class);
+ $rectorConfig->rule(Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyRector::class);
+
// part of the symfony 54 rules
$rectorConfig->rule(\Rector\Symfony\Symfony53\Rector\StaticPropertyFetch\KernelTestCaseContainerPropertyDeprecationRector::class);
$rectorConfig->rule(\Rector\Symfony\Symfony60\Rector\MethodCall\GetHelperControllerToServiceRector::class);
@@ -49,6 +55,13 @@ return static function (RectorConfig $rectorConfig): void {
\Rector\Symfony\Set\SymfonySetList::SYMFONY_42,
\Rector\Symfony\Set\SymfonySetList::SYMFONY_43,
\Rector\Symfony\Set\SymfonySetList::SYMFONY_44,
+ \Rector\Symfony\Set\SymfonySetList::SYMFONY_50,
+ \Rector\Symfony\Set\SymfonySetList::SYMFONY_51,
+ \Rector\Symfony\Set\SymfonySetList::SYMFONY_52,
+ \Rector\Symfony\Set\SymfonySetList::SYMFONY_53,
+ \Rector\Symfony\Set\SymfonySetList::SYMFONY_54,
+ \Rector\Symfony\Set\SymfonySetList::SYMFONY_60,
+ \Rector\Symfony\Set\SymfonySetList::SYMFONY_61,
\Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
\Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_90,
]);
diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php
index f248c6559..07cced0e6 100644
--- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php
+++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php
@@ -75,7 +75,7 @@ final class ActivityController extends AbstractController
* Deletes a Activity entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/activity/{id}/delete', name: 'chill_activity_activity_delete', methods: ['GET', 'POST', 'DELETE'])]
- public function deleteAction(Request $request, mixed $id)
+ public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$view = null;
@@ -104,7 +104,7 @@ final class ActivityController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$this->logger->notice('An activity has been removed', [
- 'by_user' => $this->getUser()->getUsername(),
+ 'by_user' => $this->getUser()->getUserIdentifier(),
'activity_id' => $activity->getId(),
'person_id' => $activity->getPerson() ? $activity->getPerson()->getId() : null,
'comment' => $activity->getComment()->getComment(),
diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php
index 0d337416b..e9f9f8b92 100644
--- a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php
+++ b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php
@@ -28,7 +28,7 @@ class ActivityReasonCategoryController extends AbstractController
* Creates a new ActivityReasonCategory entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/create', name: 'chill_activity_activityreasoncategory_create', methods: ['POST'])]
- public function createAction(Request $request)
+ public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$entity = new ActivityReasonCategory();
$form = $this->createCreateForm($entity);
@@ -52,7 +52,7 @@ class ActivityReasonCategoryController extends AbstractController
* Displays a form to edit an existing ActivityReasonCategory entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/edit', name: 'chill_activity_activityreasoncategory_edit')]
- public function editAction(mixed $id)
+ public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -74,7 +74,7 @@ class ActivityReasonCategoryController extends AbstractController
* Lists all ActivityReasonCategory entities.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/', name: 'chill_activity_activityreasoncategory')]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -89,7 +89,7 @@ class ActivityReasonCategoryController extends AbstractController
* Displays a form to create a new ActivityReasonCategory entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/new', name: 'chill_activity_activityreasoncategory_new')]
- public function newAction()
+ public function newAction(): \Symfony\Component\HttpFoundation\Response
{
$entity = new ActivityReasonCategory();
$form = $this->createCreateForm($entity);
@@ -104,7 +104,7 @@ class ActivityReasonCategoryController extends AbstractController
* Finds and displays a ActivityReasonCategory entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/show', name: 'chill_activity_activityreasoncategory_show')]
- public function showAction(mixed $id)
+ public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -123,7 +123,7 @@ class ActivityReasonCategoryController extends AbstractController
* Edits an existing ActivityReasonCategory entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreasoncategory/{id}/update', name: 'chill_activity_activityreasoncategory_update', methods: ['POST', 'PUT'])]
- public function updateAction(Request $request, mixed $id)
+ public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php
index 37d04d367..53caf7cba 100644
--- a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php
+++ b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php
@@ -30,7 +30,7 @@ class ActivityReasonController extends AbstractController
* Creates a new ActivityReason entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/create', name: 'chill_activity_activityreason_create', methods: ['POST'])]
- public function createAction(Request $request)
+ public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$entity = new ActivityReason();
$form = $this->createCreateForm($entity);
@@ -54,7 +54,7 @@ class ActivityReasonController extends AbstractController
* Displays a form to edit an existing ActivityReason entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/{id}/edit', name: 'chill_activity_activityreason_edit')]
- public function editAction(mixed $id)
+ public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -76,7 +76,7 @@ class ActivityReasonController extends AbstractController
* Lists all ActivityReason entities.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/', name: 'chill_activity_activityreason')]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -91,7 +91,7 @@ class ActivityReasonController extends AbstractController
* Displays a form to create a new ActivityReason entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/new', name: 'chill_activity_activityreason_new')]
- public function newAction()
+ public function newAction(): \Symfony\Component\HttpFoundation\Response
{
$entity = new ActivityReason();
$form = $this->createCreateForm($entity);
@@ -106,7 +106,7 @@ class ActivityReasonController extends AbstractController
* Finds and displays a ActivityReason entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/{id}/show', name: 'chill_activity_activityreason_show')]
- public function showAction(mixed $id)
+ public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -125,7 +125,7 @@ class ActivityReasonController extends AbstractController
* Edits an existing ActivityReason entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activityreason/{id}/update', name: 'chill_activity_activityreason_update', methods: ['POST', 'PUT'])]
- public function updateAction(Request $request, mixed $id)
+ public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
diff --git a/src/Bundle/ChillActivityBundle/Controller/AdminController.php b/src/Bundle/ChillActivityBundle/Controller/AdminController.php
index 39438eb8d..2ff97e290 100644
--- a/src/Bundle/ChillActivityBundle/Controller/AdminController.php
+++ b/src/Bundle/ChillActivityBundle/Controller/AdminController.php
@@ -19,14 +19,14 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class AdminController extends AbstractController
{
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activity', name: 'chill_activity_admin_index')]
- public function indexActivityAction()
+ public function indexActivityAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillActivity/Admin/layout_activity.html.twig');
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activity_redirect_to_main', name: 'chill_admin_aside_activity_redirect_to_admin_index', options: [null])]
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/activity_redirect_to_main', name: 'chill_admin_activity_redirect_to_admin_index')]
- public function redirectToAdminIndexAction()
+ public function redirectToAdminIndexAction(): \Symfony\Component\HttpFoundation\RedirectResponse
{
return $this->redirectToRoute('chill_main_admin_central');
}
diff --git a/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php b/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php
index 15e7e7e4b..ca40d5e3a 100644
--- a/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php
+++ b/src/Bundle/ChillActivityBundle/DependencyInjection/ChillActivityExtension.php
@@ -25,7 +25,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillActivityExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -44,14 +44,14 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
$loader->load('services/doctrine.entitylistener.yaml');
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->prependRoutes($container);
$this->prependAuthorization($container);
$this->prependCruds($container);
}
- public function prependAuthorization(ContainerBuilder $container)
+ public function prependAuthorization(ContainerBuilder $container): void
{
$container->prependExtensionConfig('security', [
'role_hierarchy' => [
@@ -71,7 +71,7 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
/** (non-PHPdoc).
* @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend()
*/
- public function prependRoutes(ContainerBuilder $container)
+ public function prependRoutes(ContainerBuilder $container): void
{
// add routes for custom bundle
$container->prependExtensionConfig('chill_main', [
diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityReason.php b/src/Bundle/ChillActivityBundle/Entity/ActivityReason.php
index f6bdac24e..cbbf9564c 100644
--- a/src/Bundle/ChillActivityBundle/Entity/ActivityReason.php
+++ b/src/Bundle/ChillActivityBundle/Entity/ActivityReason.php
@@ -40,7 +40,7 @@ class ActivityReason
*
* @return bool
*/
- public function getActive()
+ public function getActive(): bool
{
return $this->active;
}
@@ -58,7 +58,7 @@ class ActivityReason
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php b/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php
index c344fc539..7a1ca096e 100644
--- a/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php
+++ b/src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php
@@ -61,7 +61,7 @@ class ActivityReasonCategory implements \Stringable
*
* @return bool
*/
- public function getActive()
+ public function getActive(): bool
{
return $this->active;
}
@@ -71,7 +71,7 @@ class ActivityReasonCategory implements \Stringable
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php
index f32dc5264..d27fc1784 100644
--- a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php
+++ b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php
@@ -188,7 +188,7 @@ class ActivityType
private int $userVisible = self::FIELD_REQUIRED;
#[Assert\Callback]
- public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload)
+ public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload): void
{
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
// if social issues are invisible then social actions cannot be optional or required + if social issues are optional then social actions shouldn't be required
diff --git a/src/Bundle/ChillActivityBundle/EntityListener/ActivityEntityListener.php b/src/Bundle/ChillActivityBundle/EntityListener/ActivityEntityListener.php
index 31fac3be8..613943e77 100644
--- a/src/Bundle/ChillActivityBundle/EntityListener/ActivityEntityListener.php
+++ b/src/Bundle/ChillActivityBundle/EntityListener/ActivityEntityListener.php
@@ -21,7 +21,7 @@ class ActivityEntityListener
{
public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository) {}
- public function persistActionToCourse(Activity $activity)
+ public function persistActionToCourse(Activity $activity): void
{
if ($activity->getAccompanyingPeriod() instanceof AccompanyingPeriod) {
$period = $activity->getAccompanyingPeriod();
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php
index 0097854d3..ba3f87f6b 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php
@@ -33,7 +33,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
private TranslatableStringHelperInterface $translatableStringHelper,
) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('after_date', PickRollingDateType::class, [
@@ -84,7 +84,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php
index 9282f92e4..78b68be27 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php
@@ -27,7 +27,7 @@ class BySocialActionAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.socialActions', 'actsocialaction');
@@ -42,7 +42,7 @@ class BySocialActionAggregator implements AggregatorInterface
return Declarations::ACTIVITY_ACP;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php
index bbdadf4d6..b7826013f 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php
@@ -27,7 +27,7 @@ class BySocialIssueAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.socialIssues', 'actsocialissue');
@@ -42,7 +42,7 @@ class BySocialIssueAggregator implements AggregatorInterface
return Declarations::ACTIVITY_ACP;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php
index ab07afca7..c55b05d99 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php
@@ -25,7 +25,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.location', 'actloc');
@@ -39,7 +39,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form required for this aggregator
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php
index 56a6d0249..b2abda6c5 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php
@@ -22,7 +22,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
{
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {}
- public function buildForm(FormBuilderInterface $builder) {}
+ public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php
index ad3937a6e..967fa214d 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php
@@ -36,7 +36,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
// add select element
if ('reasons' === $data['level']) {
@@ -72,7 +72,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add(
'level',
@@ -144,7 +144,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
return 'Aggregate by activity reason';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
if (null === $data['level']) {
$context
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php
index dbdc982b6..4e51f867f 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php
@@ -29,7 +29,7 @@ class ActivityTypeAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('acttype', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.activityType', 'acttype');
@@ -44,7 +44,7 @@ class ActivityTypeAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form required for this aggregator
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php
index 61452af22..b9956c92e 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php
@@ -29,7 +29,7 @@ class ActivityUserAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
// add select element
$qb->addSelect(sprintf('IDENTITY(activity.user) AS %s', self::KEY));
@@ -43,7 +43,7 @@ class ActivityUserAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php
index cc4ab9d14..19174be06 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php
@@ -27,7 +27,7 @@ class ActivityUsersAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actusers', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.users', 'actusers');
@@ -43,7 +43,7 @@ class ActivityUsersAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add on the form
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php
index b90c2b0cc..9b37bda2a 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php
@@ -34,7 +34,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php
index a93a2a875..fb2743ed2 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php
@@ -34,7 +34,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php
index 09bdab89e..a8250c3dc 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php
@@ -27,7 +27,7 @@ class ByCreatorAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->addSelect('IDENTITY(activity.createdBy) AS creator_aggregator');
$qb->addGroupBy('creator_aggregator');
@@ -38,7 +38,7 @@ class ByCreatorAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php
index 13224bade..a7dc60cf6 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php
@@ -27,7 +27,7 @@ class ByThirdpartyAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('acttparty', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.thirdParties', 'acttparty');
@@ -42,7 +42,7 @@ class ByThirdpartyAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php
index ef8dd8c50..62c417e4b 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php
index ddf90dfbc..b844b2fd5 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php
index 9d9e5ed61..72fd01049 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php
@@ -32,7 +32,7 @@ class DateAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$order = null;
@@ -67,7 +67,7 @@ class DateAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('frequency', ChoiceType::class, [
'choices' => self::CHOICES,
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php
index da2d74f64..372ec8c2c 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php
@@ -27,7 +27,7 @@ class LocationTypeAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
$qb->leftJoin('activity.location', 'actloc');
@@ -42,7 +42,7 @@ class LocationTypeAggregator implements AggregatorInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php
index ab32c278e..19bb2793b 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php
@@ -24,7 +24,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface
{
public function __construct(private HouseholdRepository $householdRepository) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add here
}
@@ -64,7 +64,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->join(
HouseholdMember::class,
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php
index c7a3bd6b5..2879a678d 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php
@@ -21,7 +21,7 @@ final readonly class PersonAggregator implements AggregatorInterface
{
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add here
}
@@ -31,7 +31,7 @@ final readonly class PersonAggregator implements AggregatorInterface
return [];
}
- public function getLabels($key, array $values, mixed $data)
+ public function getLabels($key, array $values, mixed $data): callable
{
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.person.by_person.person');
}
@@ -51,7 +51,7 @@ final readonly class PersonAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->addSelect('IDENTITY(activity.person) AS activity_by_person_agg')
diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php
index 8459741c5..4e996d523 100644
--- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php
+++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php
@@ -27,7 +27,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// nothing to add here
}
@@ -37,7 +37,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
return [];
}
- public function getLabels($key, array $values, mixed $data)
+ public function getLabels($key, array $values, mixed $data): callable
{
if ($key !== self::PREFIX.'_pid') {
throw new \UnexpectedValueException('this key should not be handled: '.$key);
@@ -61,7 +61,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php
index acfb073f5..734ecca85 100644
--- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php
+++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php
@@ -41,7 +41,7 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// TODO: Implement buildForm() method.
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php
index 41c05494c..f9fbc8643 100644
--- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php
+++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php
@@ -42,7 +42,7 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
- public function buildForm(FormBuilderInterface $builder) {}
+ public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{
diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php
index aab2d7db8..eb210682d 100644
--- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php
+++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php
@@ -33,7 +33,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$this->helper->buildForm($builder);
}
@@ -73,7 +73,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
};
}
- public function getQueryKeys($data)
+ public function getQueryKeys($data): array
{
return
array_merge(
@@ -95,7 +95,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
return ListActivityHelper::MSG_KEY.'List activity linked to a course';
}
- public function getType()
+ public function getType(): string
{
return $this->helper->getType();
}
@@ -140,7 +140,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
return ActivityStatsVoter::LISTS;
}
- public function supportsModifiers()
+ public function supportsModifiers(): array
{
return array_merge(
$this->helper->supportsModifiers(),
diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php
index 159fcf78d..d9e2b9ce8 100644
--- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php
+++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php
@@ -40,7 +40,7 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// TODO: Implement buildForm() method.
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php
index 27502e2b0..152223bd1 100644
--- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php
+++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php
@@ -40,7 +40,7 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// TODO: Implement buildForm() method.
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php
index 31111a083..08f063df9 100644
--- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php
+++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php
@@ -34,7 +34,7 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
- public function buildForm(FormBuilderInterface $builder) {}
+ public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{
diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php
index de1713542..7225607bc 100644
--- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php
+++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php
@@ -59,7 +59,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('fields', ChoiceType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php
index 7c6eb0bb2..79cc1fb2e 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php
@@ -38,7 +38,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$exists = self::BASE_EXISTS;
@@ -67,7 +67,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_activitytypes', EntityType::class, [
'class' => ActivityType::class,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php
index 13349baa5..8007b87e3 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php
@@ -28,7 +28,7 @@ class BySocialActionFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
$qb->join('activity.socialActions', 'actsocialaction');
@@ -48,7 +48,7 @@ class BySocialActionFilter implements FilterInterface
return Declarations::ACTIVITY_ACP;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_socialactions', PickSocialActionType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php
index bef40290e..86788a2b8 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php
@@ -28,7 +28,7 @@ class BySocialIssueFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
$qb->join('activity.socialIssues', 'actsocialissue');
@@ -48,7 +48,7 @@ class BySocialIssueFilter implements FilterInterface
return Declarations::ACTIVITY_ACP;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_socialissues', PickSocialIssueType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php
index afd708d33..5fd46e6e5 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php
@@ -27,7 +27,7 @@ class HasNoActivityFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->andWhere('
@@ -43,7 +43,7 @@ class HasNoActivityFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form needed
}
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php
index 2d3282ad1..e01ba5282 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php
@@ -30,7 +30,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
return 'export.filter.activity.course_having_activity_between_date.Title';
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('start_date', PickRollingDateType::class, [
@@ -65,7 +65,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$alias = 'act_period_having_act_betw_date_alias';
$from = 'act_period_having_act_betw_date_start';
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php
index e3d7796d3..203536c8c 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php
@@ -30,7 +30,7 @@ class ActivityDateFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->between(
@@ -61,7 +61,7 @@ class ActivityDateFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_from', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php
index c9eab9066..130dcde92 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php
@@ -33,7 +33,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface
return 'export.filter.activity.by_presence.Filter activity by activity presence';
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('presences', EntityType::class, [
'class' => ActivityPresence::class,
@@ -68,7 +68,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->andWhere('activity.attendee IN (:activity_presence_filter_presences)')
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php
index 96e42c3e6..c263227c6 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php
@@ -34,7 +34,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->in('activity.activityType', ':selected_activity_types');
@@ -47,7 +47,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('types', EntityType::class, [
'choices' => $this->activityTypeRepository->findAllActive(),
@@ -93,7 +93,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
return 'Filter by activity type';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
if (null === $data['types'] || 0 === \count($data['types'])) {
$context
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php
index 56285c026..8db45b862 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php
@@ -27,7 +27,7 @@ class ActivityUsersFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$orX = $qb->expr()->orX();
@@ -44,7 +44,7 @@ class ActivityUsersFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_users', PickUserDynamicType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php
index f75c5a817..ccf07b098 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php
@@ -27,7 +27,7 @@ class ByCreatorFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->andWhere(
@@ -41,7 +41,7 @@ class ByCreatorFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_users', PickUserDynamicType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php
index 3b805d4ff..36994d9eb 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php
@@ -39,7 +39,7 @@ final readonly class CreatorJobFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -75,7 +75,7 @@ final readonly class CreatorJobFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('jobs', EntityType::class, [
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php
index 36b827e9b..1fee9635e 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php
@@ -36,7 +36,7 @@ class CreatorScopeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -72,7 +72,7 @@ class CreatorScopeFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('scopes', EntityType::class, [
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php
index b74be2552..5ccc6fc7a 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php
@@ -35,7 +35,7 @@ class EmergencyFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -56,7 +56,7 @@ class EmergencyFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_emergency', ChoiceType::class, [
'choices' => self::CHOICES,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php
index 77b4ce20d..7525381ed 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php
@@ -24,7 +24,7 @@ class LocationFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->andWhere(
$qb->expr()->in('activity.location', ':location')
@@ -38,7 +38,7 @@ class LocationFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_location', PickUserLocationType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php
index 771dfca30..6eaf409eb 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php
@@ -28,7 +28,7 @@ class LocationTypeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
$qb->join('activity.location', 'actloc');
@@ -52,7 +52,7 @@ class LocationTypeFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_locationtype', PickLocationTypeType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php
index b8ce3259f..6ddc2c49e 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php
@@ -33,7 +33,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$join = $qb->getDQLPart('join');
@@ -58,7 +58,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
return Declarations::ACTIVITY_PERSON;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('reasons', EntityType::class, [
'class' => ActivityReason::class,
@@ -96,7 +96,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
return 'Filter by reason';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
if (null === $data['reasons'] || 0 === \count($data['reasons'])) {
$context
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php
index 2fd628edb..65cb5dbb6 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php
@@ -92,7 +92,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('date_from_rolling', PickRollingDateType::class, [
'label' => 'export.filter.activity.person_between_dates.Implied in an activity after this date',
@@ -150,7 +150,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
return 'export.filter.activity.person_between_dates.title';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
if ($this->rollingDateConverter->convert($data['date_from_rolling'])
>= $this->rollingDateConverter->convert($data['date_to_rolling'])) {
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php
index 8bdefeb24..dd47df699 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php
@@ -33,7 +33,7 @@ final readonly class PersonsFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -52,7 +52,7 @@ final readonly class PersonsFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_persons', PickPersonDynamicType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php
index 3011627e8..e73f8e864 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php
@@ -36,7 +36,7 @@ class SentReceivedFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -57,7 +57,7 @@ class SentReceivedFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_sentreceived', ChoiceType::class, [
'choices' => self::CHOICES,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php
index 6e6b745b9..9bf98ce65 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php
@@ -28,7 +28,7 @@ class UserFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -49,7 +49,7 @@ class UserFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_users', PickUserDynamicType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php
index cf2787359..be7baa7d4 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php
@@ -37,7 +37,7 @@ class UsersJobFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ class UsersJobFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('jobs', EntityType::class, [
diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php
index bbf1630c4..40ed3dc89 100644
--- a/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php
+++ b/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php
@@ -37,7 +37,7 @@ class UsersScopeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ class UsersScopeFilter implements FilterInterface
return Declarations::ACTIVITY;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('scopes', EntityType::class, [
diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityReasonCategoryType.php b/src/Bundle/ChillActivityBundle/Form/ActivityReasonCategoryType.php
index 3a0f2a318..7e0af8adc 100644
--- a/src/Bundle/ChillActivityBundle/Form/ActivityReasonCategoryType.php
+++ b/src/Bundle/ChillActivityBundle/Form/ActivityReasonCategoryType.php
@@ -19,7 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class ActivityReasonCategoryType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
@@ -29,7 +29,7 @@ class ActivityReasonCategoryType extends AbstractType
/**
* @param OptionsResolverInterface $resolver
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\ActivityBundle\Entity\ActivityReasonCategory::class,
@@ -39,7 +39,7 @@ class ActivityReasonCategoryType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_activitybundle_activityreasoncategory';
}
diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php b/src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php
index f47a101bd..7a1d1477f 100644
--- a/src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php
+++ b/src/Bundle/ChillActivityBundle/Form/ActivityReasonType.php
@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class ActivityReasonType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
@@ -29,7 +29,7 @@ class ActivityReasonType extends AbstractType
->add('category', TranslatableActivityReasonCategoryType::class);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => ActivityReason::class,
@@ -39,7 +39,7 @@ class ActivityReasonType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_activitybundle_activityreason';
}
diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php b/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php
index 8e8ae51f7..97f672611 100644
--- a/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php
+++ b/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php
@@ -27,7 +27,7 @@ class ActivityTypeType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
@@ -67,7 +67,7 @@ class ActivityTypeType extends AbstractType
->add('commentVisible', ActivityFieldPresence::class);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\ActivityBundle\Entity\ActivityType::class,
diff --git a/src/Bundle/ChillActivityBundle/Form/Type/ActivityFieldPresence.php b/src/Bundle/ChillActivityBundle/Form/Type/ActivityFieldPresence.php
index 42db8c4ac..7f6a6696f 100644
--- a/src/Bundle/ChillActivityBundle/Form/Type/ActivityFieldPresence.php
+++ b/src/Bundle/ChillActivityBundle/Form/Type/ActivityFieldPresence.php
@@ -18,7 +18,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class ActivityFieldPresence extends AbstractType
{
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(
[
@@ -31,7 +31,7 @@ class ActivityFieldPresence extends AbstractType
);
}
- public function getParent()
+ public function getParent(): ?string
{
return ChoiceType::class;
}
diff --git a/src/Bundle/ChillActivityBundle/Form/Type/PickActivityReasonType.php b/src/Bundle/ChillActivityBundle/Form/Type/PickActivityReasonType.php
index ca411b6ac..c50f503ec 100644
--- a/src/Bundle/ChillActivityBundle/Form/Type/PickActivityReasonType.php
+++ b/src/Bundle/ChillActivityBundle/Form/Type/PickActivityReasonType.php
@@ -30,7 +30,7 @@ class PickActivityReasonType extends AbstractType
private readonly TranslatableStringHelperInterface $translatableStringHelper,
) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(
[
@@ -49,12 +49,12 @@ class PickActivityReasonType extends AbstractType
);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'translatable_activity_reason';
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategoryType.php b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategoryType.php
index ee1417bfb..99cdb93c0 100644
--- a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategoryType.php
+++ b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategoryType.php
@@ -25,7 +25,7 @@ class TranslatableActivityReasonCategoryType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(
[
@@ -36,7 +36,7 @@ class TranslatableActivityReasonCategoryType extends AbstractType
);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityType.php b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityType.php
index 5c77e500d..2bb34ebd1 100644
--- a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityType.php
+++ b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityType.php
@@ -22,7 +22,7 @@ class TranslatableActivityType extends AbstractType
{
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(
[
@@ -34,12 +34,12 @@ class TranslatableActivityType extends AbstractType
);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'translatable_activity_type';
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php
index 5ed606637..d17e448d3 100644
--- a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php
+++ b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php
@@ -30,7 +30,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
$period = $parameters['accompanyingCourse'];
diff --git a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php
index 2a3291515..98b07cbfc 100644
--- a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php
+++ b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseQuickMenuBuilder.php
@@ -25,7 +25,7 @@ final readonly class AccompanyingCourseQuickMenuBuilder implements LocalMenuBuil
return ['accompanying_course_quick_menu'];
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
/** @var \Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingCourse */
$accompanyingCourse = $parameters['accompanying-course'];
diff --git a/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php
index 0afe11cfc..092d9e31e 100644
--- a/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php
@@ -22,7 +22,7 @@ final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private Security $security) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->security->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php
index 5a13c5d65..fe48dac85 100644
--- a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php
+++ b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php
@@ -30,7 +30,7 @@ final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface
private TranslatorInterface $translator,
) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
/** @var Person $person */
$person = $parameters['person'];
diff --git a/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityStatsVoter.php b/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityStatsVoter.php
index 27f4b07a6..6a97be20e 100644
--- a/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityStatsVoter.php
+++ b/src/Bundle/ChillActivityBundle/Security/Authorization/ActivityStatsVoter.php
@@ -49,17 +49,17 @@ class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleHierar
return $this->getAttributes();
}
- protected function supports($attribute, $subject)
+ protected function supports(string $attribute, mixed $subject): bool
{
return $this->helper->supports($attribute, $subject);
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
return $this->helper->voteOnAttribute($attribute, $subject, $token);
}
- private function getAttributes()
+ private function getAttributes(): array
{
return [self::STATS, self::LISTS];
}
diff --git a/src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php b/src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php
index 3f0b0f4e6..f98e43074 100644
--- a/src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php
+++ b/src/Bundle/ChillActivityBundle/Test/PrepareActivityTrait.php
@@ -25,7 +25,7 @@ trait PrepareActivityTrait
*
* @return Activity
*/
- public function prepareActivity(Scope $scope, Person $person)
+ public function prepareActivity(Scope $scope, Person $person): \Chill\ActivityBundle\Entity\Activity
{
return (new Activity())
->setScope($scope)
diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php
index 31012569a..1b0e14ac7 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php
@@ -75,7 +75,7 @@ final class ActivityControllerTest extends WebTestCase
/**
* @dataProvider getSecuredPagesUnauthenticated
*/
- public function testAccessIsDeniedForUnauthenticated(mixed $url)
+ public function testAccessIsDeniedForUnauthenticated(mixed $url): void
{
$client = $this->createClient();
@@ -94,14 +94,14 @@ final class ActivityControllerTest extends WebTestCase
* @param type $client
* @param type $url
*/
- public function testAccessIsDeniedForUnauthorized($client, $url)
+ public function testAccessIsDeniedForUnauthorized($client, $url): void
{
$client->request('GET', $url);
$this->assertEquals(403, $client->getResponse()->getStatusCode());
}
- public function testCompleteScenario()
+ public function testCompleteScenario(): void
{
// Create a new client to browse the application
$client = $this->getAuthenticatedClient();
@@ -199,7 +199,7 @@ final class ActivityControllerTest extends WebTestCase
*
* @return \Chill\MainBundle\Entity\User a fake user within a group without activity
*/
- private function createFakeUser()
+ private function createFakeUser(): \Chill\MainBundle\Entity\User
{
$container = self::$kernel->getContainer();
$em = $container->get('doctrine.orm.entity_manager');
@@ -259,7 +259,7 @@ final class ActivityControllerTest extends WebTestCase
/**
* @return \Symfony\Component\BrowserKit\AbstractBrowser
*/
- private function getAuthenticatedClient(mixed $username = 'center a_social')
+ private function getAuthenticatedClient(mixed $username = 'center a_social'): \Symfony\Bundle\FrameworkBundle\KernelBrowser
{
return self::createClient([], [
'PHP_AUTH_USER' => $username,
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php
index bc0651b1f..b09b37bcb 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/ByActivityTypeAggregatorTest.php
@@ -41,7 +41,7 @@ class ByActivityTypeAggregatorTest extends AbstractAggregatorTest
$this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ACPAggregators\ByActivityTypeAggregator
{
return new ByActivityTypeAggregator(
$this->rollingDateConverter,
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php
index 1d7578bf0..322ad9abb 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialActionAggregatorTest.php
@@ -32,7 +32,7 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialaction_aggregator');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialActionAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php
index a3b69eaef..f9e47dd0d 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ACPAggregators/BySocialIssueAggregatorTest.php
@@ -32,7 +32,7 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialissue_aggregator');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialIssueAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php
index db26d4dd4..c33f3c8c3 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityPresenceAggregatorTest.php
@@ -35,7 +35,7 @@ class ActivityPresenceAggregatorTest extends AbstractAggregatorTest
$this->activityPresenceRepository = self::getContainer()->get(ActivityPresenceRepositoryInterface::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ActivityPresenceAggregator
{
return new ActivityPresenceAggregator($this->activityPresenceRepository, $this->translatableStringHelper);
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php
index 41c7213c0..19f0bc00d 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php
@@ -44,7 +44,7 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
->push($request->reveal());*/
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php
index 0768060f2..961379289 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityTypeAggregatorTest.php
@@ -45,7 +45,7 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest
->push($request->reveal());
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ActivityTypeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php
index 186dc093b..a932a9ce5 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityUserAggregatorTest.php
@@ -45,7 +45,7 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest
->push($request->reveal());
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php
index 50d0f760e..1231b6e91 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByThirdpartyAggregatorTest.php
@@ -32,7 +32,7 @@ final class ByThirdpartyAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(ByThirdpartyAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ByThirdpartyAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php
index b45d78be1..fa2b10faf 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ByUserAggregatorTest.php
@@ -32,7 +32,7 @@ final class ByUserAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(ByCreatorAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ByCreatorAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php
index 763ab1a52..84f0763ec 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorJobAggregatorTest.php
@@ -32,7 +32,7 @@ final class CreatorJobAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(CreatorJobAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\CreatorJobAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php
index 1c0b9fe28..064878625 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/CreatorScopeAggregatorTest.php
@@ -32,7 +32,7 @@ final class CreatorScopeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(CreatorScopeAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\CreatorScopeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php
index 7fb3b42c4..3a6d245bb 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/DateAggregatorTest.php
@@ -32,7 +32,7 @@ final class DateAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(DateAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\DateAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php
index 4eebe9dc2..5ea9b03ad 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php
@@ -32,7 +32,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(LocationTypeAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\LocationTypeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php
index 208d7971b..0f004c997 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/PersonAggregatorTest.php
@@ -32,7 +32,7 @@ class PersonAggregatorTest extends AbstractAggregatorTest
$this->labelPersonHelper = self::getContainer()->get(LabelPersonHelper::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\PersonAggregators\PersonAggregator
{
return new PersonAggregator($this->labelPersonHelper);
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php
index bf9a683c3..3c1183258 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonsAggregatorTest.php
@@ -33,7 +33,7 @@ class PersonsAggregatorTest extends AbstractAggregatorTest
$this->labelPersonHelper = self::getContainer()->get(LabelPersonHelper::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\PersonsAggregator
{
return new PersonsAggregator($this->labelPersonHelper);
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ActivityTypeFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ActivityTypeFilterTest.php
index ee9422385..13c0c15d7 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ActivityTypeFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ActivityTypeFilterTest.php
@@ -36,7 +36,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\ACPFilters\ActivityTypeFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\ACPFilters\ActivityTypeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ByCreatorFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ByCreatorFilterTest.php
index 88e33a9ba..e8c3badcf 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ByCreatorFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ByCreatorFilterTest.php
@@ -33,7 +33,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(ByCreatorFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\ByCreatorFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialActionFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialActionFilterTest.php
index ef5fdbf81..39d850190 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialActionFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialActionFilterTest.php
@@ -33,7 +33,7 @@ final class BySocialActionFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(\Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialActionFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialActionFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialIssueFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialIssueFilterTest.php
index dba709aab..1d514ab71 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialIssueFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/BySocialIssueFilterTest.php
@@ -34,7 +34,7 @@ final class BySocialIssueFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(BySocialIssueFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialIssueFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityDateFilterTest.php
index d9b2e3144..3d084fb09 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityDateFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityDateFilterTest.php
@@ -33,7 +33,7 @@ final class ActivityDateFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(ActivityDateFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\ActivityDateFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityPresenceFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityPresenceFilterTest.php
index 01c94ce63..1a860e968 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityPresenceFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityPresenceFilterTest.php
@@ -39,7 +39,7 @@ class ActivityPresenceFilterTest extends AbstractFilterTest
$this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\ActivityPresenceFilter
{
return new ActivityPresenceFilter($this->translatableStringHelper, $this->translator);
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php
index 555364f9a..e857d032b 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityReasonFilterTest.php
@@ -44,7 +44,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
->push($request->reveal());
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php
index a9c44d591..e7dad8a47 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ActivityTypeFilterTest.php
@@ -34,7 +34,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.activity.export.type_filter');
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\ActivityTypeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ByCreatorFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ByCreatorFilterTest.php
index cbd168ce8..d0e6cd6b4 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ByCreatorFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/ByCreatorFilterTest.php
@@ -33,7 +33,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(ByCreatorFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\ByCreatorFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorJobFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorJobFilterTest.php
index 9babab132..40e56a65d 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorJobFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorJobFilterTest.php
@@ -42,7 +42,7 @@ class CreatorJobFilterTest extends AbstractFilterTest
$this->userJobRepository = self::getContainer()->get(UserJobRepositoryInterface::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\CreatorJobFilter
{
return new CreatorJobFilter(
$this->translatableStringHelper,
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorScopeFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorScopeFilterTest.php
index 9fdb4ea61..0762002f5 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorScopeFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/CreatorScopeFilterTest.php
@@ -33,7 +33,7 @@ final class CreatorScopeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(CreatorScopeFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\CreatorScopeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/EmergencyFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/EmergencyFilterTest.php
index d1645533c..81347a38b 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/EmergencyFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/EmergencyFilterTest.php
@@ -32,7 +32,7 @@ final class EmergencyFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(EmergencyFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\EmergencyFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/LocationTypeFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/LocationTypeFilterTest.php
index b3ffa7abb..cff73b0d6 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/LocationTypeFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/LocationTypeFilterTest.php
@@ -33,7 +33,7 @@ final class LocationTypeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(LocationTypeFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\LocationTypeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php
index 0c9637e2e..6fe82bfd2 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/ActivityReasonFilterTest.php
@@ -34,7 +34,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.activity.export.reason_filter');
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php
index 329256f3d..400e90838 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilterTest.php
@@ -33,7 +33,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter');
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php
index c5aa9f517..a15c3e10d 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php
@@ -43,7 +43,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
->push($request->reveal());
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter
{
return $this->filter;
}
@@ -90,7 +90,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
*
* @return \Chill\ActivityBundle\Entity\ActivityReason[]
*/
- private function getActivityReasons()
+ private function getActivityReasons(): array
{
self::bootKernel();
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonsFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonsFilterTest.php
index cf2ab05ac..23ac15098 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonsFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonsFilterTest.php
@@ -34,7 +34,7 @@ class PersonsFilterTest extends AbstractFilterTest
$this->personRender = self::getContainer()->get(PersonRenderInterface::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonsFilter
{
return new PersonsFilter($this->personRender);
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/SentReceivedFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/SentReceivedFilterTest.php
index 843bfea1d..c1a833e9f 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/SentReceivedFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/SentReceivedFilterTest.php
@@ -32,7 +32,7 @@ final class SentReceivedFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(SentReceivedFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\SentReceivedFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/UserFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/UserFilterTest.php
index 569fb5403..6f4f5d9ef 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/UserFilterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/UserFilterTest.php
@@ -33,7 +33,7 @@ final class UserFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(UserFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ActivityBundle\Export\Filter\UserFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php
index 3d1b31f08..5d5eb622b 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Form/ActivityTypeTest.php
@@ -74,7 +74,7 @@ final class ActivityTypeTest extends KernelTestCase
->setToken($token->reveal());
}
- public function testForm()
+ public function testForm(): void
{
$form = $this->formBuilder
->add('activity', ActivityType::class, [
@@ -90,7 +90,7 @@ final class ActivityTypeTest extends KernelTestCase
$this->assertInstanceOf(Activity::class, $form->getData()['activity']);
}
- public function testFormSubmitting()
+ public function testFormSubmitting(): void
{
$form = $this->formBuilder
->add('activity', ActivityType::class, [
@@ -136,7 +136,7 @@ final class ActivityTypeTest extends KernelTestCase
* Test that the form correctly build even with a durationTime which is not in
* the listed in the possible durationTime.
*/
- public function testFormWithActivityHavingDifferentTime()
+ public function testFormWithActivityHavingDifferentTime(): void
{
$activity = new Activity();
$activity->setDurationTime(\DateTime::createFromFormat('U', 60));
diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php
index 750758f72..94103e039 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityReasonTest.php
@@ -50,7 +50,7 @@ final class TranslatableActivityReasonTest extends TypeTestCase
/**
* @return \Symfony\Bridge\Doctrine\Form\Type\EntityType
*/
- protected function getEntityType()
+ protected function getEntityType(): \Symfony\Bridge\Doctrine\Form\Type\EntityType
{
$managerRegistry = (new \Prophecy\Prophet())->prophesize();
@@ -77,7 +77,7 @@ final class TranslatableActivityReasonTest extends TypeTestCase
protected function getTranslatableStringHelper(
$locale = 'en',
$fallbackLocale = 'en',
- ) {
+ ): \Chill\MainBundle\Templating\TranslatableStringHelper {
$prophet = new \Prophecy\Prophet();
$requestStack = $prophet->prophesize();
$request = $prophet->prophesize();
diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php
index 6715af3ed..88cf914e1 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php
@@ -46,7 +46,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
->push($request);
}
- public function testForm()
+ public function testForm(): void
{
$type = $this->getRandomType();
$form = $this->builder->add('type', TranslatableActivityType::class)
diff --git a/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php b/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php
index 0a9e7d8ba..08dd0e74b 100644
--- a/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php
+++ b/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php
@@ -110,7 +110,7 @@ final class ActivityVoterTest extends KernelTestCase
];
}
- public function testNullUser()
+ public function testNullUser(): void
{
$token = $this->prepareToken();
$center = $this->prepareCenter(1, 'center');
@@ -139,7 +139,7 @@ final class ActivityVoterTest extends KernelTestCase
Center $center,
$attribute,
$message,
- ) {
+ ): void {
$token = $this->prepareToken($user);
$activity = $this->prepareActivity($scope, $this->preparePerson($center));
diff --git a/src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php b/src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php
index 5fe56bbce..2a39c019c 100644
--- a/src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php
+++ b/src/Bundle/ChillActivityBundle/Timeline/TimelineActivityProvider.php
@@ -101,7 +101,7 @@ class TimelineActivityProvider implements TimelineProviderInterface
*
* @throws \LogicException if the context is not supported
*/
- private function checkContext(string $context)
+ private function checkContext(string $context): void
{
if (false === \in_array($context, self::SUPPORTED_CONTEXTS, true)) {
throw new \LogicException(sprintf("The context '%s' is not supported. Currently only 'person' is supported", $context));
diff --git a/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidity.php b/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidity.php
index bea38c768..107816181 100644
--- a/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidity.php
+++ b/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidity.php
@@ -30,7 +30,7 @@ class ActivityValidity extends Constraint
public $socialIssuesMessage = 'For this type of activity, you must add at least one social issue';
- public function getTargets()
+ public function getTargets(): string|array
{
return self::CLASS_CONSTRAINT;
}
diff --git a/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidityValidator.php b/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidityValidator.php
index 21ee6185e..49688c1a1 100644
--- a/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidityValidator.php
+++ b/src/Bundle/ChillActivityBundle/Validator/Constraints/ActivityValidityValidator.php
@@ -20,7 +20,7 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException;
class ActivityValidityValidator extends ConstraintValidator
{
- public function validate($activity, Constraint $constraint)
+ public function validate($activity, Constraint $constraint): void
{
if (!$constraint instanceof ActivityValidity) {
throw new UnexpectedTypeException($constraint, ActivityValidity::class);
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Controller/AdminController.php b/src/Bundle/ChillAsideActivityBundle/src/Controller/AdminController.php
index 08af67639..21b7ac9d1 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Controller/AdminController.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Controller/AdminController.php
@@ -20,7 +20,7 @@ use Symfony\Component\Routing\Annotation\Route;
class AdminController extends AbstractController
{
#[Route(path: '/{_locale}/admin/aside-activity', name: 'chill_aside_activity_admin')]
- public function indexAdminAction()
+ public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillAsideActivity/Admin/index.html.twig');
}
diff --git a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php
index 056f29ba1..b212c06ee 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/DependencyInjection/ChillAsideActivityExtension.php
@@ -34,13 +34,13 @@ final class ChillAsideActivityExtension extends Extension implements PrependExte
$loader->load('services/export.yaml');
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->prependRoute($container);
$this->prependCruds($container);
}
- protected function prependCruds(ContainerBuilder $container)
+ protected function prependCruds(ContainerBuilder $container): void
{
$container->prependExtensionConfig('chill_main', [
'cruds' => [
@@ -98,7 +98,7 @@ final class ChillAsideActivityExtension extends Extension implements PrependExte
]);
}
- protected function prependRoute(ContainerBuilder $container)
+ protected function prependRoute(ContainerBuilder $container): void
{
// declare routes for task bundle
$container->prependExtensionConfig('chill_main', [
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php
index 712039c5b..2203c1e80 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivityCategory.php
@@ -101,7 +101,7 @@ class AsideActivityCategory
}
#[Assert\Callback]
- public function preventRecursiveParent(ExecutionContextInterface $context, mixed $payload)
+ public function preventRecursiveParent(ExecutionContextInterface $context, mixed $payload): void
{
if (!$this->hasParent()) {
return;
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php
index cc311d470..452f9b80c 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php
@@ -30,7 +30,7 @@ class ByActivityTypeAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->addSelect('IDENTITY(aside.type) AS by_aside_activity_type_aggregator')
->addGroupBy('by_aside_activity_type_aggregator');
@@ -41,7 +41,7 @@ class ByActivityTypeAggregator implements AggregatorInterface
return Declarations::ASIDE_ACTIVITY_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// No form needed
}
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php
index 58d5584b4..bbecab1e9 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php
@@ -34,7 +34,7 @@ class ByUserJobAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php
index a0277a37b..b7b8b6330 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php
@@ -34,7 +34,7 @@ class ByUserScopeAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php
index 816af5771..206aa5232 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php
@@ -44,7 +44,7 @@ final readonly class ListAsideActivity implements ListInterface, GroupedExportIn
private TranslatableStringHelperInterface $translatableStringHelper,
) {}
- public function buildForm(FormBuilderInterface $builder) {}
+ public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php
index bfb8fe0b1..37f1e3c33 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php
@@ -35,7 +35,7 @@ class ByActivityTypeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->in('aside.type', ':types');
@@ -48,7 +48,7 @@ class ByActivityTypeFilter implements FilterInterface
return Declarations::ASIDE_ACTIVITY_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('types', EntityType::class, [
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php
index b8d77d942..c3a41a450 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php
@@ -29,7 +29,7 @@ class ByDateFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->between(
'aside.date',
@@ -53,7 +53,7 @@ class ByDateFilter implements FilterInterface
return Declarations::ASIDE_ACTIVITY_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_from', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php
index 8dd1a8eac..d915f62dc 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php
@@ -27,7 +27,7 @@ class ByUserFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->in('aside.agent', ':users');
@@ -41,7 +41,7 @@ class ByUserFilter implements FilterInterface
return Declarations::ASIDE_ACTIVITY_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_users', PickUserDynamicType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php
index 551e91cd8..c6bb3603f 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php
@@ -37,7 +37,7 @@ class ByUserJobFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ class ByUserJobFilter implements FilterInterface
return Declarations::ASIDE_ACTIVITY_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('jobs', EntityType::class, [
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php
index 5257495aa..66ea4316d 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php
@@ -37,7 +37,7 @@ class ByUserScopeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ class ByUserScopeFilter implements FilterInterface
return Declarations::ASIDE_ACTIVITY_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('scopes', EntityType::class, [
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php
index 3a69be137..ea6de4cb1 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php
@@ -24,7 +24,7 @@ final class AsideActivityCategoryType extends AbstractType
{
public function __construct(private readonly CategoryRender $categoryRender) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add(
'title',
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php
index d6fcb821c..1d51259a4 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityFormType.php
@@ -36,7 +36,7 @@ final class AsideActivityFormType extends AbstractType
$this->timeChoices = $parameterBag->get('chill_aside_activity.form.time_duration');
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$timeChoices = [];
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/Type/PickAsideActivityCategoryType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/Type/PickAsideActivityCategoryType.php
index 23923fb6c..8dd7cdff3 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Form/Type/PickAsideActivityCategoryType.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Form/Type/PickAsideActivityCategoryType.php
@@ -22,7 +22,7 @@ final class PickAsideActivityCategoryType extends AbstractType
{
public function __construct(private readonly CategoryRender $categoryRender) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php b/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php
index 43a37e068..a6772eeb9 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php
@@ -18,7 +18,7 @@ final readonly class AdminMenuBuilder implements \Chill\MainBundle\Routing\Local
{
public function __construct(private Security $security) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
// all the entries below must have ROLE_ADMIN permissions
if (!$this->security->isGranted('ROLE_ADMIN')) {
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php b/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php
index a32d52303..13237ddf6 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php
@@ -23,7 +23,7 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(protected TranslatorInterface $translator, public AuthorizationCheckerInterface $authorizationChecker) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if ($this->authorizationChecker->isGranted('ROLE_USER')) {
$menu->addChild($this->translator->trans('Create an aside activity'), [
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php b/src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php
index 540b1264a..d5bf1934d 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Menu/UserMenuBuilder.php
@@ -52,7 +52,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if ($this->authorizationChecker->isGranted('ROLE_USER')) {
$menu->addChild('My aside activities', [
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Security/AsideActivityVoter.php b/src/Bundle/ChillAsideActivityBundle/src/Security/AsideActivityVoter.php
index 7fe56e5e4..55f63a8ab 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Security/AsideActivityVoter.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Security/AsideActivityVoter.php
@@ -58,7 +58,7 @@ class AsideActivityVoter extends AbstractChillVoter implements ProvideRoleHierar
return $this->getAttributes();
}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
return $this->voterHelper->supports($attribute, $subject);
}
diff --git a/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php b/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php
index 21e78e6cf..5186f8af2 100644
--- a/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php
+++ b/src/Bundle/ChillAsideActivityBundle/src/Tests/Controller/AsideActivityControllerTest.php
@@ -61,7 +61,7 @@ final class AsideActivityControllerTest extends WebTestCase
/**
* @dataProvider generateAsideActivityId
*/
- public function testEditWithoutUsers(int $asideActivityId)
+ public function testEditWithoutUsers(int $asideActivityId): void
{
self::ensureKernelShutdown();
$client = $this->getClientAuthenticated();
@@ -70,7 +70,7 @@ final class AsideActivityControllerTest extends WebTestCase
$this->assertEquals(200, $client->getResponse()->getStatusCode());
}
- public function testIndexWithoutUsers()
+ public function testIndexWithoutUsers(): void
{
self::ensureKernelShutdown();
$client = $this->getClientAuthenticated();
@@ -79,7 +79,7 @@ final class AsideActivityControllerTest extends WebTestCase
$this->assertEquals(200, $client->getResponse()->getStatusCode());
}
- public function testNewWithoutUsers()
+ public function testNewWithoutUsers(): void
{
self::ensureKernelShutdown();
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php
index 477f23189..12ca2f454 100644
--- a/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php
+++ b/src/Bundle/ChillBudgetBundle/Calculator/CalculatorManager.php
@@ -26,7 +26,7 @@ class CalculatorManager
*/
private array $defaultCalculator = [];
- public function addCalculator(CalculatorInterface $calculator, bool $default)
+ public function addCalculator(CalculatorInterface $calculator, bool $default): void
{
$this->calculators[$calculator->getAlias()] = $calculator;
diff --git a/src/Bundle/ChillBudgetBundle/ChillBudgetBundle.php b/src/Bundle/ChillBudgetBundle/ChillBudgetBundle.php
index 71f6a7076..6e25e98ad 100644
--- a/src/Bundle/ChillBudgetBundle/ChillBudgetBundle.php
+++ b/src/Bundle/ChillBudgetBundle/ChillBudgetBundle.php
@@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillBudgetBundle extends Bundle
{
- public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container): void
{
parent::build($container);
diff --git a/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php b/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php
index bb204c557..683aa7d32 100644
--- a/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php
+++ b/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php
@@ -60,7 +60,7 @@ abstract class AbstractElementController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$this->chillMainLogger->notice('A budget element has been removed', [
'family_element' => $element::class,
- 'by_user' => $this->getUser()->getUsername(),
+ 'by_user' => $this->getUser()->getUserIdentifier(),
'family_member_id' => $element->getId(),
'amount' => $element->getAmount(),
'type' => $element->getType(),
diff --git a/src/Bundle/ChillBudgetBundle/Controller/Admin/AdminController.php b/src/Bundle/ChillBudgetBundle/Controller/Admin/AdminController.php
index 3bb696757..0ddb1e370 100644
--- a/src/Bundle/ChillBudgetBundle/Controller/Admin/AdminController.php
+++ b/src/Bundle/ChillBudgetBundle/Controller/Admin/AdminController.php
@@ -17,7 +17,7 @@ use Symfony\Component\Routing\Annotation\Route;
class AdminController extends AbstractController
{
#[Route(path: '/{_locale}/admin/budget', name: 'chill_admin_budget')]
- public function indexAdminAction()
+ public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillBudget/Admin/index.html.twig');
}
diff --git a/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php b/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php
index 480e2c645..96fd1dc5a 100644
--- a/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php
+++ b/src/Bundle/ChillBudgetBundle/Controller/ChargeController.php
@@ -23,7 +23,7 @@ class ChargeController extends AbstractElementController
* @return \Symfony\Component\HttpFoundation\Response
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/charge/{id}/delete', name: 'chill_budget_charge_delete')]
- public function deleteAction(Request $request, Charge $charge)
+ public function deleteAction(Request $request, Charge $charge): \Symfony\Component\HttpFoundation\Response
{
return $this->_delete(
$charge,
@@ -37,7 +37,7 @@ class ChargeController extends AbstractElementController
* @return \Symfony\Component\HttpFoundation\Response
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/charge/{id}/edit', name: 'chill_budget_charge_edit')]
- public function editAction(Request $request, Charge $charge)
+ public function editAction(Request $request, Charge $charge): \Symfony\Component\HttpFoundation\Response
{
return $this->_edit(
$charge,
@@ -84,7 +84,7 @@ class ChargeController extends AbstractElementController
return $this->_view($charge, '@ChillBudget/Charge/view.html.twig');
}
- protected function createNewElement()
+ protected function createNewElement(): \Chill\BudgetBundle\Entity\Charge
{
return new Charge();
}
diff --git a/src/Bundle/ChillBudgetBundle/Controller/ElementController.php b/src/Bundle/ChillBudgetBundle/Controller/ElementController.php
index 48f86dedd..9beab1ba7 100644
--- a/src/Bundle/ChillBudgetBundle/Controller/ElementController.php
+++ b/src/Bundle/ChillBudgetBundle/Controller/ElementController.php
@@ -24,7 +24,7 @@ class ElementController extends AbstractController
public function __construct(private readonly CalculatorManager $calculator, private readonly ResourceRepository $resourceRepository, private readonly ChargeRepository $chargeRepository) {}
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/elements/by-person/{id}', name: 'chill_budget_elements_index')]
- public function indexAction(Person $person)
+ public function indexAction(Person $person): \Symfony\Component\HttpFoundation\Response
{
$this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $person);
@@ -46,7 +46,7 @@ class ElementController extends AbstractController
}
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/elements/by-household/{id}', name: 'chill_budget_elements_household_index')]
- public function indexHouseholdAction(Household $household)
+ public function indexHouseholdAction(Household $household): \Symfony\Component\HttpFoundation\Response
{
$this->denyAccessUnlessGranted(BudgetElementVoter::SEE, $household);
diff --git a/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php b/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php
index fd9dc9f63..81e4aa070 100644
--- a/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php
+++ b/src/Bundle/ChillBudgetBundle/Controller/ResourceController.php
@@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Response;
class ResourceController extends AbstractElementController
{
#[\Symfony\Component\Routing\Annotation\Route(path: '{_locale}/budget/resource/{id}/delete', name: 'chill_budget_resource_delete')]
- public function deleteAction(Request $request, Resource $resource)
+ public function deleteAction(Request $request, Resource $resource): \Symfony\Component\HttpFoundation\Response
{
return $this->_delete(
$resource,
@@ -76,7 +76,7 @@ class ResourceController extends AbstractElementController
return $this->_view($resource, '@ChillBudget/Resource/view.html.twig');
}
- protected function createNewElement()
+ protected function createNewElement(): \Chill\BudgetBundle\Entity\Resource
{
return new Resource();
}
diff --git a/src/Bundle/ChillBudgetBundle/DependencyInjection/ChillBudgetExtension.php b/src/Bundle/ChillBudgetBundle/DependencyInjection/ChillBudgetExtension.php
index 6a8842b64..f93842eae 100644
--- a/src/Bundle/ChillBudgetBundle/DependencyInjection/ChillBudgetExtension.php
+++ b/src/Bundle/ChillBudgetBundle/DependencyInjection/ChillBudgetExtension.php
@@ -29,7 +29,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillBudgetExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = $this->getConfiguration($configs, $container);
$config = $this->processConfiguration($configuration, $configs);
@@ -48,7 +48,7 @@ class ChillBudgetExtension extends Extension implements PrependExtensionInterfac
$this->storeConfig('charges', $config, $container);
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->prependAuthorization($container);
$this->prependRoutes($container);
@@ -58,7 +58,7 @@ class ChillBudgetExtension extends Extension implements PrependExtensionInterfac
/** (non-PHPdoc).
* @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend()
*/
- public function prependRoutes(ContainerBuilder $container)
+ public function prependRoutes(ContainerBuilder $container): void
{
// add routes for custom bundle
$container->prependExtensionConfig('chill_main', [
diff --git a/src/Bundle/ChillBudgetBundle/DependencyInjection/Compiler/CalculatorCompilerPass.php b/src/Bundle/ChillBudgetBundle/DependencyInjection/Compiler/CalculatorCompilerPass.php
index 012c4eab5..29cfb9047 100644
--- a/src/Bundle/ChillBudgetBundle/DependencyInjection/Compiler/CalculatorCompilerPass.php
+++ b/src/Bundle/ChillBudgetBundle/DependencyInjection/Compiler/CalculatorCompilerPass.php
@@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\Reference;
class CalculatorCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$manager = $container->getDefinition(\Chill\BudgetBundle\Calculator\CalculatorManager::class);
diff --git a/src/Bundle/ChillBudgetBundle/Entity/Charge.php b/src/Bundle/ChillBudgetBundle/Entity/Charge.php
index b4b2918c9..3ede15a26 100644
--- a/src/Bundle/ChillBudgetBundle/Entity/Charge.php
+++ b/src/Bundle/ChillBudgetBundle/Entity/Charge.php
@@ -68,7 +68,7 @@ class Charge extends AbstractElement implements HasCentersInterface
return $this->charge;
}
- public function getHelp()
+ public function getHelp(): ?string
{
return $this->help;
}
@@ -78,7 +78,7 @@ class Charge extends AbstractElement implements HasCentersInterface
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
diff --git a/src/Bundle/ChillBudgetBundle/Entity/Resource.php b/src/Bundle/ChillBudgetBundle/Entity/Resource.php
index 14fa0c9fa..67ee82b55 100644
--- a/src/Bundle/ChillBudgetBundle/Entity/Resource.php
+++ b/src/Bundle/ChillBudgetBundle/Entity/Resource.php
@@ -50,7 +50,7 @@ class Resource extends AbstractElement implements HasCentersInterface
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
diff --git a/src/Bundle/ChillBudgetBundle/Form/Admin/ChargeKindType.php b/src/Bundle/ChillBudgetBundle/Form/Admin/ChargeKindType.php
index c3c2a66bf..4dddc6924 100644
--- a/src/Bundle/ChillBudgetBundle/Form/Admin/ChargeKindType.php
+++ b/src/Bundle/ChillBudgetBundle/Form/Admin/ChargeKindType.php
@@ -22,7 +22,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class ChargeKindType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class, [
@@ -39,7 +39,7 @@ class ChargeKindType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', ChargeKind::class);
diff --git a/src/Bundle/ChillBudgetBundle/Form/Admin/ResourceKindType.php b/src/Bundle/ChillBudgetBundle/Form/Admin/ResourceKindType.php
index 41d3a8b53..b49563f53 100644
--- a/src/Bundle/ChillBudgetBundle/Form/Admin/ResourceKindType.php
+++ b/src/Bundle/ChillBudgetBundle/Form/Admin/ResourceKindType.php
@@ -22,7 +22,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class ResourceKindType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class, [
@@ -39,7 +39,7 @@ class ResourceKindType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', ResourceKind::class);
diff --git a/src/Bundle/ChillBudgetBundle/Form/ChargeType.php b/src/Bundle/ChillBudgetBundle/Form/ChargeType.php
index 2d219b62a..ce38a94b3 100644
--- a/src/Bundle/ChillBudgetBundle/Form/ChargeType.php
+++ b/src/Bundle/ChillBudgetBundle/Form/ChargeType.php
@@ -29,7 +29,7 @@ class ChargeType extends AbstractType
{
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ChargeKindRepository $repository, private readonly TranslatorInterface $translator) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('charge', EntityType::class, [
@@ -74,7 +74,7 @@ class ChargeType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Charge::class,
@@ -89,7 +89,7 @@ class ChargeType extends AbstractType
->setAllowedTypes('show_help', 'boolean');
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_budgetbundle_charge';
}
diff --git a/src/Bundle/ChillBudgetBundle/Form/ResourceType.php b/src/Bundle/ChillBudgetBundle/Form/ResourceType.php
index ba93f1080..ecbbe219e 100644
--- a/src/Bundle/ChillBudgetBundle/Form/ResourceType.php
+++ b/src/Bundle/ChillBudgetBundle/Form/ResourceType.php
@@ -28,7 +28,7 @@ class ResourceType extends AbstractType
{
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ResourceKindRepository $repository, private readonly TranslatorInterface $translator) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('resource', EntityType::class, [
@@ -59,7 +59,7 @@ class ResourceType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Resource::class,
@@ -72,7 +72,7 @@ class ResourceType extends AbstractType
->setAllowedTypes('show_end_date', 'boolean');
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_budgetbundle_resource';
}
diff --git a/src/Bundle/ChillBudgetBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillBudgetBundle/Menu/AdminMenuBuilder.php
index b8b4b617c..7c523b159 100644
--- a/src/Bundle/ChillBudgetBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillBudgetBundle/Menu/AdminMenuBuilder.php
@@ -19,7 +19,7 @@ final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private Security $security) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
// all the entries below must have ROLE_ADMIN permissions
if (!$this->security->isGranted('ROLE_ADMIN')) {
diff --git a/src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php b/src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php
index af9cf8280..465fa9e63 100644
--- a/src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php
+++ b/src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php
@@ -22,7 +22,7 @@ final readonly class HouseholdMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private Security $security, private TranslatorInterface $translator) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
/** @var Household $household */
$household = $parameters['household'];
diff --git a/src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php
index 25bd6a218..b97888e00 100644
--- a/src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php
+++ b/src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php
@@ -22,7 +22,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
/** @var Person $person */
$person = $parameters['person'];
diff --git a/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php b/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php
index ceb3874e1..405bcb2fa 100644
--- a/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php
+++ b/src/Bundle/ChillBudgetBundle/Security/Authorization/BudgetElementVoter.php
@@ -64,12 +64,12 @@ class BudgetElementVoter extends Voter implements ProvideRoleHierarchyInterface
return self::ROLES;
}
- protected function supports($attribute, $subject)
+ protected function supports(string $attribute, mixed $subject): bool
{
return $this->voter->supports($attribute, $subject);
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
if (
$subject instanceof Person
diff --git a/src/Bundle/ChillBudgetBundle/Tests/Controller/ElementControllerTest.php b/src/Bundle/ChillBudgetBundle/Tests/Controller/ElementControllerTest.php
index 52fae812e..aafd299f1 100644
--- a/src/Bundle/ChillBudgetBundle/Tests/Controller/ElementControllerTest.php
+++ b/src/Bundle/ChillBudgetBundle/Tests/Controller/ElementControllerTest.php
@@ -23,7 +23,7 @@ final class ElementControllerTest extends WebTestCase
/**
* @doesNotPerformAssertions
*/
- public function testIndex()
+ public function testIndex(): void
{
$client = self::createClient();
@@ -33,7 +33,7 @@ final class ElementControllerTest extends WebTestCase
/**
* @doesNotPerformAssertions
*/
- public function testList()
+ public function testList(): void
{
$client = self::createClient();
diff --git a/src/Bundle/ChillBudgetBundle/migrations/Version20221207105407.php b/src/Bundle/ChillBudgetBundle/migrations/Version20221207105407.php
index cfe3a0089..5d9a583b8 100644
--- a/src/Bundle/ChillBudgetBundle/migrations/Version20221207105407.php
+++ b/src/Bundle/ChillBudgetBundle/migrations/Version20221207105407.php
@@ -32,7 +32,7 @@ final class Version20221207105407 extends AbstractMigration implements Container
return 'Use new budget admin entities';
}
- public function setContainer(?ContainerInterface $container = null)
+ public function setContainer(?ContainerInterface $container = null): void
{
$this->container = $container;
}
diff --git a/src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php b/src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php
index f0f20181a..658f0ace4 100644
--- a/src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php
+++ b/src/Bundle/ChillCalendarBundle/ChillCalendarBundle.php
@@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillCalendarBundle extends Bundle
{
- public function build(ContainerBuilder $container)
+ public function build(ContainerBuilder $container): void
{
parent::build($container);
diff --git a/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php b/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php
index ae4205c38..1549def35 100644
--- a/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php
+++ b/src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php
@@ -30,6 +30,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
+#[\Symfony\Component\Console\Attribute\AsCommand]
final class MapAndSubscribeUserCalendarCommand extends Command
{
protected static $defaultDescription = 'MSGraph: collect user metadata and create subscription on events for users, and sync the user absence-presence';
@@ -156,7 +157,7 @@ final class MapAndSubscribeUserCalendarCommand extends Command
return Command::SUCCESS;
}
- protected function configure()
+ protected function configure(): void
{
parent::configure();
diff --git a/src/Bundle/ChillCalendarBundle/Command/SendTestShortMessageOnCalendarCommand.php b/src/Bundle/ChillCalendarBundle/Command/SendTestShortMessageOnCalendarCommand.php
index 34e20346b..8eb3111f1 100644
--- a/src/Bundle/ChillCalendarBundle/Command/SendTestShortMessageOnCalendarCommand.php
+++ b/src/Bundle/ChillCalendarBundle/Command/SendTestShortMessageOnCalendarCommand.php
@@ -36,6 +36,7 @@ use Symfony\Component\Console\Question\ConfirmationQuestion;
use Symfony\Component\Console\Question\Question;
use Symfony\Component\Notifier\TexterInterface;
+#[\Symfony\Component\Console\Attribute\AsCommand]
class SendTestShortMessageOnCalendarCommand extends Command
{
protected static $defaultDescription = 'Test sending a SMS for a dummy calendar appointment';
diff --git a/src/Bundle/ChillCalendarBundle/Controller/AdminController.php b/src/Bundle/ChillCalendarBundle/Controller/AdminController.php
index 0ba21c94f..6bae05179 100644
--- a/src/Bundle/ChillCalendarBundle/Controller/AdminController.php
+++ b/src/Bundle/ChillCalendarBundle/Controller/AdminController.php
@@ -20,7 +20,7 @@ class AdminController extends AbstractController
* Calendar admin.
*/
#[Route(path: '/{_locale}/admin/calendar', name: 'chill_calendar_admin_index')]
- public function indexAdminAction()
+ public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillCalendar/Admin/index.html.twig');
}
diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php
index 94db03b1f..734f6fc00 100644
--- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php
+++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php
@@ -89,7 +89,7 @@ class CalendarController extends AbstractController
if ($form->isValid()) {
$this->logger->notice('A calendar event has been removed', [
- 'by_user' => $this->getUser()->getUsername(),
+ 'by_user' => $this->getUser()->getUserIdentifier(),
'calendar_id' => $entity->getId(),
]);
diff --git a/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php b/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php
index 5aa8d8507..8eed040fc 100644
--- a/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php
+++ b/src/Bundle/ChillCalendarBundle/DependencyInjection/ChillCalendarExtension.php
@@ -26,7 +26,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillCalendarExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -49,14 +49,14 @@ class ChillCalendarExtension extends Extension implements PrependExtensionInterf
}
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->preprendRoutes($container);
$this->prependCruds($container);
$this->prependRoleHierarchy($container);
}
- private function prependCruds(ContainerBuilder $container)
+ private function prependCruds(ContainerBuilder $container): void
{
$container->prependExtensionConfig('chill_main', [
'cruds' => [
@@ -143,7 +143,7 @@ class ChillCalendarExtension extends Extension implements PrependExtensionInterf
]);
}
- private function preprendRoutes(ContainerBuilder $container)
+ private function preprendRoutes(ContainerBuilder $container): void
{
$container->prependExtensionConfig('chill_main', [
'routing' => [
diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php
index 5e2091fac..96cf3cee4 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php
@@ -27,7 +27,7 @@ final readonly class AgentAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('caluser', $qb->getAllAliases(), true)) {
$qb->join('cal.mainUser', 'caluser');
@@ -42,7 +42,7 @@ final readonly class AgentAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php
index 7c84653d2..8a2e66112 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php
@@ -27,7 +27,7 @@ class CancelReasonAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
// TODO: still needs to take into account calendars without a cancel reason somehow
if (!\in_array('calcancel', $qb->getAllAliases(), true)) {
@@ -43,7 +43,7 @@ class CancelReasonAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php
index 1182ea374..d05fe736c 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php
@@ -34,7 +34,7 @@ final readonly class JobAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ final readonly class JobAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder) {}
+ public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{
diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php
index 6481f95b4..53209f648 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php
@@ -26,7 +26,7 @@ final readonly class LocationAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('calloc', $qb->getAllAliases(), true)) {
$qb->join('cal.location', 'calloc');
@@ -40,7 +40,7 @@ final readonly class LocationAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php
index be9406cfa..c975c03d3 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php
@@ -27,7 +27,7 @@ final readonly class LocationTypeAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('calloc', $qb->getAllAliases(), true)) {
$qb->join('cal.location', 'calloc');
@@ -42,7 +42,7 @@ final readonly class LocationTypeAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php
index 6bf65b8ef..8b4ab3753 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php
@@ -23,7 +23,7 @@ class MonthYearAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->addSelect("to_char(cal.startDate, 'MM-YYYY') AS month_year_aggregator");
// $qb->addSelect("extract(month from age(cal.startDate, cal.endDate)) AS month_aggregator");
@@ -35,7 +35,7 @@ class MonthYearAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// No form needed
}
diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php
index ff24baa8c..d20578370 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php
@@ -34,7 +34,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder) {}
+ public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{
diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php
index e9213d3cb..cb48441fc 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php
@@ -33,7 +33,7 @@ class UrgencyAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->addSelect('cal.urgent AS urgency_aggregator');
$qb->addGroupBy('urgency_aggregator');
@@ -44,7 +44,7 @@ class UrgencyAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form
}
diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php b/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php
index f643eaa68..75afe8bbc 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php
@@ -29,7 +29,7 @@ class CountCalendars implements ExportInterface, GroupedExportInterface
private readonly CalendarRepository $calendarRepository,
) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// No form necessary
}
diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php
index c16c148fc..9e75dd59e 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php
@@ -29,7 +29,7 @@ class AgentFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->in('cal.mainUser', ':agents');
@@ -49,7 +49,7 @@ class AgentFilter implements FilterInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_agents', EntityType::class, [
'class' => User::class,
diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php
index 90a004388..4326a7acb 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php
@@ -28,7 +28,7 @@ class BetweenDatesFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->andX(
$qb->expr()->gte('cal.startDate', ':dateFrom'),
@@ -52,7 +52,7 @@ class BetweenDatesFilter implements FilterInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_from', PickRollingDateType::class, [])
diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php
index 63149509f..1cc86e2c1 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php
@@ -41,7 +41,7 @@ class CalendarRangeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (null !== $data['hasCalendarRange']) {
$qb->andWhere($qb->expr()->isNotNull('cal.calendarRange'));
@@ -55,7 +55,7 @@ class CalendarRangeFilter implements FilterInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('hasCalendarRange', ChoiceType::class, [
'choices' => self::CHOICES,
diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php
index 3c87397e4..d6b3a9fea 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php
@@ -36,7 +36,7 @@ final readonly class JobFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -70,7 +70,7 @@ final readonly class JobFilter implements FilterInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('job', EntityType::class, [
diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php
index 3a1c5a35a..6d6268aa5 100644
--- a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php
+++ b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php
@@ -38,7 +38,7 @@ class ScopeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -72,7 +72,7 @@ class ScopeFilter implements FilterInterface
return Declarations::CALENDAR_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('scope', EntityType::class, [
diff --git a/src/Bundle/ChillCalendarBundle/Form/CalendarDocCreateType.php b/src/Bundle/ChillCalendarBundle/Form/CalendarDocCreateType.php
index b77886097..fea81b4d7 100644
--- a/src/Bundle/ChillCalendarBundle/Form/CalendarDocCreateType.php
+++ b/src/Bundle/ChillCalendarBundle/Form/CalendarDocCreateType.php
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class CalendarDocCreateType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TextType::class, [
@@ -33,7 +33,7 @@ class CalendarDocCreateType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => CalendarDocCreateDTO::class,
diff --git a/src/Bundle/ChillCalendarBundle/Form/CalendarDocEditType.php b/src/Bundle/ChillCalendarBundle/Form/CalendarDocEditType.php
index 224a74f01..ad6a227de 100644
--- a/src/Bundle/ChillCalendarBundle/Form/CalendarDocEditType.php
+++ b/src/Bundle/ChillCalendarBundle/Form/CalendarDocEditType.php
@@ -19,7 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class CalendarDocEditType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TextType::class, [
@@ -28,7 +28,7 @@ class CalendarDocEditType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => CalendarDocEditDTO::class,
diff --git a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php
index eb1e1b5f2..f08305ccd 100644
--- a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php
+++ b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php
@@ -40,7 +40,7 @@ class CalendarType extends AbstractType
private readonly IdToCalendarRangeDataTransformer $calendarRangeDataTransformer,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('comment', CommentType::class, [
@@ -131,14 +131,14 @@ class CalendarType extends AbstractType
->addModelTransformer($this->idToLocationDataTransformer);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Calendar::class,
]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
// as the js share some hardcoded items from activity, we have to rewrite block prefix
return 'chill_activitybundle_activity';
diff --git a/src/Bundle/ChillCalendarBundle/Form/CancelReasonType.php b/src/Bundle/ChillCalendarBundle/Form/CancelReasonType.php
index c0ac4ddb0..7d48c14e9 100644
--- a/src/Bundle/ChillCalendarBundle/Form/CancelReasonType.php
+++ b/src/Bundle/ChillCalendarBundle/Form/CancelReasonType.php
@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class CancelReasonType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
@@ -31,7 +31,7 @@ class CancelReasonType extends AbstractType
->add('canceledBy', TextType::class);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', CancelReason::class);
diff --git a/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php
index 6dd5bfa52..976e6dc2a 100644
--- a/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php
+++ b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php
@@ -21,7 +21,7 @@ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly Security $security, protected TranslatorInterface $translator) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
$period = $parameters['accompanyingCourse'];
diff --git a/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseQuickMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseQuickMenuBuilder.php
index cfca6813f..1c8f05c72 100644
--- a/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseQuickMenuBuilder.php
+++ b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseQuickMenuBuilder.php
@@ -25,7 +25,7 @@ final readonly class AccompanyingCourseQuickMenuBuilder implements LocalMenuBuil
return ['accompanying_course_quick_menu'];
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
/** @var \Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingCourse */
$accompanyingCourse = $parameters['accompanying-course'];
diff --git a/src/Bundle/ChillCalendarBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/AdminMenuBuilder.php
index 1658029a7..d63fe47c4 100644
--- a/src/Bundle/ChillCalendarBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillCalendarBundle/Menu/AdminMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillCalendarBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/PersonMenuBuilder.php
index e92a72bb7..bcda16b48 100644
--- a/src/Bundle/ChillCalendarBundle/Menu/PersonMenuBuilder.php
+++ b/src/Bundle/ChillCalendarBundle/Menu/PersonMenuBuilder.php
@@ -21,7 +21,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly Security $security, protected TranslatorInterface $translator) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
$person = $parameters['person'];
diff --git a/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php
index 3a062f7b8..5a48a4582 100644
--- a/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php
+++ b/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php
@@ -20,7 +20,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly Security $security, public TranslatorInterface $translator) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if ($this->security->isGranted('ROLE_USER')) {
$menu->addChild('My calendar list', [
diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeRemoveToRemoteHandler.php b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeRemoveToRemoteHandler.php
index 7749d503c..95cbdc41c 100644
--- a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeRemoveToRemoteHandler.php
+++ b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeRemoveToRemoteHandler.php
@@ -33,7 +33,7 @@ class CalendarRangeRemoveToRemoteHandler implements MessageHandlerInterface
{
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository) {}
- public function __invoke(CalendarRangeRemovedMessage $calendarRangeRemovedMessage)
+ public function __invoke(CalendarRangeRemovedMessage $calendarRangeRemovedMessage): void
{
$this->remoteCalendarConnector->removeCalendarRange(
$calendarRangeRemovedMessage->getRemoteId(),
diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRemoveHandler.php b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRemoveHandler.php
index 73e8a0c37..0cd7d6809 100644
--- a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRemoveHandler.php
+++ b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRemoveHandler.php
@@ -33,7 +33,7 @@ class CalendarRemoveHandler implements MessageHandlerInterface
{
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository) {}
- public function __invoke(CalendarRemovedMessage $message)
+ public function __invoke(CalendarRemovedMessage $message): void
{
if (null !== $message->getAssociatedCalendarRangeId()) {
$associatedRange = $this->calendarRangeRepository->find($message->getAssociatedCalendarRangeId());
diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarToRemoteHandler.php b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarToRemoteHandler.php
index 6a1388d2e..df85f9150 100644
--- a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarToRemoteHandler.php
+++ b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarToRemoteHandler.php
@@ -39,7 +39,7 @@ class CalendarToRemoteHandler implements MessageHandlerInterface
{
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $entityManager, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $calendarConnector, private readonly UserRepository $userRepository) {}
- public function __invoke(CalendarMessage $calendarMessage)
+ public function __invoke(CalendarMessage $calendarMessage): void
{
$calendar = $this->calendarRepository->find($calendarMessage->getCalendarId());
diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineHttpClient.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineHttpClient.php
index f84d04120..6de6870c9 100644
--- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineHttpClient.php
+++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineHttpClient.php
@@ -72,4 +72,9 @@ class MachineHttpClient implements HttpClientInterface
{
return $this->decoratedClient->stream($responses, $timeout);
}
+
+ public function withOptions(array $options): static
+ {
+ return $this;
+ }
}
diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/DependencyInjection/RemoteCalendarCompilerPass.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/DependencyInjection/RemoteCalendarCompilerPass.php
index c52fc2866..8c5a709ff 100644
--- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/DependencyInjection/RemoteCalendarCompilerPass.php
+++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/DependencyInjection/RemoteCalendarCompilerPass.php
@@ -35,7 +35,7 @@ use TheNetworg\OAuth2\Client\Provider\Azure;
class RemoteCalendarCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$config = $container->getParameter('chill_calendar');
diff --git a/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/BulkCalendarShortMessageSender.php b/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/BulkCalendarShortMessageSender.php
index 7053d905a..82420e504 100644
--- a/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/BulkCalendarShortMessageSender.php
+++ b/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/BulkCalendarShortMessageSender.php
@@ -33,7 +33,7 @@ class BulkCalendarShortMessageSender
private readonly ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder,
) {}
- public function sendBulkMessageToEligibleCalendars()
+ public function sendBulkMessageToEligibleCalendars(): void
{
$countCalendars = 0;
$countSms = 0;
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php b/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php
index ef2597367..b365c76c7 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Controller/CalendarControllerTest.php
@@ -86,7 +86,7 @@ final class CalendarControllerTest extends WebTestCase
/**
* @dataProvider provideAccompanyingPeriod
*/
- public function testList(int $accompanyingPeriodId)
+ public function testList(int $accompanyingPeriodId): void
{
$this->client->request(
Request::METHOD_GET,
@@ -99,7 +99,7 @@ final class CalendarControllerTest extends WebTestCase
/**
* @dataProvider provideAccompanyingPeriod
*/
- public function testNew(int $accompanyingPeriodId)
+ public function testNew(int $accompanyingPeriodId): void
{
$this->client->request(
Request::METHOD_GET,
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Entity/CalendarTest.php b/src/Bundle/ChillCalendarBundle/Tests/Entity/CalendarTest.php
index 1cedea31c..fccc08c9c 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Entity/CalendarTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Entity/CalendarTest.php
@@ -29,7 +29,7 @@ use PHPUnit\Framework\TestCase;
*/
final class CalendarTest extends TestCase
{
- public function testAddUser()
+ public function testAddUser(): void
{
$calendar = new Calendar();
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php
index 0a69efa83..8efe9203b 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/AgentAggregatorTest.php
@@ -39,7 +39,7 @@ final class AgentAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.calendar.export.agent_aggregator');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\AgentAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php
index 8257425ce..9637ae9d7 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/CancelReasonAggregatorTest.php
@@ -39,7 +39,7 @@ final class CancelReasonAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.calendar.export.cancel_reason_aggregator');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\CancelReasonAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php
index 064939cf0..bc7ae8be3 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/JobAggregatorTest.php
@@ -39,7 +39,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.calendar.export.job_aggregator');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\JobAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php
index 7fa4045fd..04b398118 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationAggregatorTest.php
@@ -39,7 +39,7 @@ final class LocationAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_aggregator');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\LocationAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php
index 341b1df9d..2c101e72e 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/LocationTypeAggregatorTest.php
@@ -39,7 +39,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_type_aggregator');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\LocationTypeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php
index 6a3cd36b3..2732b9c87 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/MonthYearAggregatorTest.php
@@ -39,7 +39,7 @@ final class MonthYearAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.calendar.export.month_aggregator');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\MonthYearAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php
index 05d68356d..d19764cec 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Aggregator/ScopeAggregatorTest.php
@@ -39,7 +39,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.calendar.export.scope_aggregator');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\ScopeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php
index 755526b6d..f37fad367 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/AgentFilterTest.php
@@ -46,7 +46,7 @@ final class AgentFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.calendar.export.agent_filter');
}
- public function getFilter()
+ public function getFilter(): \Chill\CalendarBundle\Export\Filter\AgentFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php
index ab09c2672..24fdbe138 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/BetweenDatesFilterTest.php
@@ -46,7 +46,7 @@ final class BetweenDatesFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.calendar.export.between_dates_filter');
}
- public function getFilter()
+ public function getFilter(): \Chill\CalendarBundle\Export\Filter\BetweenDatesFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php
index 758b8ccbc..e27df1f5f 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/JobFilterTest.php
@@ -47,7 +47,7 @@ final class JobFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.calendar.export.job_filter');
}
- public function getFilter()
+ public function getFilter(): \Chill\CalendarBundle\Export\Filter\JobFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php
index 623f8f3f0..0052a8024 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Export/Filter/ScopeFilterTest.php
@@ -47,7 +47,7 @@ final class ScopeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.calendar.export.scope_filter');
}
- public function getFilter()
+ public function getFilter(): \Chill\CalendarBundle\Export\Filter\ScopeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Form/CalendarTypeTest.php b/src/Bundle/ChillCalendarBundle/Tests/Form/CalendarTypeTest.php
index 83366c848..2a7928bfe 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Form/CalendarTypeTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Form/CalendarTypeTest.php
@@ -84,7 +84,7 @@ final class CalendarTypeTest extends TypeTestCase
parent::setUp();
}
- public function testSubmitValidData()
+ public function testSubmitValidData(): void
{
$formData = [
'mainUser' => '1',
diff --git a/src/Bundle/ChillCalendarBundle/Tests/RemoteCalendar/Connector/MSGraph/AddressConverterTest.php b/src/Bundle/ChillCalendarBundle/Tests/RemoteCalendar/Connector/MSGraph/AddressConverterTest.php
index eca929875..7d9177699 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/RemoteCalendar/Connector/MSGraph/AddressConverterTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/RemoteCalendar/Connector/MSGraph/AddressConverterTest.php
@@ -37,7 +37,7 @@ final class AddressConverterTest extends TestCase
{
use ProphecyTrait;
- public function testConvertAddress()
+ public function testConvertAddress(): void
{
$country = (new Country())->setName(['fr' => 'Belgique']);
$postalCode = (new PostalCode())->setName('Houte-Si-Plout')->setCode('4122')
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Repository/CalendarACLAwareRepositoryTest.php b/src/Bundle/ChillCalendarBundle/Tests/Repository/CalendarACLAwareRepositoryTest.php
index 590ff8d8e..ad3d0cc28 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Repository/CalendarACLAwareRepositoryTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Repository/CalendarACLAwareRepositoryTest.php
@@ -39,7 +39,7 @@ final class CalendarACLAwareRepositoryTest extends KernelTestCase
$this->entityManager = self::getContainer()->get(EntityManagerInterface::class);
}
- public function testCountByPerosn()
+ public function testCountByPerosn(): void
{
$person = $this->getRandomPerson($this->entityManager);
@@ -59,7 +59,7 @@ final class CalendarACLAwareRepositoryTest extends KernelTestCase
/**
* Test that the query does not throw any error.
*/
- public function testFindByPerson()
+ public function testFindByPerson(): void
{
$person = $this->getRandomPerson($this->entityManager);
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Serializer/Normalizer/CalendarNormalizerTest.php b/src/Bundle/ChillCalendarBundle/Tests/Serializer/Normalizer/CalendarNormalizerTest.php
index 95fae8879..0c95c8f51 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Serializer/Normalizer/CalendarNormalizerTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Serializer/Normalizer/CalendarNormalizerTest.php
@@ -35,7 +35,7 @@ final class CalendarNormalizerTest extends KernelTestCase
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
}
- public function testNormalizationCalendar()
+ public function testNormalizationCalendar(): void
{
$calendar = (new Calendar())
->setComment(
@@ -88,7 +88,7 @@ final class CalendarNormalizerTest extends KernelTestCase
$this->assertIsArray($actual['duration']);
}
- public function testNormalizationOnNullHasSameKeys()
+ public function testNormalizationOnNullHasSameKeys(): void
{
$calendar = new Calendar();
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Service/DocGenerator/CalendarContextTest.php b/src/Bundle/ChillCalendarBundle/Tests/Service/DocGenerator/CalendarContextTest.php
index 8674a6b44..33a52e936 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Service/DocGenerator/CalendarContextTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Service/DocGenerator/CalendarContextTest.php
@@ -43,7 +43,7 @@ final class CalendarContextTest extends TestCase
{
use ProphecyTrait;
- public function testAdminFormReverseTransform()
+ public function testAdminFormReverseTransform(): void
{
$expected =
[
@@ -57,7 +57,7 @@ final class CalendarContextTest extends TestCase
$this->assertEqualsCanonicalizing($expected, $this->buildCalendarContext()->adminFormReverseTransform([]));
}
- public function testAdminFormTransform()
+ public function testAdminFormTransform(): void
{
$expected =
[
@@ -71,7 +71,7 @@ final class CalendarContextTest extends TestCase
$this->assertEqualsCanonicalizing($expected, $this->buildCalendarContext()->adminFormTransform($expected));
}
- public function testBuildPublicForm()
+ public function testBuildPublicForm(): void
{
$formBuilder = $this->prophesize(FormBuilderInterface::class);
$calendar = new Calendar();
@@ -138,7 +138,7 @@ final class CalendarContextTest extends TestCase
}
}
- public function testGetData()
+ public function testGetData(): void
{
$calendar = (new Calendar())
->addPerson($p1 = new Person())
@@ -167,7 +167,7 @@ final class CalendarContextTest extends TestCase
], $actual);
}
- public function testStoreGenerated()
+ public function testStoreGenerated(): void
{
$calendar = new Calendar();
$storedObject = new StoredObject();
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/BulkCalendarShortMessageSenderTest.php b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/BulkCalendarShortMessageSenderTest.php
index dd86ab16b..aba59202a 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/BulkCalendarShortMessageSenderTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/BulkCalendarShortMessageSenderTest.php
@@ -68,7 +68,7 @@ final class BulkCalendarShortMessageSenderTest extends KernelTestCase
$em->flush();
}
- public function testSendBulkMessageToEligibleCalendar()
+ public function testSendBulkMessageToEligibleCalendar(): void
{
$em = self::getContainer()->get(EntityManagerInterface::class);
$calendar = new Calendar();
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/CalendarForShortMessageProviderTest.php b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/CalendarForShortMessageProviderTest.php
index 47af7d68e..d9f410514 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/CalendarForShortMessageProviderTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/CalendarForShortMessageProviderTest.php
@@ -37,7 +37,7 @@ final class CalendarForShortMessageProviderTest extends TestCase
{
use ProphecyTrait;
- public function testGenerateRangeIsNull()
+ public function testGenerateRangeIsNull(): void
{
$calendarRepository = $this->prophesize(CalendarRepository::class);
$calendarRepository->findByNotificationAvailable(
@@ -63,7 +63,7 @@ final class CalendarForShortMessageProviderTest extends TestCase
$this->assertEquals(0, \count($calendars));
}
- public function testGetCalendars()
+ public function testGetCalendars(): void
{
$calendarRepository = $this->prophesize(CalendarRepository::class);
$calendarRepository->findByNotificationAvailable(
@@ -95,7 +95,7 @@ final class CalendarForShortMessageProviderTest extends TestCase
$this->assertContainsOnly(Calendar::class, $calendars);
}
- public function testGetCalendarsWithOnlyOneCalendar()
+ public function testGetCalendarsWithOnlyOneCalendar(): void
{
$calendarRepository = $this->prophesize(CalendarRepository::class);
$calendarRepository->findByNotificationAvailable(
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/DefaultRangeGeneratorTest.php b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/DefaultRangeGeneratorTest.php
index 1d28c43c0..7b2961d69 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/DefaultRangeGeneratorTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/DefaultRangeGeneratorTest.php
@@ -83,7 +83,7 @@ final class DefaultRangeGeneratorTest extends TestCase
/**
* @dataProvider generateData
*/
- public function testGenerateRange(\DateTimeImmutable $date, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate)
+ public function testGenerateRange(\DateTimeImmutable $date, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate): void
{
$generator = new DefaultRangeGenerator();
diff --git a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/DefaultShortMessageForCalendarBuilderTest.php b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/DefaultShortMessageForCalendarBuilderTest.php
index f5b9c8fdd..818d53bd5 100644
--- a/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/DefaultShortMessageForCalendarBuilderTest.php
+++ b/src/Bundle/ChillCalendarBundle/Tests/Service/ShortMessageNotification/DefaultShortMessageForCalendarBuilderTest.php
@@ -44,7 +44,7 @@ final class DefaultShortMessageForCalendarBuilderTest extends TestCase
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
}
- public function testBuildMessageForCalendar()
+ public function testBuildMessageForCalendar(): void
{
$calendar = new Calendar();
$calendar
diff --git a/src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php b/src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php
index 5d32ed7e9..1f6c88824 100644
--- a/src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php
+++ b/src/Bundle/ChillCustomFieldsBundle/ChillCustomFieldsBundle.php
@@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillCustomFieldsBundle extends Bundle
{
- public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container): void
{
parent::build($container);
$container->addCompilerPass(new CustomFieldCompilerPass(), \Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION, 0);
diff --git a/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php b/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php
index 9fd474e24..a18f295bd 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php
@@ -29,6 +29,7 @@ use Symfony\Component\Yaml\Parser;
* Class for the command 'chill:custom_fields:populate_group' that
* Create custom fields from a yml file.
*/
+#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:custom_fields:populate_group')]
class CreateFieldsOnGroupCommand extends Command
{
protected static $defaultDescription = 'Create custom fields from a yml file';
@@ -51,7 +52,7 @@ class CreateFieldsOnGroupCommand extends Command
protected function configure()
{
- $this->setName('chill:custom_fields:populate_group')
+ $this
->addArgument(
self::ARG_PATH,
InputOption::VALUE_REQUIRED,
@@ -133,7 +134,7 @@ class CreateFieldsOnGroupCommand extends Command
return Command::SUCCESS;
}
- private function _addFields(CustomFieldsGroup $group, $values, OutputInterface $output)
+ private function _addFields(CustomFieldsGroup $group, $values, OutputInterface $output): void
{
$em = $this->entityManager;
diff --git a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php
index 39d9821a9..b8235c0c6 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php
@@ -35,7 +35,7 @@ class CustomFieldController extends AbstractController
* Creates a new CustomField entity.
*/
#[Route(path: '/{_locale}/admin/customfield/new', name: 'customfield_create')]
- public function createAction(Request $request)
+ public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$entity = new CustomField();
$form = $this->createCreateForm($entity, $request->query->get('type', null));
@@ -65,7 +65,7 @@ class CustomFieldController extends AbstractController
* Displays a form to edit an existing CustomField entity.
*/
#[Route(path: '/{_locale}/admin/customfield/edit', name: 'customfield_edit')]
- public function editAction(mixed $id)
+ public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -87,7 +87,7 @@ class CustomFieldController extends AbstractController
* Displays a form to create a new CustomField entity.
*/
#[Route(path: '/{_locale}/admin/customfield/new', name: 'customfield_new')]
- public function newAction(Request $request)
+ public function newAction(Request $request): \Symfony\Component\HttpFoundation\Response
{
$entity = new CustomField();
@@ -117,7 +117,7 @@ class CustomFieldController extends AbstractController
* Edits an existing CustomField entity.
*/
#[Route(path: '/{_locale}/admin/customfield/update', name: 'customfield_update')]
- public function updateAction(Request $request, mixed $id)
+ public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
diff --git a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
index acf223888..0461528a8 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php
@@ -46,7 +46,7 @@ class CustomFieldsGroupController extends AbstractController
* Creates a new CustomFieldsGroup entity.
*/
#[Route(path: '/{_locale}/admin/customfieldsgroup/create', name: 'customfieldsgroup_create')]
- public function createAction(Request $request)
+ public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$entity = new CustomFieldsGroup();
$form = $this->createCreateForm($entity);
@@ -76,7 +76,7 @@ class CustomFieldsGroupController extends AbstractController
* Displays a form to edit an existing CustomFieldsGroup entity.
*/
#[Route(path: '/{_locale}/admin/customfieldsgroup/{id}/edit', name: 'customfieldsgroup_edit')]
- public function editAction(mixed $id)
+ public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -98,7 +98,7 @@ class CustomFieldsGroupController extends AbstractController
* Lists all CustomFieldsGroup entities.
*/
#[Route(path: '/{_locale}/admin/customfieldsgroup/', name: 'customfieldsgroup')]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -124,7 +124,7 @@ class CustomFieldsGroupController extends AbstractController
* Set the CustomField Group with id $cFGroupId as default.
*/
#[Route(path: '/{_locale}/admin/customfieldsgroup/makedefault', name: 'customfieldsgroup_makedefault')]
- public function makeDefaultAction(Request $request)
+ public function makeDefaultAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse
{
$form = $this->createMakeDefaultForm(null);
$form->handleRequest($request);
@@ -168,7 +168,7 @@ class CustomFieldsGroupController extends AbstractController
* Displays a form to create a new CustomFieldsGroup entity.
*/
#[Route(path: '/{_locale}/admin/customfieldsgroup/new', name: 'customfieldsgroup_new')]
- public function newAction()
+ public function newAction(): \Symfony\Component\HttpFoundation\Response
{
$entity = new CustomFieldsGroup();
$form = $this->createCreateForm($entity);
@@ -189,7 +189,7 @@ class CustomFieldsGroupController extends AbstractController
*
* @param int $id
*/
- public function renderFormAction($id, Request $request)
+ public function renderFormAction($id, Request $request): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -232,7 +232,7 @@ class CustomFieldsGroupController extends AbstractController
* Finds and displays a CustomFieldsGroup entity.
*/
#[Route(path: '/{_locale}/admin/customfieldsgroup/{id}/show', name: 'customfieldsgroup_show')]
- public function showAction(mixed $id)
+ public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -255,7 +255,7 @@ class CustomFieldsGroupController extends AbstractController
* Edits an existing CustomFieldsGroup entity.
*/
#[Route(path: '/{_locale}/admin/customfieldsgroup/{id}/update', name: 'customfieldsgroup_update')]
- public function updateAction(Request $request, mixed $id)
+ public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -358,7 +358,7 @@ class CustomFieldsGroupController extends AbstractController
*
* @return \Symfony\Component\Form\Form
*/
- private function createMakeDefaultForm(?CustomFieldsGroup $group = null)
+ private function createMakeDefaultForm(?CustomFieldsGroup $group = null): \Symfony\Component\Form\FormInterface
{
return $this->createFormBuilder($group, [
'method' => 'POST',
diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php
index e803742fe..32ea10d7f 100644
--- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php
+++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php
@@ -50,7 +50,7 @@ class CustomFieldChoice extends AbstractCustomField
return $cf->getOptions()[self::ALLOW_OTHER];
}
- public function buildForm(FormBuilderInterface $builder, CustomField $customField)
+ public function buildForm(FormBuilderInterface $builder, CustomField $customField): void
{
// prepare choices
$choices = [];
@@ -266,7 +266,7 @@ class CustomFieldChoice extends AbstractCustomField
*
* @return string html representation
*/
- public function render($value, CustomField $customField, $documentType = 'html')
+ public function render($value, CustomField $customField, $documentType = 'html'): string
{
// extract the data. They are under a _choice key if they are stored with allow_other
$data = $value['_choices'] ?? $value;
diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php
index 4eee4e829..49b0c618c 100644
--- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php
+++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php
@@ -47,7 +47,7 @@ class CustomFieldDate extends AbstractCustomField
private readonly TranslatableStringHelper $translatableStringHelper,
) {}
- public function buildForm(FormBuilderInterface $builder, CustomField $customField)
+ public function buildForm(FormBuilderInterface $builder, CustomField $customField): void
{
$fieldOptions = $this->prepareFieldOptions($customField);
@@ -64,7 +64,7 @@ class CustomFieldDate extends AbstractCustomField
);
}
- public function buildOptionsForm(FormBuilderInterface $builder)
+ public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
{
$validatorFunction = static function ($value, ExecutionContextInterface $context) {
try {
diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php
index 3a0adbdcc..4fc2bc00b 100644
--- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php
+++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php
@@ -30,7 +30,7 @@ class CustomFieldLongChoice extends AbstractCustomField
private readonly \Twig\Environment $templating,
) {}
- public function buildForm(FormBuilderInterface $builder, CustomField $customField)
+ public function buildForm(FormBuilderInterface $builder, CustomField $customField): void
{
$options = $customField->getOptions();
$entries = $this->optionRepository->findFilteredByKey(
@@ -63,7 +63,7 @@ class CustomFieldLongChoice extends AbstractCustomField
->addModelTransformer(new CustomFieldDataTransformer($this, $customField));
}
- public function buildOptionsForm(FormBuilderInterface $builder)
+ public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
{
// create a selector between different keys
$keys = $this->optionRepository->getKeys();
@@ -93,7 +93,7 @@ class CustomFieldLongChoice extends AbstractCustomField
return 'Long choice field';
}
- public function render($value, CustomField $customField, $documentType = 'html')
+ public function render($value, CustomField $customField, $documentType = 'html'): string
{
$option = $this->deserialize($value, $customField);
$template = '@ChillCustomFields/CustomFieldsRendering/choice_long.'
diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php
index 0f303fed6..12582105f 100644
--- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php
+++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php
@@ -44,7 +44,7 @@ class CustomFieldNumber extends AbstractCustomField
private readonly TranslatableStringHelper $translatableStringHelper,
) {}
- public function buildForm(FormBuilderInterface $builder, CustomField $customField)
+ public function buildForm(FormBuilderInterface $builder, CustomField $customField): void
{
$options = $customField->getOptions();
@@ -58,7 +58,7 @@ class CustomFieldNumber extends AbstractCustomField
$builder->add($customField->getSlug(), $type, $fieldOptions);
}
- public function buildOptionsForm(FormBuilderInterface $builder)
+ public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
{
return $builder
->add(self::MIN, NumberType::class, [
@@ -93,7 +93,7 @@ class CustomFieldNumber extends AbstractCustomField
return 'Number field';
}
- public function render($value, CustomField $customField, $documentType = 'html')
+ public function render($value, CustomField $customField, $documentType = 'html'): string
{
$template = '@ChillCustomFields/CustomFieldsRendering/number.'
.$documentType.'.twig';
diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php
index 00daee1c8..576272422 100644
--- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php
+++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php
@@ -37,7 +37,7 @@ class CustomFieldText extends AbstractCustomField
* if maxLength < 256 THEN the form type is 'text'
* if not, THEN the form type is textarea
*/
- public function buildForm(FormBuilderInterface $builder, CustomField $customField)
+ public function buildForm(FormBuilderInterface $builder, CustomField $customField): void
{
$options = $customField->getOptions();
@@ -60,7 +60,7 @@ class CustomFieldText extends AbstractCustomField
]);
}
- public function buildOptionsForm(FormBuilderInterface $builder)
+ public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
{
return $builder
->add(self::MAX_LENGTH, IntegerType::class, ['empty_data' => 256])
@@ -84,7 +84,7 @@ class CustomFieldText extends AbstractCustomField
return 'Text field';
}
- public function render($value, CustomField $customField, $documentType = 'html')
+ public function render($value, CustomField $customField, $documentType = 'html'): string
{
$template = '@ChillCustomFields/CustomFieldsRendering/text.html.twig';
diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php
index 75ecc0368..ec1208d9a 100644
--- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php
+++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php
@@ -34,7 +34,7 @@ class CustomFieldTitle extends AbstractCustomField
private readonly TranslatableStringHelper $translatableStringHelper,
) {}
- public function buildForm(FormBuilderInterface $builder, CustomField $customField)
+ public function buildForm(FormBuilderInterface $builder, CustomField $customField): void
{
$builder->add($customField->getSlug(), CustomFieldsTitleType::class, [
'label' => false,
@@ -46,7 +46,7 @@ class CustomFieldTitle extends AbstractCustomField
]);
}
- public function buildOptionsForm(FormBuilderInterface $builder)
+ public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
{
return $builder->add(
self::TYPE,
@@ -76,7 +76,7 @@ class CustomFieldTitle extends AbstractCustomField
return false;
}
- public function render($value, CustomField $customField, $documentType = 'html')
+ public function render($value, CustomField $customField, $documentType = 'html'): string
{
return $this->templating
->render(
diff --git a/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php b/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php
index 4da28baac..42e050766 100644
--- a/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php
+++ b/src/Bundle/ChillCustomFieldsBundle/DataFixtures/ORM/LoadOption.php
@@ -76,7 +76,7 @@ class LoadOption extends AbstractFixture implements OrderedFixtureInterface
->setInternalKey($parent->getKey().'-'.$this->counter);
}
- private function loadingCompanies(ObjectManager $manager)
+ private function loadingCompanies(ObjectManager $manager): void
{
echo "Loading companies \n";
$companiesParents = [
@@ -120,7 +120,7 @@ class LoadOption extends AbstractFixture implements OrderedFixtureInterface
}
}
- private function loadingWords(ObjectManager $manager)
+ private function loadingWords(ObjectManager $manager): void
{
echo "Loading some words...\n";
diff --git a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/ChillCustomFieldsExtension.php b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/ChillCustomFieldsExtension.php
index 724fd01ca..0be0ef02c 100644
--- a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/ChillCustomFieldsExtension.php
+++ b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/ChillCustomFieldsExtension.php
@@ -24,7 +24,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillCustomFieldsExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -54,7 +54,7 @@ class ChillCustomFieldsExtension extends Extension implements PrependExtensionIn
/** (non-PHPdoc).
* @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend()
*/
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
// add form layout to twig resources
$twigConfig = [
diff --git a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/CustomFieldCompilerPass.php b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/CustomFieldCompilerPass.php
index 6e68a248a..e336c9aa2 100644
--- a/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/CustomFieldCompilerPass.php
+++ b/src/Bundle/ChillCustomFieldsBundle/DependencyInjection/CustomFieldCompilerPass.php
@@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\Reference;
class CustomFieldCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('chill.custom_field.provider')) {
throw new \LogicException('service chill.custom_field.provider is not defined.');
diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php
index 04cdd2308..5eb1d4fec 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php
@@ -62,7 +62,7 @@ class CustomField
*
* @return CustomFieldsGroup
*/
- public function getCustomFieldsGroup()
+ public function getCustomFieldsGroup(): ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup
{
return $this->customFieldGroup;
}
@@ -72,7 +72,7 @@ class CustomField
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -106,7 +106,7 @@ class CustomField
/**
* @return array
*/
- public function getOptions()
+ public function getOptions(): array
{
return $this->options;
}
@@ -116,7 +116,7 @@ class CustomField
*
* @return float
*/
- public function getOrdering()
+ public function getOrdering(): ?float
{
return $this->ordering;
}
@@ -126,7 +126,7 @@ class CustomField
*
* @return bool
*/
- public function getRequired()
+ public function getRequired(): bool
{
return $this->isRequired();
}
@@ -134,7 +134,7 @@ class CustomField
/**
* @return string
*/
- public function getSlug()
+ public function getSlug(): ?string
{
return $this->slug;
}
@@ -144,7 +144,7 @@ class CustomField
*
* @return string
*/
- public function getType()
+ public function getType(): ?string
{
return $this->type;
}
@@ -154,7 +154,7 @@ class CustomField
*
* @return bool
*/
- public function isActive()
+ public function isActive(): bool
{
return $this->active;
}
@@ -164,7 +164,7 @@ class CustomField
*
* @return bool
*/
- public function isRequired()
+ public function isRequired(): bool
{
return $this->required;
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php
index bd98cec68..8ec51bce1 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php
@@ -57,7 +57,7 @@ class Option
/**
* @return bool
*/
- public function getActive()
+ public function getActive(): bool
{
return $this->isActive();
}
@@ -65,7 +65,7 @@ class Option
/**
* @return Collection
*/
- public function getChildren()
+ public function getChildren(): \Doctrine\Common\Collections\Collection
{
return $this->children;
}
@@ -73,7 +73,7 @@ class Option
/**
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -81,7 +81,7 @@ class Option
/**
* @return string
*/
- public function getInternalKey()
+ public function getInternalKey(): string
{
return $this->internalKey;
}
@@ -89,7 +89,7 @@ class Option
/**
* @return string
*/
- public function getKey()
+ public function getKey(): ?string
{
return $this->key;
}
@@ -97,7 +97,7 @@ class Option
/**
* @return Option
*/
- public function getParent()
+ public function getParent(): ?\Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option
{
return $this->parent;
}
@@ -105,7 +105,7 @@ class Option
/**
* @return array
*/
- public function getText()
+ public function getText(): ?array
{
return $this->text;
}
@@ -121,7 +121,7 @@ class Option
/**
* @return bool
*/
- public function isActive()
+ public function isActive(): bool
{
return $this->active;
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php
index c0022d530..8fad684d9 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php
@@ -37,7 +37,7 @@ class CustomFieldsDefaultGroup
*
* @return CustomFieldsGroup
*/
- public function getCustomFieldsGroup()
+ public function getCustomFieldsGroup(): ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup
{
return $this->customFieldsGroup;
}
@@ -47,7 +47,7 @@ class CustomFieldsDefaultGroup
*
* @return string
*/
- public function getEntity()
+ public function getEntity(): ?string
{
return $this->entity;
}
@@ -57,7 +57,7 @@ class CustomFieldsDefaultGroup
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
index b50596eab..f5d3816a6 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php
@@ -93,7 +93,7 @@ class CustomFieldsGroup
/**
* @return Collection
*/
- public function getCustomFields()
+ public function getCustomFields(): \Doctrine\Common\Collections\Collection
{
return $this->customFields;
}
@@ -103,7 +103,7 @@ class CustomFieldsGroup
*
* @return string
*/
- public function getEntity()
+ public function getEntity(): ?string
{
return $this->entity;
}
@@ -113,7 +113,7 @@ class CustomFieldsGroup
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -146,7 +146,7 @@ class CustomFieldsGroup
*
* @return array
*/
- public function getOptions()
+ public function getOptions(): array
{
return $this->options;
}
@@ -154,7 +154,7 @@ class CustomFieldsGroup
/**
* Remove customField.
*/
- public function removeCustomField(CustomField $customField)
+ public function removeCustomField(CustomField $customField): void
{
$this->customFields->removeElement($customField);
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/EntityRepository/CustomFieldLongChoice/OptionRepository.php b/src/Bundle/ChillCustomFieldsBundle/EntityRepository/CustomFieldLongChoice/OptionRepository.php
index e57473746..801903ca2 100644
--- a/src/Bundle/ChillCustomFieldsBundle/EntityRepository/CustomFieldLongChoice/OptionRepository.php
+++ b/src/Bundle/ChillCustomFieldsBundle/EntityRepository/CustomFieldLongChoice/OptionRepository.php
@@ -47,7 +47,7 @@ class OptionRepository extends EntityRepository
/**
* @return string[]
*/
- public function getKeys()
+ public function getKeys(): array
{
$keys = $this->createQueryBuilder('option')
->select('option.key')
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php
index 23a7ed975..afcc2a3d4 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php
@@ -32,7 +32,7 @@ class CustomFieldType extends AbstractType
{
public function __construct(private readonly CustomFieldProvider $customFieldProvider, private readonly ObjectManager $om, private readonly TranslatableStringHelper $translatableStringHelper) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$customFieldsList = [];
@@ -91,7 +91,7 @@ class CustomFieldType extends AbstractType
/**
* @param OptionsResolverInterface $resolver
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\CustomFieldsBundle\Entity\CustomField::class,
@@ -106,7 +106,7 @@ class CustomFieldType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'custom_field_choice';
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php
index 13e349012..30943a820 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php
@@ -30,7 +30,7 @@ class CustomFieldsGroupType extends AbstractType
) {}
// TODO : details about the function
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
// prepare translation
$entities = [];
@@ -86,7 +86,7 @@ class CustomFieldsGroupType extends AbstractType
);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => CustomFieldsGroup::class,
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php
index ee5f8b386..fc0a16606 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php
@@ -19,7 +19,7 @@ class CustomFieldDataTransformer implements DataTransformerInterface
{
public function __construct(private readonly CustomFieldInterface $customFieldDefinition, private readonly CustomField $customField) {}
- public function reverseTransform($value)
+ public function reverseTransform($value): mixed
{
return $this->customFieldDefinition->serialize(
$value,
@@ -27,7 +27,7 @@ class CustomFieldDataTransformer implements DataTransformerInterface
);
}
- public function transform($value)
+ public function transform($value): mixed
{
return $this->customFieldDefinition->deserialize(
$value,
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php
index 180ac0a8a..e410ea5c1 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php
@@ -54,7 +54,7 @@ class CustomFieldsGroupToIdTransformer implements DataTransformerInterface
*
* @return string
*/
- public function transform($customFieldsGroup)
+ public function transform($customFieldsGroup): mixed
{
if (null === $customFieldsGroup) {
return '';
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/JsonCustomFieldToArrayTransformer.php b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/JsonCustomFieldToArrayTransformer.php
index 9f2fa3a9e..b3343d19a 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/JsonCustomFieldToArrayTransformer.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/JsonCustomFieldToArrayTransformer.php
@@ -39,7 +39,7 @@ class JsonCustomFieldToArrayTransformer implements DataTransformerInterface
$this->customField = $customFieldsByLabel;
}
- public function reverseTransform($customFieldsArray)
+ public function reverseTransform($customFieldsArray): mixed
{
/*
echo "
- - 7 -
";
@@ -101,7 +101,7 @@ class JsonCustomFieldToArrayTransformer implements DataTransformerInterface
return json_encode($customFieldsArrayRet, \JSON_THROW_ON_ERROR);
}
- public function transform($customFieldsJSON)
+ public function transform($customFieldsJSON): mixed
{
echo $customFieldsJSON;
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php b/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php
index 2d801beec..8aa1f0ec8 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/Extension/PostTextExtension.php
@@ -26,7 +26,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
abstract class PostTextExtension extends AbstractTypeExtension
{
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
if (\array_key_exists('post_text', $options)) {
// set the post text variable to the view
@@ -34,7 +34,7 @@ abstract class PostTextExtension extends AbstractTypeExtension
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefined(['post_text']);
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php
index 8d0c049f0..a039a7405 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoiceWithOtherType.php
@@ -27,7 +27,7 @@ class ChoiceWithOtherType extends AbstractType
/** (non-PHPdoc).
* @see \Symfony\Component\Form\AbstractType::buildForm()
*/
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
// add an 'other' entry in choices array
$options['choices'][$this->otherValueLabel] = '_other';
@@ -44,7 +44,7 @@ class ChoiceWithOtherType extends AbstractType
/** (non-PHPdoc).
* @see \Symfony\Component\Form\AbstractType::configureOptions()
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setRequired(['choices'])
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php
index c50bd856e..d0f7a2df7 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesListType.php
@@ -24,7 +24,7 @@ class ChoicesListType extends AbstractType
/** (non-PHPdoc).
* @see \Symfony\Component\Form\AbstractType::buildForm()
*/
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('name', TranslatableStringFormType::class)
->add('active', CheckboxType::class, [
@@ -52,7 +52,7 @@ class ChoicesListType extends AbstractType
/**
* @see \Symfony\Component\Form\FormTypeInterface::getName()
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'cf_choices_list';
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php
index 6730d2579..7b9ad778d 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/ChoicesType.php
@@ -16,12 +16,12 @@ use Symfony\Component\Form\Extension\Core\Type\CollectionType;
class ChoicesType extends AbstractType
{
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'cf_choices';
}
- public function getParent()
+ public function getParent(): ?string
{
return CollectionType::class;
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php
index 6da8a9a71..ba53a2862 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldType.php
@@ -29,7 +29,7 @@ class CustomFieldType extends AbstractType
$this->customFieldCompiler = $compiler;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
foreach ($options['group']->getActiveCustomFields() as $cf) {
$this->customFieldCompiler
@@ -39,7 +39,7 @@ class CustomFieldType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setRequired(['group'])
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php
index 5d5377a15..4c2a0efab 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php
@@ -16,9 +16,9 @@ use Symfony\Component\Form\FormBuilderInterface;
class CustomFieldsTitleType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options) {}
+ public function buildForm(FormBuilderInterface $builder, array $options): void {}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'custom_field_title';
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php
index 8f6e896bf..29d0b66bf 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php
@@ -52,7 +52,7 @@ class LinkedCustomFieldsType extends AbstractType
*
* @return void
*/
- public function appendChoice(FormEvent $event)
+ public function appendChoice(FormEvent $event): void
{
$rootForm = $this->getRootForm($event->getForm());
$group = $rootForm->getData();
@@ -80,7 +80,7 @@ class LinkedCustomFieldsType extends AbstractType
);
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$this->choiceName = $builder->getName();
$this->options = $options;
@@ -91,12 +91,12 @@ class LinkedCustomFieldsType extends AbstractType
);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'custom_fields_group_linked_custom_fields';
}
- public function getParent()
+ public function getParent(): ?string
{
return ChoiceType::class;
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php
index db63ad6ac..df6d79e78 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php
index fcccf01ed..8f84c3fbd 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php
@@ -47,7 +47,7 @@ class CustomFieldProvider implements ContainerAwareInterface
* @param type $type The type of the service (that is used in the form to
* add this type)
*/
- public function addCustomField($serviceName, $type)
+ public function addCustomField($serviceName, $type): void
{
$this->servicesByType[$type] = $serviceName;
}
@@ -57,7 +57,7 @@ class CustomFieldProvider implements ContainerAwareInterface
*
* @return array array of the known custom fields indexed by the type
*/
- public function getAllFields()
+ public function getAllFields(): array
{
return $this->servicesByType;
}
@@ -84,7 +84,7 @@ class CustomFieldProvider implements ContainerAwareInterface
*
* @see \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer()
*/
- public function setContainer(?ContainerInterface $container = null)
+ public function setContainer(?ContainerInterface $container = null): void
{
if (null === $container) {
throw new \LogicException('container should not be null');
diff --git a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelperException.php b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelperException.php
index e442b0f0c..a0bf5fa24 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelperException.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelperException.php
@@ -13,12 +13,12 @@ namespace Chill\CustomFieldsBundle\Service;
class CustomFieldsHelperException extends \Exception
{
- public static function customFieldsGroupNotFound($entity)
+ public static function customFieldsGroupNotFound($entity): \Chill\CustomFieldsBundle\Service\CustomFieldsHelperException
{
return new CustomFieldsHelperException("The customFieldsGroups associated with {$entity} are not found");
}
- public static function slugIsMissing()
+ public static function slugIsMissing(): \Chill\CustomFieldsBundle\Service\CustomFieldsHelperException
{
return new CustomFieldsHelperException('The slug is missing');
}
diff --git a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php
index 6d3d889a8..2d5beecef 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php
@@ -78,7 +78,7 @@ class CustomFieldRenderingTwig extends AbstractExtension
*
* @return string HTML representation of the custom field label
*/
- public function renderLabel(Environment $env, CustomField $customField, array $params = [])
+ public function renderLabel(Environment $env, CustomField $customField, array $params = []): string
{
$resolvedParams = array_merge($this->defaultParams, $params);
diff --git a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldsGroupRenderingTwig.php b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldsGroupRenderingTwig.php
index 57add2733..e374607db 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldsGroupRenderingTwig.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldsGroupRenderingTwig.php
@@ -80,7 +80,7 @@ final class CustomFieldsGroupRenderingTwig extends AbstractExtension
* @return string HTML representation of the custom field group value, as described in
* the CustomFieldInterface. Is HTML safe
*/
- public function renderWidget(Environment $env, array $fields, $customFielsGroup, $documentType = 'html', array $params = [])
+ public function renderWidget(Environment $env, array $fields, $customFielsGroup, $documentType = 'html', array $params = []): string
{
$resolvedParams = array_merge($this->defaultParams, $params);
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Config/ConfigCustomizablesEntitiesTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Config/ConfigCustomizablesEntitiesTest.php
index ef5936997..2dd1505c7 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/Config/ConfigCustomizablesEntitiesTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Config/ConfigCustomizablesEntitiesTest.php
@@ -28,7 +28,7 @@ final class ConfigCustomizablesEntitiesTest extends KernelTestCase
*
* @internal use a custom config environment
*/
- public function testNotEmptyConfig()
+ public function testNotEmptyConfig(): void
{
self::bootKernel(['environment' => 'test_customizable_entities_test_not_empty_config']);
$customizableEntities = self::$kernel->getContainer()
@@ -51,7 +51,7 @@ final class ConfigCustomizablesEntitiesTest extends KernelTestCase
* In this case, parameter 'chill_custom_fields.customizables_entities'
* should be an empty array in container
*/
- public function testNotPresentInConfig()
+ public function testNotPresentInConfig(): void
{
self::bootKernel(['environment' => 'test']);
$customizableEntities = self::$kernel->getContainer()
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldsGroupControllerTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldsGroupControllerTest.php
index ac2b94483..f04c2cdbd 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldsGroupControllerTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Controller/CustomFieldsGroupControllerTest.php
@@ -24,7 +24,7 @@ final class CustomFieldsGroupControllerTest extends WebTestCase
/**
* @doesNotPerformAssertions
*/
- public function testCompleteScenario()
+ public function testCompleteScenario(): void
{
self::bootKernel(['environment' => 'test_customizable_entities_test_not_empty_config']);
// Create a new client to browse the application
@@ -40,7 +40,7 @@ final class CustomFieldsGroupControllerTest extends WebTestCase
$this->editCustomFieldsGroup($client);
}
- private function createCustomFieldsGroup(Client &$client)
+ private function createCustomFieldsGroup(Client &$client): void
{
// Create a new entry in the database
$crawler = $client->request('GET', '/fr/admin/customfieldsgroup/');
@@ -71,7 +71,7 @@ final class CustomFieldsGroupControllerTest extends WebTestCase
);
}
- private function editCustomFieldsGroup(Client $client)
+ private function editCustomFieldsGroup(Client $client): void
{
$crawler = $client->request('GET', '/fr/admin/customfieldsgroup/');
$links = $crawler->selectLink('Modifier');
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php
index 6c6e424da..c11aafd5e 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFieldTestHelper.php
@@ -29,7 +29,7 @@ trait CustomFieldTestHelper
*
* @return Crawler
*/
- public function getCrawlerForField(CustomField $field, $locale = 'en')
+ public function getCrawlerForField(CustomField $field, $locale = 'en'): \Symfony\Component\DomCrawler\Crawler
{
$kernel = static::$kernel;
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php
index 6f6ba394e..4bccdbe2b 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php
@@ -133,7 +133,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
*
* @dataProvider serializedRepresentationDataProvider
*/
- public function testDeserializeMultipleChoiceWithOther($data)
+ public function testDeserializeMultipleChoiceWithOther($data): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => true,
@@ -156,7 +156,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
* - the case when the selected value is `_other`
* - result is null
*/
- public function testDeserializeMultipleChoiceWithOtherOtherCases()
+ public function testDeserializeMultipleChoiceWithOtherOtherCases(): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => true,
@@ -219,7 +219,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
*
* @dataProvider serializedRepresentationDataProvider
*/
- public function testDeserializeMultipleChoiceWithoutOther($data)
+ public function testDeserializeMultipleChoiceWithoutOther($data): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => false,
@@ -238,7 +238,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
* Covered cases :
* - NULL values
*/
- public function testDeserializeMultipleChoiceWithoutOtherOtherCases()
+ public function testDeserializeMultipleChoiceWithoutOtherOtherCases(): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => false,
@@ -280,7 +280,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
*
* @dataProvider serializedRepresentationDataProvider
*/
- public function testDeserializeSingleChoiceWithOther($data)
+ public function testDeserializeSingleChoiceWithOther($data): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => true,
@@ -298,7 +298,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
* - Test if the selected value is '_other
* - Test with null data
*/
- public function testDeserializeSingleChoiceWithOtherOtherCases()
+ public function testDeserializeSingleChoiceWithOtherOtherCases(): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => true,
@@ -359,7 +359,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
*
* @dataProvider serializedRepresentationDataProvider
*/
- public function testDeserializeSingleChoiceWithoutOther($data)
+ public function testDeserializeSingleChoiceWithoutOther($data): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => false,
@@ -371,7 +371,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
$this->assertSame('my-value', $deserialized);
}
- public function testDeserializeSingleChoiceWithoutOtherDataIsNull()
+ public function testDeserializeSingleChoiceWithoutOtherDataIsNull(): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => false,
@@ -400,7 +400,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
/**
* @dataProvider emptyDataProvider
*/
- public function testIsEmptyValueEmpty(mixed $data)
+ public function testIsEmptyValueEmpty(mixed $data): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => false,
@@ -422,7 +422,7 @@ final class CustomFieldsChoiceTest extends KernelTestCase
*
* @dataProvider serializedRepresentationDataProvider
*/
- public function testIsEmptyValueNotEmpty(mixed $data)
+ public function testIsEmptyValueNotEmpty(mixed $data): void
{
$customField = $this->generateCustomField([
CustomFieldChoice::ALLOW_OTHER => false,
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php
index 235631e24..5a673de19 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsNumberTest.php
@@ -52,7 +52,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
->push($request);
}
- public function testCreateInvalidFormValueGreaterThanMaximum()
+ public function testCreateInvalidFormValueGreaterThanMaximum(): void
{
$cf = $this->createCustomFieldNumber([
'min' => null,
@@ -72,7 +72,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
$this->assertEquals(1, \count($form['default']->getErrors()));
}
- public function testCreateInvalidFormValueLowerThanMinimum()
+ public function testCreateInvalidFormValueLowerThanMinimum(): void
{
$cf = $this->createCustomFieldNumber([
'min' => 1000,
@@ -92,7 +92,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
$this->assertEquals(1, \count($form['default']->getErrors()));
}
- public function testCreateValidForm()
+ public function testCreateValidForm(): void
{
$cf = $this->createCustomFieldNumber([
'min' => null,
@@ -111,7 +111,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
$this->assertEquals(10, $form['default']->getData());
}
- public function testRequiredFieldIsFalse()
+ public function testRequiredFieldIsFalse(): void
{
$cf = $this->createCustomFieldNumber([
'min' => 1000,
@@ -136,7 +136,7 @@ final class CustomFieldsNumberTest extends \Symfony\Bundle\FrameworkBundle\Test\
);
}
- public function testRequiredFieldIsTrue()
+ public function testRequiredFieldIsTrue(): void
{
$cf = $this->createCustomFieldNumber([
'min' => 1000,
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php
index 2d1268e71..6e1173c30 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php
@@ -34,7 +34,7 @@ final class CustomFieldsTextTest extends WebTestCase
->get('chill.custom_field.provider');
}
- public function testCustomFieldsTextExists()
+ public function testCustomFieldsTextExists(): void
{
$customField = $this->customFieldProvider->getCustomFieldByType('text');
@@ -48,7 +48,7 @@ final class CustomFieldsTextTest extends WebTestCase
);
}
- public function testFormTextNew()
+ public function testFormTextNew(): void
{
$client = self::createClient();
@@ -60,7 +60,7 @@ final class CustomFieldsTextTest extends WebTestCase
$this->assertTrue($form->has('custom_field_choice[options][maxLength]'));
}
- public function testPublicFormRenderingLengthLessThan256()
+ public function testPublicFormRenderingLengthLessThan256(): void
{
$customField = new CustomField();
$customField->setType('text')
@@ -76,7 +76,7 @@ final class CustomFieldsTextTest extends WebTestCase
$this->assertCount(1, $crawler->filter("label:contains('my label')"));
}
- public function testPublicFormRenderingLengthMoreThan25()
+ public function testPublicFormRenderingLengthMoreThan25(): void
{
$customField = new CustomField();
$customField->setType('text')
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php
index d6327829a..58243da55 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextIntegerExtensionTest.php
@@ -38,7 +38,7 @@ final class PostTextIntegerExtensionTest extends KernelTestCase
->createBuilder('form', null);
}
- public function testCreateView()
+ public function testCreateView(): void
{
$form = $this->formBuilder->add('test', IntegerType::class, [
'post_text' => 'my text',
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php
index 4a905ae1b..3057f58d7 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Form/Extension/PostTextNumberExtensionTest.php
@@ -38,7 +38,7 @@ final class PostTextNumberExtensionTest extends KernelTestCase
->createBuilder('form', null);
}
- public function testCreateView()
+ public function testCreateView(): void
{
$form = $this->formBuilder->add('test', NumberType::class, [
'post_text' => 'my text',
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php
index 0ef952f59..77b1672c6 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Routing/RoutingLoaderTest.php
@@ -23,7 +23,7 @@ use Symfony\Component\HttpFoundation\Response;
*/
final class RoutingLoaderTest extends WebTestCase
{
- public function testRoutesAreLoaded()
+ public function testRoutesAreLoaded(): void
{
$client = self::createClient();
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php
index 6d3abbc66..58987264c 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php
@@ -43,7 +43,7 @@ final class CustomFieldsHelperTest extends KernelTestCase
->setType('text');
}
- public function testIsEmptyValue()
+ public function testIsEmptyValue(): void
{
// not empty value
$data = [
@@ -60,7 +60,7 @@ final class CustomFieldsHelperTest extends KernelTestCase
$this->assertTrue($this->cfHelper->isEmptyValue($data, $this->randomCFText));
}
- public function testRenderCustomField()
+ public function testRenderCustomField(): void
{
$data = [
$this->randomCFText->getSlug() => 'Sample text',
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php
index 04376b84a..4728cb4dd 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldRenderingTwigTest.php
@@ -45,7 +45,7 @@ final class CustomFieldRenderingTwigTest extends KernelTestCase
->push($request->reveal());
}
- public function testIsEmpty()
+ public function testIsEmpty(): void
{
$cf = $this->getSimpleCustomFieldText();
@@ -68,7 +68,7 @@ final class CustomFieldRenderingTwigTest extends KernelTestCase
$this->assertTrue($result);
}
- public function testLabelRendering()
+ public function testLabelRendering(): void
{
$cf = $this->getSimpleCustomFieldText();
@@ -81,7 +81,7 @@ final class CustomFieldRenderingTwigTest extends KernelTestCase
);
}
- public function testWidgetRendering()
+ public function testWidgetRendering(): void
{
$cf = $this->getSimpleCustomFieldText();
$fields = [
diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php
index 07da58cbc..2ec4ab12d 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Templating/Twig/CustomFieldsGroupRenderingTwigTest.php
@@ -47,7 +47,7 @@ final class CustomFieldsGroupRenderingTwigTest extends KernelTestCase
->push($request->reveal());
}
- public function testRenderingWidget()
+ public function testRenderingWidget(): void
{
$cfGroup = $this->getCustomFieldsGroup();
@@ -62,7 +62,7 @@ final class CustomFieldsGroupRenderingTwigTest extends KernelTestCase
$this->assertContains('Yes', $text);
}
- public function testRenderingWidgetDoNotShowEmpty()
+ public function testRenderingWidgetDoNotShowEmpty(): void
{
$cfGroup = $this->getCustomFieldsGroup();
$cfGroup->addCustomField($this->getSimpleCustomFieldText('empty', 'Do not answer'));
diff --git a/src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php b/src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php
index c81bcd372..73a11fe8c 100644
--- a/src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php
+++ b/src/Bundle/ChillDocGeneratorBundle/ChillDocGeneratorBundle.php
@@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillDocGeneratorBundle extends Bundle
{
- public function build(ContainerBuilder $container)
+ public function build(ContainerBuilder $container): void
{
parent::build($container);
diff --git a/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/ChillDocGeneratorExtension.php b/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/ChillDocGeneratorExtension.php
index f42462dc8..15c6345cf 100644
--- a/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/ChillDocGeneratorExtension.php
+++ b/src/Bundle/ChillDocGeneratorBundle/DependencyInjection/ChillDocGeneratorExtension.php
@@ -24,7 +24,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillDocGeneratorExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -36,7 +36,7 @@ class ChillDocGeneratorExtension extends Extension implements PrependExtensionIn
$loader->load('services/form.yaml');
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->preprendRoutes($container);
$this->prependCruds($container);
@@ -83,7 +83,7 @@ class ChillDocGeneratorExtension extends Extension implements PrependExtensionIn
]);
}
- private function prependClientConfig(ContainerBuilder $container)
+ private function prependClientConfig(ContainerBuilder $container): void
{
$configs = $container->getExtensionConfig($this->getAlias());
$resolvingBag = $container->getParameterBag();
diff --git a/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php b/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php
index 1b87ef926..b693a153d 100644
--- a/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php
+++ b/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php
@@ -26,7 +26,7 @@ class DocGeneratorTemplateType extends AbstractType
{
public function __construct(private readonly ContextManager $contextManager) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
/** @var DocGeneratorTemplate $template */
$template = $options['data'];
@@ -64,7 +64,7 @@ class DocGeneratorTemplateType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', DocGeneratorTemplate::class);
diff --git a/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php
index 8796b8e39..af6354f28 100644
--- a/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php
@@ -20,7 +20,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly TranslatorInterface $translator, private readonly Security $security) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if ($this->security->isGranted('ROLE_ADMIN')) {
$menu->addChild($this->translator->trans('docgen.Document generation'), [
diff --git a/src/Bundle/ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php b/src/Bundle/ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php
index bcf73abd0..37ce2cb89 100644
--- a/src/Bundle/ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php
+++ b/src/Bundle/ChillDocGeneratorBundle/Serializer/Encoder/DocGenEncoder.php
@@ -16,7 +16,7 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException;
class DocGenEncoder implements EncoderInterface
{
- public function encode($data, $format, array $context = [])
+ public function encode($data, $format, array $context = []): string
{
if (!$this->isAssociative($data)) {
throw new UnexpectedValueException('Only associative arrays are allowed; lists are not allowed');
@@ -28,7 +28,7 @@ class DocGenEncoder implements EncoderInterface
return $result;
}
- public function supportsEncoding($format)
+ public function supportsEncoding($format): bool
{
return 'docgen' === $format;
}
@@ -45,7 +45,7 @@ class DocGenEncoder implements EncoderInterface
return \array_keys($keys) !== $keys;
}
- private function recusiveEncoding(array $data, array &$result, $path)
+ private function recusiveEncoding(array $data, array &$result, $path): void
{
if ($this->isAssociative($data)) {
foreach ($data as $key => $value) {
diff --git a/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/CollectionDocGenNormalizer.php b/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/CollectionDocGenNormalizer.php
index 55c53c1d9..2e1eb0cf5 100644
--- a/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/CollectionDocGenNormalizer.php
+++ b/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/CollectionDocGenNormalizer.php
@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
/**
* Normalize a collection for docgen format.
*/
-class CollectionDocGenNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class CollectionDocGenNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
@@ -30,7 +30,7 @@ class CollectionDocGenNormalizer implements ContextAwareNormalizerInterface, Nor
*
* @return array|\ArrayObject|bool|float|int|string|void|null
*/
- public function normalize($object, $format = null, array $context = [])
+ public function normalize($object, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
$data = [];
@@ -45,7 +45,7 @@ class CollectionDocGenNormalizer implements ContextAwareNormalizerInterface, Nor
return $data;
}
- public function supportsNormalization($data, $format = null, array $context = [])
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
if ('docgen' !== $format) {
return false;
@@ -56,4 +56,15 @@ class CollectionDocGenNormalizer implements ContextAwareNormalizerInterface, Nor
|| (null === $data && ReadableCollection::class === ($context['docgen:expects'] ?? null))
;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ if ('docgen' !== $format) {
+ return [];
+ }
+ return [
+ ReadableCollection::class => true,
+ Collection::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php b/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
index e6cec30bb..e5c58cb43 100644
--- a/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
+++ b/src/Bundle/ChillDocGeneratorBundle/Serializer/Normalizer/DocGenObjectNormalizer.php
@@ -40,7 +40,7 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
$this->propertyAccess = PropertyAccess::createPropertyAccessor();
}
- public function normalize($object, $format = null, array $context = [])
+ public function normalize($object, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
$classMetadataKey = $object ?? $context['docgen:expects'] ?? null;
@@ -79,7 +79,7 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
return $this->normalizeObject($object, $format, $context, $expectedGroups, $metadata, $attributes);
}
- public function supportsNormalization($data, $format = null): bool
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
return 'docgen' === $format && (\is_object($data) || null === $data);
}
@@ -281,4 +281,15 @@ class DocGenObjectNormalizer implements NormalizerAwareInterface, NormalizerInte
return $data;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ if ('docgen' !== $format) {
+ return [];
+ }
+
+ return [
+ 'object' => false,
+ ];
+ }
}
diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnAfterMessageHandledClearStoredObjectCache.php b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnAfterMessageHandledClearStoredObjectCache.php
index 0256f8a8a..861cf77fe 100644
--- a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnAfterMessageHandledClearStoredObjectCache.php
+++ b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnAfterMessageHandledClearStoredObjectCache.php
@@ -28,7 +28,7 @@ final readonly class OnAfterMessageHandledClearStoredObjectCache implements Even
private LoggerInterface $logger,
) {}
- public static function getSubscribedEvents()
+ public static function getSubscribedEvents(): array
{
return [
WorkerMessageHandledEvent::class => [
diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php
index b9d538a63..209fecbb3 100644
--- a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php
+++ b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php
@@ -42,7 +42,7 @@ final readonly class OnGenerationFails implements EventSubscriberInterface
private UserRepositoryInterface $userRepository,
) {}
- public static function getSubscribedEvents()
+ public static function getSubscribedEvents(): array
{
return [
WorkerMessageFailedEvent::class => 'onMessageFailed',
diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php
index dbd45fde0..9921fcc12 100644
--- a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php
+++ b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php
@@ -48,7 +48,7 @@ class RequestGenerationHandler implements MessageHandlerInterface
private readonly TranslatorInterface $translator,
) {}
- public function __invoke(RequestGenerationMessage $message)
+ public function __invoke(RequestGenerationMessage $message): void
{
if (null === $template = $this->docGeneratorTemplateRepository->find($message->getTemplateId())) {
throw new \RuntimeException('template not found: '.$message->getTemplateId());
diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php
index b48f19719..65aa716a9 100644
--- a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php
+++ b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Encoder/DocGenEncoderTest.php
@@ -94,7 +94,7 @@ final class DocGenEncoderTest extends TestCase
];
}
- public function testEmbeddedLoopsThrowsException()
+ public function testEmbeddedLoopsThrowsException(): void
{
$this->expectException(UnexpectedValueException::class);
@@ -118,7 +118,7 @@ final class DocGenEncoderTest extends TestCase
/**
* @dataProvider generateEncodeData
*/
- public function testEncode(mixed $expected, mixed $data, string $msg)
+ public function testEncode(mixed $expected, mixed $data, string $msg): void
{
$generated = $this->encoder->encode($data, 'docgen');
$this->assertEquals($expected, $generated, $msg);
diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php
index c45ac5e20..0b8691367 100644
--- a/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php
+++ b/src/Bundle/ChillDocGeneratorBundle/tests/Serializer/Normalizer/DocGenObjectNormalizerTest.php
@@ -38,7 +38,7 @@ final class DocGenObjectNormalizerTest extends KernelTestCase
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
}
- public function testChangeContextOnAttribute()
+ public function testChangeContextOnAttribute(): void
{
$object = new TestableParentClass();
$actual = $this->normalizer->normalize(
@@ -81,7 +81,7 @@ final class DocGenObjectNormalizerTest extends KernelTestCase
$this->assertArrayNotHasKey('baz', $actual['child']);
}
- public function testNormalizableBooleanPropertyOrMethodOnNull()
+ public function testNormalizableBooleanPropertyOrMethodOnNull(): void
{
$actual = $this->normalizer->normalize(null, 'docgen', [AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => TestableClassWithBool::class]);
@@ -94,7 +94,7 @@ final class DocGenObjectNormalizerTest extends KernelTestCase
$this->assertEquals($expected, $actual);
}
- public function testNormalizationBasic()
+ public function testNormalizationBasic(): void
{
$scope = new Scope();
$scope->setName(['fr' => 'scope']);
@@ -110,7 +110,7 @@ final class DocGenObjectNormalizerTest extends KernelTestCase
$this->assertEquals($expected, $normalized, 'test normalization fo a scope');
}
- public function testNormalizeBooleanPropertyOrMethod()
+ public function testNormalizeBooleanPropertyOrMethod(): void
{
$testable = new TestableClassWithBool();
$testable->foo = false;
@@ -126,7 +126,7 @@ final class DocGenObjectNormalizerTest extends KernelTestCase
$this->assertEquals($expected, $actual);
}
- public function testNormalizeNull()
+ public function testNormalizeNull(): void
{
$actual = $this->normalizer->normalize(null, 'docgen', [AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => Scope::class]);
$expected = [
diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php
index c7821e2dd..79038d8e7 100644
--- a/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php
+++ b/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php
@@ -31,7 +31,7 @@ final class BaseContextDataTest extends KernelTestCase
self::bootKernel();
}
- public function testGenerateNoContext()
+ public function testGenerateNoContext(): void
{
$context = $this->buildBaseContext();
@@ -43,7 +43,7 @@ final class BaseContextDataTest extends KernelTestCase
$this->assertArrayHasKey('location', $actual);
}
- public function testGenerateWithUser()
+ public function testGenerateWithUser(): void
{
$context = $this->buildBaseContext();
diff --git a/src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php b/src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php
index 6910871de..024d6be7d 100644
--- a/src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php
+++ b/src/Bundle/ChillDocStoreBundle/ChillDocStoreBundle.php
@@ -21,7 +21,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillDocStoreBundle extends Bundle
{
- public function build(ContainerBuilder $container)
+ public function build(ContainerBuilder $container): void
{
$container->registerForAutoconfiguration(GenericDocForAccompanyingPeriodProviderInterface::class)
->addTag('chill_doc_store.generic_doc_accompanying_period_provider');
diff --git a/src/Bundle/ChillDocStoreBundle/Controller/AdminController.php b/src/Bundle/ChillDocStoreBundle/Controller/AdminController.php
index 1ad892891..cf00cdd5e 100644
--- a/src/Bundle/ChillDocStoreBundle/Controller/AdminController.php
+++ b/src/Bundle/ChillDocStoreBundle/Controller/AdminController.php
@@ -22,7 +22,7 @@ class AdminController extends AbstractController
* @return \Symfony\Component\HttpFoundation\Response
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/document', name: 'chill_docstore_admin', options: [null])]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillDocStore/Admin/layout.html.twig');
}
@@ -31,7 +31,7 @@ class AdminController extends AbstractController
* @return \Symfony\Component\HttpFoundation\RedirectResponse
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/document_redirect_to_main', name: 'chill_docstore_admin_redirect_to_admin_index', options: [null])]
- public function redirectToAdminIndexAction()
+ public function redirectToAdminIndexAction(): \Symfony\Component\HttpFoundation\RedirectResponse
{
return $this->redirectToRoute('chill_main_admin_central');
}
diff --git a/src/Bundle/ChillDocStoreBundle/DependencyInjection/ChillDocStoreExtension.php b/src/Bundle/ChillDocStoreBundle/DependencyInjection/ChillDocStoreExtension.php
index 6851441e0..84f4af985 100644
--- a/src/Bundle/ChillDocStoreBundle/DependencyInjection/ChillDocStoreExtension.php
+++ b/src/Bundle/ChillDocStoreBundle/DependencyInjection/ChillDocStoreExtension.php
@@ -27,7 +27,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillDocStoreExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -46,14 +46,14 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
$loader->load('services/security.yaml');
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->prependRoute($container);
$this->prependAuthorization($container);
$this->prependTwig($container);
}
- private function prependAuthorization(ContainerBuilder $container)
+ private function prependAuthorization(ContainerBuilder $container): void
{
$container->prependExtensionConfig('security', [
'role_hierarchy' => [
@@ -69,7 +69,7 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
]);
}
- private function prependRoute(ContainerBuilder $container)
+ private function prependRoute(ContainerBuilder $container): void
{
// declare routes for task bundle
$container->prependExtensionConfig('chill_main', [
@@ -81,7 +81,7 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
]);
}
- private function prependTwig(ContainerBuilder $container)
+ private function prependTwig(ContainerBuilder $container): void
{
$twigConfig = [
'form_themes' => ['@ChillDocStore/Form/fields.html.twig'],
diff --git a/src/Bundle/ChillDocStoreBundle/DependencyInjection/Compiler/StorageConfigurationCompilerPass.php b/src/Bundle/ChillDocStoreBundle/DependencyInjection/Compiler/StorageConfigurationCompilerPass.php
index f135b54a4..ff20a75e0 100644
--- a/src/Bundle/ChillDocStoreBundle/DependencyInjection/Compiler/StorageConfigurationCompilerPass.php
+++ b/src/Bundle/ChillDocStoreBundle/DependencyInjection/Compiler/StorageConfigurationCompilerPass.php
@@ -35,7 +35,7 @@ class StorageConfigurationCompilerPass implements CompilerPassInterface
StoredObjectContentToLocalStorageController::class,
];
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$config = $container
->getParameterBag()
diff --git a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php
index 9ff4c51fd..720ef2b78 100644
--- a/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php
+++ b/src/Bundle/ChillDocStoreBundle/Entity/AccompanyingCourseDocument.php
@@ -40,7 +40,7 @@ class AccompanyingCourseDocument extends Document implements HasScopesInterface,
return $this->course;
}
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
diff --git a/src/Bundle/ChillDocStoreBundle/Entity/Document.php b/src/Bundle/ChillDocStoreBundle/Entity/Document.php
index 089941f75..bf11bd023 100644
--- a/src/Bundle/ChillDocStoreBundle/Entity/Document.php
+++ b/src/Bundle/ChillDocStoreBundle/Entity/Document.php
@@ -85,7 +85,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
return (string) $this->getObject()?->getTitle();
}
- public function getUser()
+ public function getUser(): ?\Chill\MainBundle\Entity\User
{
return $this->user;
}
diff --git a/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php b/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php
index 37882c930..997967664 100644
--- a/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php
+++ b/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php
@@ -50,7 +50,7 @@ class DocumentCategory
return $this->bundleId;
}
- public function getDocumentClass()
+ public function getDocumentClass(): ?string
{
return $this->documentClass;
}
diff --git a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php
index 95afaee8d..d302288f1 100644
--- a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php
+++ b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php
@@ -36,12 +36,12 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt
#[ORM\ManyToOne(targetEntity: Scope::class)]
private ?Scope $scope = null;
- public function getCenter()
+ public function getCenter(): ?\Chill\MainBundle\Entity\Center
{
return $this->getPerson()->getCenter();
}
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
diff --git a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php
index c849abacc..005b29376 100644
--- a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php
+++ b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php
@@ -186,7 +186,7 @@ class StoredObject implements Document, TrackCreationInterface
/**
* @deprecated use method "getFilename()"
*/
- public function getObjectName()
+ public function getObjectName(): string
{
return $this->getFilename();
}
diff --git a/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php b/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php
index 42711b01a..79cbbf507 100644
--- a/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php
+++ b/src/Bundle/ChillDocStoreBundle/Form/AccompanyingCourseDocumentType.php
@@ -30,7 +30,7 @@ final class AccompanyingCourseDocumentType extends AbstractType
private readonly TranslatableStringHelperInterface $translatableStringHelper,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TextType::class)
@@ -52,7 +52,7 @@ final class AccompanyingCourseDocumentType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Document::class,
diff --git a/src/Bundle/ChillDocStoreBundle/Form/CollectionStoredObjectType.php b/src/Bundle/ChillDocStoreBundle/Form/CollectionStoredObjectType.php
index fd14897bf..bcb8a6d1b 100644
--- a/src/Bundle/ChillDocStoreBundle/Form/CollectionStoredObjectType.php
+++ b/src/Bundle/ChillDocStoreBundle/Form/CollectionStoredObjectType.php
@@ -17,7 +17,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class CollectionStoredObjectType extends AbstractType
{
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('entry_type', StoredObjectType::class)
@@ -30,7 +30,7 @@ class CollectionStoredObjectType extends AbstractType
->setDefault('js_caller', 'data-collection-stored-object');
}
- public function getParent()
+ public function getParent(): ?string
{
return ChillCollectionType::class;
}
diff --git a/src/Bundle/ChillDocStoreBundle/Form/DataMapper/StoredObjectDataMapper.php b/src/Bundle/ChillDocStoreBundle/Form/DataMapper/StoredObjectDataMapper.php
index 264f52365..3cf110d42 100644
--- a/src/Bundle/ChillDocStoreBundle/Form/DataMapper/StoredObjectDataMapper.php
+++ b/src/Bundle/ChillDocStoreBundle/Form/DataMapper/StoredObjectDataMapper.php
@@ -23,7 +23,7 @@ class StoredObjectDataMapper implements DataMapperInterface
/**
* @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances
*/
- public function mapDataToForms($viewData, \Traversable $forms)
+ public function mapDataToForms($viewData, \Traversable $forms): void
{
if (null === $viewData) {
return;
@@ -43,7 +43,7 @@ class StoredObjectDataMapper implements DataMapperInterface
/**
* @param FormInterface[]|\Traversable $forms A list of {@link FormInterface} instances
*/
- public function mapFormsToData(\Traversable $forms, &$viewData)
+ public function mapFormsToData(\Traversable $forms, &$viewData): void
{
$forms = iterator_to_array($forms);
diff --git a/src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php b/src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php
index e51d124e1..338b581db 100644
--- a/src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php
+++ b/src/Bundle/ChillDocStoreBundle/Form/DocumentCategoryType.php
@@ -23,7 +23,7 @@ class DocumentCategoryType extends AbstractType
{
public function __construct(private readonly TranslatorInterface $translator) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$bundles = [
'chill-doc-store' => 'chill-doc-store',
@@ -51,7 +51,7 @@ class DocumentCategoryType extends AbstractType
->add('name', TranslatableStringFormType::class);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => DocumentCategory::class,
diff --git a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php
index 0addd53cc..3f44315b7 100644
--- a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php
+++ b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php
@@ -32,7 +32,7 @@ class PersonDocumentType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly ScopeResolverDispatcher $scopeResolverDispatcher, private readonly ParameterBagInterface $parameterBag, private readonly CenterResolverDispatcher $centerResolverDispatcher) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$document = $options['data'];
$isScopeConcerned = $this->scopeResolverDispatcher->isConcerned($document);
@@ -63,7 +63,7 @@ class PersonDocumentType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Document::class,
diff --git a/src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php b/src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php
index 3e4ceb163..6cad087a9 100644
--- a/src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php
+++ b/src/Bundle/ChillDocStoreBundle/Form/StoredObjectType.php
@@ -30,7 +30,7 @@ final class StoredObjectType extends AbstractType
private readonly StoredObjectDataMapper $storedObjectDataMapper,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
if (true === $options['has_title']) {
$builder
@@ -44,7 +44,7 @@ final class StoredObjectType extends AbstractType
$builder->setDataMapper($this->storedObjectDataMapper);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('data_class', StoredObject::class);
diff --git a/src/Bundle/ChillDocStoreBundle/Form/Type/AsyncUploaderType.php b/src/Bundle/ChillDocStoreBundle/Form/Type/AsyncUploaderType.php
index cd87fa922..f8c704fda 100644
--- a/src/Bundle/ChillDocStoreBundle/Form/Type/AsyncUploaderType.php
+++ b/src/Bundle/ChillDocStoreBundle/Form/Type/AsyncUploaderType.php
@@ -36,7 +36,7 @@ class AsyncUploaderType extends AbstractType
$this->max_post_file_size = $config['max_post_file_size'];
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'expires_delay' => $this->expires_delay,
@@ -56,7 +56,7 @@ class AsyncUploaderType extends AbstractType
FormView $view,
FormInterface $form,
array $options,
- ) {
+ ): void {
$view->vars['attr']['data-async-file-upload'] = true;
$view->vars['attr']['data-generate-temp-url-post'] = $this
->url_generator->generate('async_upload.generate_url', [
@@ -70,7 +70,7 @@ class AsyncUploaderType extends AbstractType
$view->vars['attr']['data-max-post-size'] = $options['max_post_size'];
}
- public function getParent()
+ public function getParent(): ?string
{
return HiddenType::class;
}
diff --git a/src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php
index 466c3bace..03df6570f 100644
--- a/src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php b/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php
index 485c95078..5037913e2 100644
--- a/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php
+++ b/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php
@@ -22,7 +22,7 @@ final readonly class MenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private Security $security, private TranslatorInterface $translator) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
match ($menuId) {
'accompanyingCourse' => $this->buildMenuAccompanyingCourse($menu, $parameters),
@@ -36,7 +36,7 @@ final readonly class MenuBuilder implements LocalMenuBuilderInterface
return ['person', 'accompanyingCourse'];
}
- private function buildMenuAccompanyingCourse(MenuItem $menu, array $parameters)
+ private function buildMenuAccompanyingCourse(MenuItem $menu, array $parameters): void
{
$course = $parameters['accompanyingCourse'];
@@ -53,7 +53,7 @@ final readonly class MenuBuilder implements LocalMenuBuilderInterface
}
}
- private function buildMenuPerson(MenuItem $menu, array $parameters)
+ private function buildMenuPerson(MenuItem $menu, array $parameters): void
{
/** @var \Chill\PersonBundle\Entity\Person $person */
$person = $parameters['person'];
diff --git a/src/Bundle/ChillDocStoreBundle/Security/Authorization/PersonDocumentVoter.php b/src/Bundle/ChillDocStoreBundle/Security/Authorization/PersonDocumentVoter.php
index 327581e31..404b7e2c1 100644
--- a/src/Bundle/ChillDocStoreBundle/Security/Authorization/PersonDocumentVoter.php
+++ b/src/Bundle/ChillDocStoreBundle/Security/Authorization/PersonDocumentVoter.php
@@ -70,7 +70,7 @@ class PersonDocumentVoter extends AbstractChillVoter implements ProvideRoleHiera
return [];
}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
return $this->voterHelper->supports($attribute, $subject);
}
@@ -81,7 +81,7 @@ class PersonDocumentVoter extends AbstractChillVoter implements ProvideRoleHiera
*
* @return bool
*/
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
{
$this->logger->debug(sprintf('Voting from %s class', self::class));
diff --git a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/GenericDocNormalizer.php b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/GenericDocNormalizer.php
index f3aa33243..2faf387b0 100644
--- a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/GenericDocNormalizer.php
+++ b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/GenericDocNormalizer.php
@@ -60,8 +60,19 @@ class GenericDocNormalizer implements NormalizerInterface, NormalizerAwareInterf
return $data;
}
- public function supportsNormalization($data, ?string $format = null): bool
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return 'json' === $format && $data instanceof GenericDocDTO;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ if ('json' !== $format) {
+ return [];
+ }
+
+ return [
+ GenericDocDTO::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php
index fe6cbebb0..cb1d20deb 100644
--- a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php
+++ b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php
@@ -67,7 +67,7 @@ class StoredObjectDenormalizer implements DenormalizerInterface
return $storedObject;
}
- public function supportsDenormalization($data, $type, $format = null): bool
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
if (StoredObject::class !== $type) {
return false;
@@ -83,4 +83,9 @@ class StoredObjectDenormalizer implements DenormalizerInterface
return false;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ // TODO: Implement getSupportedTypes() method.
+ }
}
diff --git a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectNormalizer.php b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectNormalizer.php
index 97067f289..dc333e41f 100644
--- a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectNormalizer.php
+++ b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectNormalizer.php
@@ -44,7 +44,7 @@ final class StoredObjectNormalizer implements NormalizerInterface, NormalizerAwa
private readonly TempUrlGeneratorInterface $tempUrlGenerator,
) {}
- public function normalize($object, ?string $format = null, array $context = [])
+ public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
/** @var StoredObject $object */
$datas = [
@@ -113,8 +113,19 @@ final class StoredObjectNormalizer implements NormalizerInterface, NormalizerAwa
return $datas;
}
- public function supportsNormalization($data, ?string $format = null)
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof StoredObject && 'json' === $format;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ if ('json' !== $format) {
+ return [];
+ }
+
+ return [
+ StoredObject::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectPointInTimeNormalizer.php b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectPointInTimeNormalizer.php
index be8fc5f98..03be828eb 100644
--- a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectPointInTimeNormalizer.php
+++ b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectPointInTimeNormalizer.php
@@ -21,7 +21,7 @@ class StoredObjectPointInTimeNormalizer implements NormalizerInterface, Normaliz
{
use NormalizerAwareTrait;
- public function normalize($object, ?string $format = null, array $context = [])
+ public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
/* @var StoredObjectPointInTime $object */
return [
@@ -31,8 +31,15 @@ class StoredObjectPointInTimeNormalizer implements NormalizerInterface, Normaliz
];
}
- public function supportsNormalization($data, ?string $format = null)
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof StoredObjectPointInTime;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ return [
+ StoredObjectPointInTime::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectVersionNormalizer.php b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectVersionNormalizer.php
index 4b18989cb..ce3833b6e 100644
--- a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectVersionNormalizer.php
+++ b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectVersionNormalizer.php
@@ -26,7 +26,7 @@ class StoredObjectVersionNormalizer implements NormalizerInterface, NormalizerAw
final public const WITH_RESTORED_CONTEXT = 'with-restored';
- public function normalize($object, ?string $format = null, array $context = [])
+ public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
if (!$object instanceof StoredObjectVersion) {
throw new \InvalidArgumentException('The object must be an instance of '.StoredObjectVersion::class);
@@ -54,8 +54,15 @@ class StoredObjectVersionNormalizer implements NormalizerInterface, NormalizerAw
return $data;
}
- public function supportsNormalization($data, ?string $format = null, array $context = [])
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof StoredObjectVersion;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ return [
+ StoredObjectVersion::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillDocStoreBundle/Service/Signature/PDFSignatureZoneAvailable.php b/src/Bundle/ChillDocStoreBundle/Service/Signature/PDFSignatureZoneAvailable.php
index 67fbd89ba..bbb6ff9fe 100644
--- a/src/Bundle/ChillDocStoreBundle/Service/Signature/PDFSignatureZoneAvailable.php
+++ b/src/Bundle/ChillDocStoreBundle/Service/Signature/PDFSignatureZoneAvailable.php
@@ -31,12 +31,12 @@ class PDFSignatureZoneAvailable implements LocaleAwareInterface
private readonly WopiConverter $converter,
) {}
- public function setLocale(string $locale)
+ public function setLocale(string $locale): void
{
$this->locale = $locale;
}
- public function getLocale()
+ public function getLocale(): string
{
return $this->locale;
}
diff --git a/src/Bundle/ChillDocStoreBundle/Tests/AsyncUpload/Driver/OpenstackObjectStore/StoredObjectManagerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/AsyncUpload/Driver/OpenstackObjectStore/StoredObjectManagerTest.php
index d0cb6cb02..1d66307fb 100644
--- a/src/Bundle/ChillDocStoreBundle/Tests/AsyncUpload/Driver/OpenstackObjectStore/StoredObjectManagerTest.php
+++ b/src/Bundle/ChillDocStoreBundle/Tests/AsyncUpload/Driver/OpenstackObjectStore/StoredObjectManagerTest.php
@@ -153,7 +153,7 @@ final class StoredObjectManagerTest extends TestCase
/**
* @dataProvider getDataProviderForRead
*/
- public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null)
+ public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null): void
{
if (null !== $exceptionClass) {
$this->expectException($exceptionClass);
@@ -167,7 +167,7 @@ final class StoredObjectManagerTest extends TestCase
/**
* @dataProvider getDataProviderForWrite
*/
- public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null, ?int $errorCode = null)
+ public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null, ?int $errorCode = null): void
{
if (null !== $exceptionClass) {
$this->expectException($exceptionClass);
@@ -228,7 +228,7 @@ final class StoredObjectManagerTest extends TestCase
$storedObjectManager->delete($version);
}
- public function testWriteWithDeleteAt()
+ public function testWriteWithDeleteAt(): void
{
$storedObject = new StoredObject();
diff --git a/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/GenericDocNormalizerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/GenericDocNormalizerTest.php
index 0d5eb818c..aa3db2823 100644
--- a/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/GenericDocNormalizerTest.php
+++ b/src/Bundle/ChillDocStoreBundle/Tests/Serializer/Normalizer/GenericDocNormalizerTest.php
@@ -42,7 +42,7 @@ class GenericDocNormalizerTest extends TestCase
$this->normalizer->setNormalizer($innerNormalizer);
}
- public function testNormalize()
+ public function testNormalize(): void
{
$docDate = new \DateTimeImmutable('2023-10-01T15:03:01.012345Z');
diff --git a/src/Bundle/ChillDocStoreBundle/Tests/Service/Signature/Driver/BaseSigner/RequestPdfSignMessageSerializerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/Service/Signature/Driver/BaseSigner/RequestPdfSignMessageSerializerTest.php
index 312fabb19..d8f542f9e 100644
--- a/src/Bundle/ChillDocStoreBundle/Tests/Service/Signature/Driver/BaseSigner/RequestPdfSignMessageSerializerTest.php
+++ b/src/Bundle/ChillDocStoreBundle/Tests/Service/Signature/Driver/BaseSigner/RequestPdfSignMessageSerializerTest.php
@@ -113,18 +113,18 @@ class RequestPdfSignMessageSerializerTest extends TestCase
];
}
- public function supportsNormalization($data, ?string $format = null): bool
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof PDFSignatureZone;
}
};
$denormalizer = new class () implements DenormalizerInterface {
- public function denormalize($data, string $type, ?string $format = null, array $context = [])
+ public function denormalize($data, string $type, ?string $format = null, array $context = []): mixed
{
return new PDFSignatureZone(0, 10.0, 10.0, 180.0, 180.0, new PDFPage(0, 500.0, 800.0));
}
- public function supportsDenormalization($data, string $type, ?string $format = null)
+ public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool
{
return PDFSignatureZone::class === $type;
}
diff --git a/src/Bundle/ChillDocStoreBundle/Tests/Validator/Constraints/AsyncFileExistsValidatorTest.php b/src/Bundle/ChillDocStoreBundle/Tests/Validator/Constraints/AsyncFileExistsValidatorTest.php
index 77f6d872e..0f494d113 100644
--- a/src/Bundle/ChillDocStoreBundle/Tests/Validator/Constraints/AsyncFileExistsValidatorTest.php
+++ b/src/Bundle/ChillDocStoreBundle/Tests/Validator/Constraints/AsyncFileExistsValidatorTest.php
@@ -29,7 +29,7 @@ class AsyncFileExistsValidatorTest extends ConstraintValidatorTestCase
{
use ProphecyTrait;
- protected function createValidator()
+ protected function createValidator(): \Symfony\Component\Validator\ConstraintValidatorInterface
{
$storedObjectManager = $this->prophesize(StoredObjectManagerInterface::class);
$storedObjectManager->exists(Argument::any())
diff --git a/src/Bundle/ChillDocStoreBundle/Tests/Workflow/AccompanyingCourseDocumentWorkflowHandlerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/Workflow/AccompanyingCourseDocumentWorkflowHandlerTest.php
index cf8bc9c7c..b545d1bfd 100644
--- a/src/Bundle/ChillDocStoreBundle/Tests/Workflow/AccompanyingCourseDocumentWorkflowHandlerTest.php
+++ b/src/Bundle/ChillDocStoreBundle/Tests/Workflow/AccompanyingCourseDocumentWorkflowHandlerTest.php
@@ -35,7 +35,7 @@ class AccompanyingCourseDocumentWorkflowHandlerTest extends TestCase
{
use ProphecyTrait;
- public function testGetSuggestedUsers()
+ public function testGetSuggestedUsers(): void
{
$accompanyingPeriod = new AccompanyingPeriod();
$document = new AccompanyingCourseDocument();
@@ -60,7 +60,7 @@ class AccompanyingCourseDocumentWorkflowHandlerTest extends TestCase
self::assertContains($user1, $users);
}
- public function testGetSuggestedUsersWithDuplicates()
+ public function testGetSuggestedUsersWithDuplicates(): void
{
$accompanyingPeriod = new AccompanyingPeriod();
$document = new AccompanyingCourseDocument();
diff --git a/src/Bundle/ChillDocStoreBundle/Validator/Constraints/AsyncFileExists.php b/src/Bundle/ChillDocStoreBundle/Validator/Constraints/AsyncFileExists.php
index b76ddae68..9319c60df 100644
--- a/src/Bundle/ChillDocStoreBundle/Validator/Constraints/AsyncFileExists.php
+++ b/src/Bundle/ChillDocStoreBundle/Validator/Constraints/AsyncFileExists.php
@@ -27,12 +27,12 @@ final class AsyncFileExists extends Constraint
}
}
- public function validatedBy()
+ public function validatedBy(): string
{
return AsyncFileExistsValidator::class;
}
- public function getTargets()
+ public function getTargets(): string|array
{
return [Constraint::CLASS_CONSTRAINT, Constraint::PROPERTY_CONSTRAINT];
}
diff --git a/src/Bundle/ChillEventBundle/Controller/AdminController.php b/src/Bundle/ChillEventBundle/Controller/AdminController.php
index 5e8bd3023..3423bdc11 100644
--- a/src/Bundle/ChillEventBundle/Controller/AdminController.php
+++ b/src/Bundle/ChillEventBundle/Controller/AdminController.php
@@ -24,7 +24,7 @@ class AdminController extends AbstractController
* Event admin.
*/
#[Route(path: '/{_locale}/admin/event', name: 'chill_event_admin_index')]
- public function indexAdminAction()
+ public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillEvent/Admin/index.html.twig');
}
diff --git a/src/Bundle/ChillEventBundle/Controller/EventController.php b/src/Bundle/ChillEventBundle/Controller/EventController.php
index b4f099769..5006cc1eb 100644
--- a/src/Bundle/ChillEventBundle/Controller/EventController.php
+++ b/src/Bundle/ChillEventBundle/Controller/EventController.php
@@ -160,7 +160,7 @@ final class EventController extends AbstractController
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/most_recent', name: 'chill_event_list_most_recent', options: [null])]
- public function mostRecentIndexAction()
+ public function mostRecentIndexAction(): \Symfony\Component\HttpFoundation\RedirectResponse
{
return $this->redirectToRoute('chill_main_search', [
'q' => '@event',
@@ -331,7 +331,7 @@ final class EventController extends AbstractController
*
* @return \Symfony\Component\Form\FormInterface
*/
- protected function createAddEventParticipationByPersonForm(Person $person)
+ protected function createAddEventParticipationByPersonForm(Person $person): \Symfony\Component\Form\FormInterface
{
/** @var \Symfony\Component\Form\FormBuilderInterface $builder */
$builder = $this
@@ -378,7 +378,7 @@ final class EventController extends AbstractController
*
* @return \Symfony\Component\Form\FormInterface
*/
- protected function createAddParticipationByPersonForm(Event $event)
+ protected function createAddParticipationByPersonForm(Event $event): \Symfony\Component\Form\FormInterface
{
$builder = $this->formFactoryInterface
->createNamedBuilder(
@@ -409,7 +409,7 @@ final class EventController extends AbstractController
/**
* @return \Symfony\Component\Form\FormInterface
*/
- protected function createExportByFormatForm()
+ protected function createExportByFormatForm(): \Symfony\Component\Form\FormInterface
{
$builder = $this->createFormBuilder(['format' => 'xlsx'])
->add('format', ChoiceType::class, [
@@ -433,7 +433,7 @@ final class EventController extends AbstractController
*
* @throws \PhpOffice\PhpSpreadsheet\Exception
*/
- protected function createExportSpreadsheet(Event $event)
+ protected function createExportSpreadsheet(Event $event): \PhpOffice\PhpSpreadsheet\Spreadsheet
{
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
@@ -577,7 +577,7 @@ final class EventController extends AbstractController
/**
* @return \Symfony\Component\Form\FormInterface
*/
- private function createDeleteForm($event_id)
+ private function createDeleteForm($event_id): \Symfony\Component\Form\FormInterface
{
return $this->createFormBuilder()
->setAction($this->generateUrl('chill_event__event_delete', [
diff --git a/src/Bundle/ChillEventBundle/Controller/EventTypeController.php b/src/Bundle/ChillEventBundle/Controller/EventTypeController.php
index f7b1b205c..79ca2b8e7 100644
--- a/src/Bundle/ChillEventBundle/Controller/EventTypeController.php
+++ b/src/Bundle/ChillEventBundle/Controller/EventTypeController.php
@@ -28,7 +28,7 @@ class EventTypeController extends AbstractController
* Creates a new EventType entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/create', name: 'chill_eventtype_admin_create', methods: ['POST'])]
- public function createAction(Request $request)
+ public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$entity = new EventType();
$form = $this->createCreateForm($entity);
@@ -52,7 +52,7 @@ class EventTypeController extends AbstractController
* Deletes a EventType entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/{id}/delete', name: 'chill_eventtype_admin_delete', methods: ['POST', 'DELETE'])]
- public function deleteAction(Request $request, mixed $id)
+ public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse
{
$form = $this->createDeleteForm($id);
$form->handleRequest($request);
@@ -76,7 +76,7 @@ class EventTypeController extends AbstractController
* Displays a form to edit an existing EventType entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/{id}/edit', name: 'chill_eventtype_admin_edit')]
- public function editAction(mixed $id)
+ public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -100,7 +100,7 @@ class EventTypeController extends AbstractController
* Lists all EventType entities.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/', name: 'chill_eventtype_admin', options: [null])]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -115,7 +115,7 @@ class EventTypeController extends AbstractController
* Displays a form to create a new EventType entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/new', name: 'chill_eventtype_admin_new')]
- public function newAction()
+ public function newAction(): \Symfony\Component\HttpFoundation\Response
{
$entity = new EventType();
$form = $this->createCreateForm($entity);
@@ -130,7 +130,7 @@ class EventTypeController extends AbstractController
* Finds and displays a EventType entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/{id}/show', name: 'chill_eventtype_admin_show')]
- public function showAction(mixed $id)
+ public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -152,7 +152,7 @@ class EventTypeController extends AbstractController
* Edits an existing EventType entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/event_type/{id}/update', name: 'chill_eventtype_admin_update', methods: ['POST', 'PUT'])]
- public function updateAction(Request $request, mixed $id)
+ public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -203,7 +203,7 @@ class EventTypeController extends AbstractController
*
* @return \Symfony\Component\Form\FormInterface The form
*/
- private function createDeleteForm(mixed $id)
+ private function createDeleteForm(mixed $id): \Symfony\Component\Form\FormInterface
{
return $this->createFormBuilder()
->setAction($this->generateUrl(
diff --git a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php
index 2449528de..562b224cd 100644
--- a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php
+++ b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php
@@ -453,7 +453,7 @@ final class ParticipationController extends AbstractController
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{event_id}/update_multiple', name: 'chill_event_participation_update_multiple', methods: ['POST'])]
- public function updateMultipleAction(mixed $event_id, Request $request)
+ public function updateMultipleAction(mixed $event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
/** @var Event $event */
$event = $this->managerRegistry->getRepository(Event::class)
@@ -689,7 +689,7 @@ final class ParticipationController extends AbstractController
*
* @return Response
*/
- protected function newSingle(Request $request)
+ protected function newSingle(Request $request): \Symfony\Component\HttpFoundation\Response
{
$returnPath = $request->query->has('return_path') ?
$request->query->get('return_path') : null;
@@ -720,7 +720,7 @@ final class ParticipationController extends AbstractController
*
* @throws \RuntimeException if an error is detected
*/
- protected function testRequest(Request $request)
+ protected function testRequest(Request $request): void
{
$single = $request->query->has('person_id');
$multiple = $request->query->has('persons_ids');
@@ -747,7 +747,7 @@ final class ParticipationController extends AbstractController
/**
* @return FormInterface
*/
- private function createDeleteForm($participation_id)
+ private function createDeleteForm($participation_id): \Symfony\Component\Form\FormInterface
{
return $this->createFormBuilder()
->setAction($this->generateUrl('chill_event_participation_delete', [
diff --git a/src/Bundle/ChillEventBundle/Controller/RoleController.php b/src/Bundle/ChillEventBundle/Controller/RoleController.php
index 1ff205dfc..be071b473 100644
--- a/src/Bundle/ChillEventBundle/Controller/RoleController.php
+++ b/src/Bundle/ChillEventBundle/Controller/RoleController.php
@@ -28,7 +28,7 @@ class RoleController extends AbstractController
* Creates a new Role entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/create', name: 'chill_event_admin_role_create', methods: ['POST'])]
- public function createAction(Request $request)
+ public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$entity = new Role();
$form = $this->createCreateForm($entity);
@@ -52,7 +52,7 @@ class RoleController extends AbstractController
* Deletes a Role entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/{id}/delete', name: 'chill_event_admin_role_delete', methods: ['POST', 'DELETE'])]
- public function deleteAction(Request $request, mixed $id)
+ public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse
{
$form = $this->createDeleteForm($id);
$form->handleRequest($request);
@@ -76,7 +76,7 @@ class RoleController extends AbstractController
* Displays a form to edit an existing Role entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/{id}/edit', name: 'chill_event_admin_role_edit')]
- public function editAction(mixed $id)
+ public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -100,7 +100,7 @@ class RoleController extends AbstractController
* Lists all Role entities.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/', name: 'chill_event_admin_role', options: [null])]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -115,7 +115,7 @@ class RoleController extends AbstractController
* Displays a form to create a new Role entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/new', name: 'chill_event_admin_role_new')]
- public function newAction()
+ public function newAction(): \Symfony\Component\HttpFoundation\Response
{
$entity = new Role();
$form = $this->createCreateForm($entity);
@@ -130,7 +130,7 @@ class RoleController extends AbstractController
* Finds and displays a Role entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/{id}/show', name: 'chill_event_admin_role_show')]
- public function showAction(mixed $id)
+ public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -152,7 +152,7 @@ class RoleController extends AbstractController
* Edits an existing Role entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/role/{id}/update', name: 'chill_event_admin_role_update', methods: ['POST', 'PUT'])]
- public function updateAction(Request $request, mixed $id)
+ public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -203,7 +203,7 @@ class RoleController extends AbstractController
*
* @return \Symfony\Component\Form\FormInterface The form
*/
- private function createDeleteForm(mixed $id)
+ private function createDeleteForm(mixed $id): \Symfony\Component\Form\FormInterface
{
return $this->createFormBuilder()
->setAction($this->generateUrl('chill_event_admin_role_delete', ['id' => $id]))
diff --git a/src/Bundle/ChillEventBundle/Controller/StatusController.php b/src/Bundle/ChillEventBundle/Controller/StatusController.php
index 3b302500d..296c225ad 100644
--- a/src/Bundle/ChillEventBundle/Controller/StatusController.php
+++ b/src/Bundle/ChillEventBundle/Controller/StatusController.php
@@ -28,7 +28,7 @@ class StatusController extends AbstractController
* Creates a new Status entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/create', name: 'chill_event_admin_status_create', methods: ['POST'])]
- public function createAction(Request $request)
+ public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$entity = new Status();
$form = $this->createCreateForm($entity);
@@ -52,7 +52,7 @@ class StatusController extends AbstractController
* Deletes a Status entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/{id}/delete', name: 'chill_event_admin_status_delete', methods: ['POST', 'DELETE'])]
- public function deleteAction(Request $request, mixed $id)
+ public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse
{
$form = $this->createDeleteForm($id);
$form->handleRequest($request);
@@ -76,7 +76,7 @@ class StatusController extends AbstractController
* Displays a form to edit an existing Status entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/{id}/edit', name: 'chill_event_admin_status_edit')]
- public function editAction(mixed $id)
+ public function editAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -100,7 +100,7 @@ class StatusController extends AbstractController
* Lists all Status entities.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/', name: 'chill_event_admin_status', options: [null])]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -115,7 +115,7 @@ class StatusController extends AbstractController
* Displays a form to create a new Status entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/new', name: 'chill_event_admin_status_new')]
- public function newAction()
+ public function newAction(): \Symfony\Component\HttpFoundation\Response
{
$entity = new Status();
$form = $this->createCreateForm($entity);
@@ -130,7 +130,7 @@ class StatusController extends AbstractController
* Finds and displays a Status entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/{id}/show', name: 'chill_event_admin_status_show')]
- public function showAction(mixed $id)
+ public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -152,7 +152,7 @@ class StatusController extends AbstractController
* Edits an existing Status entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/event/status/{id}/update', name: 'chill_event_admin_status_update', methods: ['POST', 'PUT'])]
- public function updateAction(Request $request, mixed $id)
+ public function updateAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -203,7 +203,7 @@ class StatusController extends AbstractController
*
* @return \Symfony\Component\Form\FormInterface The form
*/
- private function createDeleteForm(mixed $id)
+ private function createDeleteForm(mixed $id): \Symfony\Component\Form\FormInterface
{
return $this->createFormBuilder()
->setAction($this->generateUrl('chill_event_admin_status_delete', ['id' => $id]))
diff --git a/src/Bundle/ChillEventBundle/DependencyInjection/ChillEventExtension.php b/src/Bundle/ChillEventBundle/DependencyInjection/ChillEventExtension.php
index 0b30ca6c5..1aecc6365 100644
--- a/src/Bundle/ChillEventBundle/DependencyInjection/ChillEventExtension.php
+++ b/src/Bundle/ChillEventBundle/DependencyInjection/ChillEventExtension.php
@@ -26,7 +26,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillEventExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -45,7 +45,7 @@ class ChillEventExtension extends Extension implements PrependExtensionInterface
/** (non-PHPdoc).
* @see \Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface::prepend()
*/
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->prependAuthorization($container);
$this->prependRoute($container);
diff --git a/src/Bundle/ChillEventBundle/Entity/Event.php b/src/Bundle/ChillEventBundle/Entity/Event.php
index c065ed94f..15302b05e 100644
--- a/src/Bundle/ChillEventBundle/Entity/Event.php
+++ b/src/Bundle/ChillEventBundle/Entity/Event.php
@@ -129,7 +129,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/**
* @return Center
*/
- public function getCenter()
+ public function getCenter(): ?\Chill\MainBundle\Entity\Center
{
return $this->center;
}
@@ -137,7 +137,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/**
* @return Scope
*/
- public function getCircle()
+ public function getCircle(): ?\Chill\MainBundle\Entity\Scope
{
return $this->circle;
}
@@ -147,7 +147,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
*
* @return \DateTime
*/
- public function getDate()
+ public function getDate(): ?\DateTime
{
return $this->date;
}
@@ -157,7 +157,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -172,7 +172,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
*
* @return string
*/
- public function getName()
+ public function getName(): ?string
{
return $this->name;
}
@@ -202,7 +202,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
*
* @return Scope
*/
- public function getScope()
+ public function getScope(): ?\Chill\MainBundle\Entity\Scope
{
return $this->getCircle();
}
@@ -210,7 +210,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/**
* @return EventType
*/
- public function getType()
+ public function getType(): ?\Chill\EventBundle\Entity\EventType
{
return $this->type;
}
@@ -218,7 +218,7 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/**
* Remove participation.
*/
- public function removeParticipation(Participation $participation)
+ public function removeParticipation(Participation $participation): void
{
$this->participations->removeElement($participation);
}
diff --git a/src/Bundle/ChillEventBundle/Entity/EventType.php b/src/Bundle/ChillEventBundle/Entity/EventType.php
index b0f81f906..faf788503 100644
--- a/src/Bundle/ChillEventBundle/Entity/EventType.php
+++ b/src/Bundle/ChillEventBundle/Entity/EventType.php
@@ -87,7 +87,7 @@ class EventType
*
* @return bool
*/
- public function getActive()
+ public function getActive(): bool
{
return $this->active;
}
@@ -97,7 +97,7 @@ class EventType
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -112,7 +112,7 @@ class EventType
return $this->name;
}
- public function getRoles()
+ public function getRoles(): \Doctrine\Common\Collections\Collection
{
return $this->roles;
}
@@ -122,7 +122,7 @@ class EventType
*
* @return Collection
*/
- public function getStatuses()
+ public function getStatuses(): \Doctrine\Common\Collections\Collection
{
return $this->statuses;
}
@@ -130,7 +130,7 @@ class EventType
/**
* Remove role.
*/
- public function removeRole(Role $role)
+ public function removeRole(Role $role): void
{
$this->roles->removeElement($role);
}
@@ -138,7 +138,7 @@ class EventType
/**
* Remove status.
*/
- public function removeStatus(Status $status)
+ public function removeStatus(Status $status): void
{
$this->statuses->removeElement($status);
}
diff --git a/src/Bundle/ChillEventBundle/Entity/Participation.php b/src/Bundle/ChillEventBundle/Entity/Participation.php
index 0225799c5..45b22c755 100644
--- a/src/Bundle/ChillEventBundle/Entity/Participation.php
+++ b/src/Bundle/ChillEventBundle/Entity/Participation.php
@@ -58,7 +58,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
#[ORM\ManyToOne(targetEntity: Status::class)]
private ?Status $status = null;
- public function getCenter()
+ public function getCenter(): ?\Chill\MainBundle\Entity\Center
{
if (null === $this->getEvent()) {
throw new \RuntimeException('The event is not linked with this instance. You should initialize the event with a valid center before.');
@@ -88,7 +88,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
*
* @return \DateTimeInterface|null
*/
- public function getLastUpdate()
+ public function getLastUpdate(): ?\DateTimeInterface
{
return $this->getUpdatedAt();
}
@@ -98,7 +98,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
*
* @return Person
*/
- public function getPerson()
+ public function getPerson(): ?\Chill\PersonBundle\Entity\Person
{
return $this->person;
}
@@ -114,7 +114,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
/**
* @return Scope
*/
- public function getScope()
+ public function getScope(): ?\Chill\MainBundle\Entity\Scope
{
if (null === $this->getEvent()) {
throw new \RuntimeException('The event is not linked with this instance. You should initialize the event with a valid center before.');
@@ -137,7 +137,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
* - the role can be associated with this event type
* - the status can be associated with this event type
*/
- public function isConsistent(ExecutionContextInterface $context)
+ public function isConsistent(ExecutionContextInterface $context): void
{
if (null === $this->getEvent() || null === $this->getRole() || null === $this->getStatus()) {
return;
diff --git a/src/Bundle/ChillEventBundle/Entity/Role.php b/src/Bundle/ChillEventBundle/Entity/Role.php
index 7dbd8700c..2180d3a0f 100644
--- a/src/Bundle/ChillEventBundle/Entity/Role.php
+++ b/src/Bundle/ChillEventBundle/Entity/Role.php
@@ -43,7 +43,7 @@ class Role
*
* @return bool
*/
- public function getActive()
+ public function getActive(): bool
{
return $this->active;
}
@@ -53,7 +53,7 @@ class Role
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -73,7 +73,7 @@ class Role
*
* @return EventType
*/
- public function getType()
+ public function getType(): ?\Chill\EventBundle\Entity\EventType
{
return $this->type;
}
diff --git a/src/Bundle/ChillEventBundle/Entity/Status.php b/src/Bundle/ChillEventBundle/Entity/Status.php
index a47011203..dfa0fdb5c 100644
--- a/src/Bundle/ChillEventBundle/Entity/Status.php
+++ b/src/Bundle/ChillEventBundle/Entity/Status.php
@@ -45,7 +45,7 @@ class Status
*
* @return bool
*/
- public function getActive()
+ public function getActive(): bool
{
return $this->active;
}
@@ -55,7 +55,7 @@ class Status
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -75,7 +75,7 @@ class Status
*
* @return EventType
*/
- public function getType()
+ public function getType(): ?\Chill\EventBundle\Entity\EventType
{
return $this->type;
}
diff --git a/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php b/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php
index 1e519997a..859ddcb3c 100644
--- a/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php
+++ b/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php
@@ -32,7 +32,7 @@ class EventDateAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$order = null;
@@ -67,7 +67,7 @@ class EventDateAggregator implements AggregatorInterface
return Declarations::EVENT;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('frequency', ChoiceType::class, [
'choices' => self::CHOICES,
diff --git a/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php b/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php
index db757cac9..e96fd4786 100644
--- a/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php
+++ b/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php
@@ -29,7 +29,7 @@ class EventTypeAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('eventtype', $qb->getAllAliases(), true)) {
$qb->leftJoin('event.type', 'eventtype');
@@ -44,7 +44,7 @@ class EventTypeAggregator implements AggregatorInterface
return Declarations::EVENT;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form required for this aggregator
}
diff --git a/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php b/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php
index c02483db2..8303b4429 100644
--- a/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php
+++ b/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php
@@ -29,7 +29,7 @@ class RoleAggregator implements AggregatorInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('event_part', $qb->getAllAliases(), true)) {
$qb->leftJoin('event_part.role', 'role');
@@ -44,7 +44,7 @@ class RoleAggregator implements AggregatorInterface
return Declarations::EVENT_PARTICIPANTS;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// no form required for this aggregator
}
diff --git a/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php b/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php
index 10f1dbd81..2e3153ea1 100644
--- a/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php
+++ b/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php
@@ -30,7 +30,7 @@ class EventDateFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->between(
@@ -61,7 +61,7 @@ class EventDateFilter implements FilterInterface
return Declarations::EVENT;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_from', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php b/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php
index 4b64022ea..b5087e901 100644
--- a/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php
+++ b/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php
@@ -34,7 +34,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->in('event.type', ':selected_event_types');
@@ -47,7 +47,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac
return Declarations::EVENT;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('types', EntityType::class, [
'choices' => $this->eventTypeRepository->findAllActive(),
@@ -83,7 +83,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac
return 'Filtered by event type';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
if (null === $data['types'] || 0 === \count($data['types'])) {
$context
diff --git a/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php b/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php
index 612cea84e..0d0206a43 100644
--- a/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php
+++ b/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php
@@ -34,7 +34,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->in('event_part.role', ':selected_part_roles');
@@ -47,7 +47,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface
return Declarations::EVENT_PARTICIPANTS;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('part_roles', EntityType::class, [
'choices' => $this->roleRepository->findAllActive(),
@@ -83,7 +83,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface
return 'Filter by participant roles';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
if (null === $data['part_roles'] || 0 === \count($data['part_roles'])) {
$context
diff --git a/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php b/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
index 0eac3c0be..de134e1cc 100644
--- a/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
+++ b/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
@@ -63,7 +63,7 @@ class EventChoiceLoader implements ChoiceLoaderInterface
*
* @return array
*/
- public function loadChoicesForValues(array $values, $value = null)
+ public function loadChoicesForValues(array $values, $value = null): array
{
$choices = [];
@@ -92,7 +92,7 @@ class EventChoiceLoader implements ChoiceLoaderInterface
*
* @return array|string[]
*/
- public function loadValuesForChoices(array $choices, $value = null)
+ public function loadValuesForChoices(array $choices, $value = null): array
{
$values = [];
diff --git a/src/Bundle/ChillEventBundle/Form/EventType.php b/src/Bundle/ChillEventBundle/Form/EventType.php
index ebdf66010..7bd769a34 100644
--- a/src/Bundle/ChillEventBundle/Form/EventType.php
+++ b/src/Bundle/ChillEventBundle/Form/EventType.php
@@ -30,7 +30,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class EventType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TextType::class, [
@@ -76,7 +76,7 @@ class EventType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Event::class,
@@ -90,7 +90,7 @@ class EventType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_eventbundle_event';
}
diff --git a/src/Bundle/ChillEventBundle/Form/EventTypeType.php b/src/Bundle/ChillEventBundle/Form/EventTypeType.php
index 4b09daef0..d64acc3d9 100644
--- a/src/Bundle/ChillEventBundle/Form/EventTypeType.php
+++ b/src/Bundle/ChillEventBundle/Form/EventTypeType.php
@@ -17,7 +17,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class EventTypeType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
@@ -27,12 +27,12 @@ class EventTypeType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_eventbundle_eventtype';
}
- public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver)
+ public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\EventBundle\Entity\EventType::class,
diff --git a/src/Bundle/ChillEventBundle/Form/ParticipationType.php b/src/Bundle/ChillEventBundle/Form/ParticipationType.php
index af1854954..946a866fc 100644
--- a/src/Bundle/ChillEventBundle/Form/ParticipationType.php
+++ b/src/Bundle/ChillEventBundle/Form/ParticipationType.php
@@ -29,7 +29,7 @@ final class ParticipationType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
// local copy of variable for Closure
$translatableStringHelper = $this->translatableStringHelper;
@@ -45,7 +45,7 @@ final class ParticipationType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefined('event_type')
->setAllowedTypes('event_type', ['null', EventType::class])
diff --git a/src/Bundle/ChillEventBundle/Form/RoleType.php b/src/Bundle/ChillEventBundle/Form/RoleType.php
index 8b9f27be2..eac7c16ca 100644
--- a/src/Bundle/ChillEventBundle/Form/RoleType.php
+++ b/src/Bundle/ChillEventBundle/Form/RoleType.php
@@ -22,7 +22,7 @@ final class RoleType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
@@ -36,12 +36,12 @@ final class RoleType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_eventbundle_role';
}
- public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver)
+ public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\EventBundle\Entity\Role::class,
diff --git a/src/Bundle/ChillEventBundle/Form/StatusType.php b/src/Bundle/ChillEventBundle/Form/StatusType.php
index 7e8c8c1b9..e8a3c0d7d 100644
--- a/src/Bundle/ChillEventBundle/Form/StatusType.php
+++ b/src/Bundle/ChillEventBundle/Form/StatusType.php
@@ -18,7 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class StatusType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
@@ -29,12 +29,12 @@ class StatusType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_eventbundle_status';
}
- public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver)
+ public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\EventBundle\Entity\Status::class,
diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php b/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php
index bcd0026c9..9dd6f59c9 100644
--- a/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php
+++ b/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php
@@ -45,7 +45,7 @@ final class PickEventType extends AbstractType
private readonly Security $security,
) {}
- public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options)
+ public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options): void
{
$view->vars['attr']['data-person-picker'] = true;
$view->vars['attr']['data-select-interactive-loading'] = true;
@@ -57,7 +57,7 @@ final class PickEventType extends AbstractType
$view->vars['attr']['data-searching-label'] = $this->translator->trans('select2.searching');
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
parent::configureOptions($resolver);
diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php b/src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php
index d027c05cf..b08fb0772 100644
--- a/src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php
+++ b/src/Bundle/ChillEventBundle/Form/Type/PickEventTypeType.php
@@ -33,7 +33,7 @@ class PickEventTypeType extends AbstractType
$this->translatableStringHelper = $helper;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$helper = $this->translatableStringHelper;
$resolver->setDefaults(
@@ -47,7 +47,7 @@ class PickEventTypeType extends AbstractType
);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php b/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php
index b9048e116..a5acec67d 100644
--- a/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php
+++ b/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php
@@ -34,7 +34,7 @@ final class PickRoleType extends AbstractType
private readonly RoleRepository $roleRepository,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
// create copy for easier management
$qb = $options['query_builder'];
@@ -69,7 +69,7 @@ final class PickRoleType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
// create copy for use in Closure
$translatableStringHelper = $this->translatableStringHelper;
@@ -100,7 +100,7 @@ final class PickRoleType extends AbstractType
]);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php b/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php
index 3f4ab3624..55d4a1c17 100644
--- a/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php
+++ b/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php
@@ -35,7 +35,7 @@ final class PickStatusType extends AbstractType
{
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected TranslatorInterface $translator, protected StatusRepository $statusRepository) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$qb = $options['query_builder'];
@@ -66,7 +66,7 @@ final class PickStatusType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
// create copy for use in Closure
$translatableStringHelper = $this->translatableStringHelper;
@@ -97,7 +97,7 @@ final class PickStatusType extends AbstractType
]);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php
index 9db1713b6..cfdbdd56c 100644
--- a/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php
index 788c6fac1..04dec6e61 100644
--- a/src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php
+++ b/src/Bundle/ChillEventBundle/Menu/PersonMenuBuilder.php
@@ -37,7 +37,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
$this->translator = $translator;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
/** @var \Chill\PersonBundle\Entity\Person $person */
$person = $parameters['person'] ?? null;
diff --git a/src/Bundle/ChillEventBundle/Menu/SectionMenuBuilder.php b/src/Bundle/ChillEventBundle/Menu/SectionMenuBuilder.php
index 276324938..448871c97 100644
--- a/src/Bundle/ChillEventBundle/Menu/SectionMenuBuilder.php
+++ b/src/Bundle/ChillEventBundle/Menu/SectionMenuBuilder.php
@@ -24,7 +24,7 @@ final readonly class SectionMenuBuilder implements LocalMenuBuilderInterface
private TranslatorInterface $translator,
) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if ($this->security->isGranted(EventVoter::SEE)) {
$menu->addChild(
diff --git a/src/Bundle/ChillEventBundle/Search/EventSearch.php b/src/Bundle/ChillEventBundle/Search/EventSearch.php
index 7c347bef6..19809235c 100644
--- a/src/Bundle/ChillEventBundle/Search/EventSearch.php
+++ b/src/Bundle/ChillEventBundle/Search/EventSearch.php
@@ -61,7 +61,7 @@ class EventSearch extends AbstractSearch
$limit = 50,
array $options = [],
$format = 'html',
- ) {
+ ): string|array {
$total = $this->count($terms);
$paginator = $this->paginatorFactory->create($total);
diff --git a/src/Bundle/ChillEventBundle/Security/EventVoter.php b/src/Bundle/ChillEventBundle/Security/EventVoter.php
index 29fcb6e9d..235928c01 100644
--- a/src/Bundle/ChillEventBundle/Security/EventVoter.php
+++ b/src/Bundle/ChillEventBundle/Security/EventVoter.php
@@ -78,12 +78,12 @@ class EventVoter extends AbstractChillVoter implements ProvideRoleHierarchyInter
return [self::ROLES, self::STATS];
}
- public function supports($attribute, $subject)
+ public function supports(string $attribute, mixed $subject): bool
{
return $this->voterHelper->supports($attribute, $subject);
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$this->logger->debug(sprintf('Voting from %s class', self::class));
diff --git a/src/Bundle/ChillEventBundle/Security/ParticipationVoter.php b/src/Bundle/ChillEventBundle/Security/ParticipationVoter.php
index 314337791..12191d3fa 100644
--- a/src/Bundle/ChillEventBundle/Security/ParticipationVoter.php
+++ b/src/Bundle/ChillEventBundle/Security/ParticipationVoter.php
@@ -75,17 +75,12 @@ class ParticipationVoter extends AbstractChillVoter implements ProvideRoleHierar
return [self::ROLES, self::STATS];
}
- public function supports($attribute, $subject)
+ public function supports(string $attribute, mixed $subject): bool
{
return $this->voterHelper->supports($attribute, $subject);
}
- /**
- * @param string $attribute
- *
- * @return bool
- */
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$this->logger->debug(sprintf('Voting from %s class', self::class));
diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php
index e7ad5f2a4..0c7b85729 100644
--- a/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php
+++ b/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php
@@ -66,7 +66,7 @@ final class ParticipationControllerTest extends WebTestCase
*
* Those request should fail before any processing.
*/
- public function testCreateActionWrongParameters()
+ public function testCreateActionWrongParameters(): void
{
$client = $this->getClientAuthenticated();
$this->prepareDI();
@@ -138,7 +138,7 @@ final class ParticipationControllerTest extends WebTestCase
);
}
- public function testEditMultipleAction()
+ public function testEditMultipleAction(): void
{
$client = $this->getClientAuthenticated();
$this->prepareDI();
@@ -165,7 +165,7 @@ final class ParticipationControllerTest extends WebTestCase
->isRedirect('/fr/event/event/'.$event->getId().'/show'));
}
- public function testNewActionWrongParameters()
+ public function testNewActionWrongParameters(): void
{
$client = $this->getClientAuthenticated();
$this->prepareDI();
@@ -237,7 +237,7 @@ final class ParticipationControllerTest extends WebTestCase
);
}
- public function testNewMultipleAction()
+ public function testNewMultipleAction(): void
{
$client = $this->getClientAuthenticated();
$this->prepareDI();
@@ -307,7 +307,7 @@ final class ParticipationControllerTest extends WebTestCase
$this->assertEquals($nbParticipations + 2, $event->getParticipations()->count());
}
- public function testNewMultipleWithAllPeopleParticipating()
+ public function testNewMultipleWithAllPeopleParticipating(): void
{
$client = $this->getClientAuthenticated();
$this->prepareDI();
@@ -333,7 +333,7 @@ final class ParticipationControllerTest extends WebTestCase
);
}
- public function testNewMultipleWithSomePeopleParticipating()
+ public function testNewMultipleWithSomePeopleParticipating(): void
{
$client = $this->getClientAuthenticated();
$this->prepareDI();
@@ -409,7 +409,7 @@ final class ParticipationControllerTest extends WebTestCase
);
}
- public function testNewSingleAction()
+ public function testNewSingleAction(): void
{
$client = $this->getClientAuthenticated();
$this->prepareDI();
diff --git a/src/Bundle/ChillEventBundle/Tests/Export/filters/EventDateFilterTest.php b/src/Bundle/ChillEventBundle/Tests/Export/filters/EventDateFilterTest.php
index 369ceee59..9b9ccb1bf 100644
--- a/src/Bundle/ChillEventBundle/Tests/Export/filters/EventDateFilterTest.php
+++ b/src/Bundle/ChillEventBundle/Tests/Export/filters/EventDateFilterTest.php
@@ -35,7 +35,7 @@ class EventDateFilterTest extends AbstractFilterTest
$this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\EventBundle\Export\Filter\EventDateFilter
{
return new EventDateFilter($this->rollingDateConverter);
}
diff --git a/src/Bundle/ChillEventBundle/Tests/Export/filters/RoleFilterTest.php b/src/Bundle/ChillEventBundle/Tests/Export/filters/RoleFilterTest.php
index 714098956..7e3acce99 100644
--- a/src/Bundle/ChillEventBundle/Tests/Export/filters/RoleFilterTest.php
+++ b/src/Bundle/ChillEventBundle/Tests/Export/filters/RoleFilterTest.php
@@ -35,7 +35,7 @@ class RoleFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(RoleFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\EventBundle\Export\Filter\RoleFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php
index 90c38743b..7fd6f01b9 100644
--- a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php
+++ b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php
@@ -107,7 +107,7 @@ final class EventSearchTest extends WebTestCase
$this->events = [];
}
- public function testDisplayAll()
+ public function testDisplayAll(): void
{
$crawler = $this->client->request('GET', '/fr/search', [
'q' => '@events',
@@ -124,7 +124,7 @@ final class EventSearchTest extends WebTestCase
* Test that a user connected with an user with the wrong center does not
* see the events.
*/
- public function testDisplayAllWrongUser()
+ public function testDisplayAllWrongUser(): void
{
$client = self::createClient([], [
'PHP_AUTH_USER' => 'center b_social',
@@ -143,7 +143,7 @@ final class EventSearchTest extends WebTestCase
);
}
- public function testSearchByDateDateBetween()
+ public function testSearchByDateDateBetween(): void
{
// serach with date from **and** date-to
$crawler = $this->client->request('GET', '/fr/search', [
@@ -190,7 +190,7 @@ final class EventSearchTest extends WebTestCase
});
}
- public function testSearchByDateDateFromOnly()
+ public function testSearchByDateDateFromOnly(): void
{
// search with date from
$crawler = $this->client->request('GET', '/fr/search', [
@@ -225,7 +225,7 @@ final class EventSearchTest extends WebTestCase
});
}
- public function testSearchByDateDateTo()
+ public function testSearchByDateDateTo(): void
{
// serach with date from **and** date-to
$crawler = $this->client->request('GET', '/fr/search', [
@@ -265,7 +265,7 @@ final class EventSearchTest extends WebTestCase
});
}
- public function testSearchByDefault()
+ public function testSearchByDefault(): void
{
$crawler = $this->client->request('GET', '/fr/search', [
'q' => '@events printemps',
@@ -284,7 +284,7 @@ final class EventSearchTest extends WebTestCase
);
}
- public function testSearchByName()
+ public function testSearchByName(): void
{
$crawler = $this->client->request('GET', '/fr/search', [
'q' => '@events name:printemps',
@@ -303,7 +303,7 @@ final class EventSearchTest extends WebTestCase
);
}
- protected function createEvents()
+ protected function createEvents(): void
{
$event1 = (new Event())
->setCenter($this->centerA)
diff --git a/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php b/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php
index 414b07c62..033bec0fb 100644
--- a/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php
+++ b/src/Bundle/ChillEventBundle/Timeline/TimelineEventProvider.php
@@ -138,7 +138,7 @@ class TimelineEventProvider implements TimelineProviderInterface
*
* @throws \LogicException if the context is not supported
*/
- private function checkContext($context)
+ private function checkContext($context): void
{
if ('person' !== $context) {
throw new \LogicException("The context '{$context}' is not supported. Currently only 'person' is supported");
diff --git a/src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php b/src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php
index 66a8ee05b..eca8917fe 100644
--- a/src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php
+++ b/src/Bundle/ChillFranceTravailApiBundle/src/ApiHelper/PartenaireRomeAppellation.php
@@ -50,7 +50,7 @@ class PartenaireRomeAppellation
]);
}
- private function getBearer()
+ private function getBearer(): string
{
return $this->wrapper->getPublicBearer([
'api_rome-metiersv1',
diff --git a/src/Bundle/ChillFranceTravailApiBundle/src/DependencyInjection/ChillFranceTravailApiExtension.php b/src/Bundle/ChillFranceTravailApiBundle/src/DependencyInjection/ChillFranceTravailApiExtension.php
index 1f69b80c2..d0e760d65 100644
--- a/src/Bundle/ChillFranceTravailApiBundle/src/DependencyInjection/ChillFranceTravailApiExtension.php
+++ b/src/Bundle/ChillFranceTravailApiBundle/src/DependencyInjection/ChillFranceTravailApiExtension.php
@@ -24,7 +24,7 @@ use Symfony\Component\DependencyInjection\Loader;
*/
class ChillFranceTravailApiExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
diff --git a/src/Bundle/ChillFranceTravailApiBundle/src/Tests/ApiHelper/PartenaireRomeAppellationTest.php b/src/Bundle/ChillFranceTravailApiBundle/src/Tests/ApiHelper/PartenaireRomeAppellationTest.php
index 4096d5e94..1cca2b35d 100644
--- a/src/Bundle/ChillFranceTravailApiBundle/src/Tests/ApiHelper/PartenaireRomeAppellationTest.php
+++ b/src/Bundle/ChillFranceTravailApiBundle/src/Tests/ApiHelper/PartenaireRomeAppellationTest.php
@@ -30,7 +30,7 @@ class PartenaireRomeAppellationTest extends KernelTestCase
self::bootKernel();
}
- public function testGetListeMetiersSimple()
+ public function testGetListeMetiersSimple(): void
{
/** @var PartenaireRomeAppellation $appellations */
$appellations = self::$kernel
@@ -45,7 +45,7 @@ class PartenaireRomeAppellationTest extends KernelTestCase
$this->assertNotNull($data[0]->code);
}
- public function testGetListeMetiersTooMuchRequests()
+ public function testGetListeMetiersTooMuchRequests(): void
{
/** @var PartenaireRomeMetier $appellations */
$appellations = self::$kernel
@@ -65,7 +65,7 @@ class PartenaireRomeAppellationTest extends KernelTestCase
);
}
- public function testGetAppellation()
+ public function testGetAppellation(): void
{
/** @var PartenaireRomeMetier $appellations */
$appellations = self::$kernel
diff --git a/src/Bundle/ChillFranceTravailApiBundle/src/Tests/Controller/RomeControllerTest.php b/src/Bundle/ChillFranceTravailApiBundle/src/Tests/Controller/RomeControllerTest.php
index ef88ccf75..33b7de5be 100644
--- a/src/Bundle/ChillFranceTravailApiBundle/src/Tests/Controller/RomeControllerTest.php
+++ b/src/Bundle/ChillFranceTravailApiBundle/src/Tests/Controller/RomeControllerTest.php
@@ -20,7 +20,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/
class RomeControllerTest extends WebTestCase
{
- public function testAppellationsearch()
+ public function testAppellationsearch(): void
{
$client = static::createClient();
diff --git a/src/Bundle/ChillJobBundle/src/Controller/CSPersonController.php b/src/Bundle/ChillJobBundle/src/Controller/CSPersonController.php
index d5ddf329d..b51d4a3de 100644
--- a/src/Bundle/ChillJobBundle/src/Controller/CSPersonController.php
+++ b/src/Bundle/ChillJobBundle/src/Controller/CSPersonController.php
@@ -34,7 +34,7 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
}
#[Route(path: '{_locale}/person/job/dispositifs/{id}/edit', name: 'chill_crud_job_dispositifs_edit')]
- public function dispositifsEdit(Request $request, $id)
+ public function dispositifsEdit(Request $request, $id): \Symfony\Component\HttpFoundation\Response
{
return $this->formEditAction(
'dispositifs_edit',
diff --git a/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php b/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php
index 1a2608388..84d304146 100644
--- a/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php
+++ b/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php
@@ -49,10 +49,8 @@ class CSPerson
#[ORM\Column(name: 'situationLogementPrecision', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
private ?string $situationLogementPrecision = null;
- /**
- * @Assert\GreaterThanOrEqual(0)
- */
#[ORM\Column(name: 'enfantACharge', type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true)]
+ #[Assert\GreaterThanOrEqual(0)]
private ?int $enfantACharge = null;
public const NIVEAU_MAITRISE_LANGUE = [
@@ -241,82 +239,56 @@ class CSPerson
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
private ?StoredObject $documentCV = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentAgrementIAE = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentRQTH = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentAttestationNEET = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentCI = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentTitreSejour = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentAttestationFiscale = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentPermis = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentAttestationCAAF = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentContraTravail = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentAttestationFormation = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentQuittanceLoyer = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentFactureElectricite = null;
- /**
- * @Assert\Valid()
- */
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
+ #[Assert\Valid]
private ?StoredObject $documentAttestationSecuriteSociale = null;
#[ORM\ManyToOne(targetEntity: ThirdParty::class)]
@@ -327,7 +299,7 @@ class CSPerson
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -349,7 +321,7 @@ class CSPerson
*
* @return string|null
*/
- public function getSituationLogement()
+ public function getSituationLogement(): ?string
{
return $this->situationLogement;
}
@@ -371,7 +343,7 @@ class CSPerson
*
* @return int|null
*/
- public function getEnfantACharge()
+ public function getEnfantACharge(): ?int
{
return $this->enfantACharge;
}
@@ -405,10 +377,9 @@ class CSPerson
/**
* Valide niveauMaitriseLangue.
- *
- * @Assert\Callback()
*/
- public function validateNiveauMatriseLangue(ExecutionContextInterface $context)
+ #[Assert\Callback]
+ public function validateNiveauMatriseLangue(ExecutionContextInterface $context): void
{
if (null === $this->getNiveauMaitriseLangue()) {
return;
@@ -441,7 +412,7 @@ class CSPerson
*
* @return bool
*/
- public function getVehiculePersonnel()
+ public function getVehiculePersonnel(): ?bool
{
return $this->vehiculePersonnel;
}
@@ -483,7 +454,7 @@ class CSPerson
*
* @return string
*/
- public function getSituationProfessionnelle()
+ public function getSituationProfessionnelle(): ?string
{
return $this->situationProfessionnelle;
}
@@ -507,7 +478,7 @@ class CSPerson
*
* @return \DateTimeInterface
*/
- public function getDateFinDernierEmploi()
+ public function getDateFinDernierEmploi(): ?\DateTimeInterface
{
return $this->dateFinDernierEmploi;
}
@@ -569,7 +540,7 @@ class CSPerson
*
* @return string
*/
- public function getRessourcesComment()
+ public function getRessourcesComment(): ?string
{
return $this->ressourcesComment;
}
@@ -593,12 +564,12 @@ class CSPerson
*
* @return \DateTimeInterface
*/
- public function getRessourceDate1Versement()
+ public function getRessourceDate1Versement(): ?\DateTimeInterface
{
return $this->ressourceDate1Versement;
}
- public function getCPFMontant()
+ public function getCPFMontant(): ?float
{
return $this->cPFMontant;
}
@@ -649,7 +620,7 @@ class CSPerson
*
* @return \DateTimeInterface
*/
- public function getAccompagnementRQTHDate()
+ public function getAccompagnementRQTHDate(): ?\DateTimeInterface
{
return $this->accompagnementRQTHDate;
}
@@ -671,7 +642,7 @@ class CSPerson
*
* @return string
*/
- public function getAccompagnementComment()
+ public function getAccompagnementComment(): ?string
{
return $this->accompagnementComment;
}
@@ -693,7 +664,7 @@ class CSPerson
*
* @return string
*/
- public function getPoleEmploiId()
+ public function getPoleEmploiId(): ?string
{
return $this->poleEmploiId;
}
@@ -717,7 +688,7 @@ class CSPerson
*
* @return \DateTimeInterface
*/
- public function getPoleEmploiInscriptionDate()
+ public function getPoleEmploiInscriptionDate(): ?\DateTimeInterface
{
return $this->poleEmploiInscriptionDate;
}
@@ -739,7 +710,7 @@ class CSPerson
*
* @return string
*/
- public function getCafId()
+ public function getCafId(): ?string
{
return $this->cafId;
}
@@ -763,7 +734,7 @@ class CSPerson
*
* @return \DateTimeInterface
*/
- public function getCafInscriptionDate()
+ public function getCafInscriptionDate(): ?\DateTimeInterface
{
return $this->cafInscriptionDate;
}
@@ -787,7 +758,7 @@ class CSPerson
*
* @return \DateTimeInterface
*/
- public function getCERInscriptionDate()
+ public function getCERInscriptionDate(): ?\DateTimeInterface
{
return $this->cERInscriptionDate;
}
@@ -811,7 +782,7 @@ class CSPerson
*
* @return \DateTimeInterface
*/
- public function getPPAEInscriptionDate()
+ public function getPPAEInscriptionDate(): ?\DateTimeInterface
{
return $this->pPAEInscriptionDate;
}
@@ -826,12 +797,12 @@ class CSPerson
return $this->pPAESignataire;
}
- public function setCERSignataire(?string $cERSignataire)
+ public function setCERSignataire(?string $cERSignataire): void
{
$this->cERSignataire = $cERSignataire;
}
- public function setPPAESignataire(?string $pPAESignataire)
+ public function setPPAESignataire(?string $pPAESignataire): void
{
$this->pPAESignataire = $pPAESignataire;
}
@@ -853,7 +824,7 @@ class CSPerson
*
* @return bool
*/
- public function getNEETEligibilite()
+ public function getNEETEligibilite(): ?bool
{
return $this->nEETEligibilite;
}
@@ -877,7 +848,7 @@ class CSPerson
*
* @return \DateTimeInterface
*/
- public function getNEETCommissionDate()
+ public function getNEETCommissionDate(): ?\DateTimeInterface
{
return $this->nEETCommissionDate;
}
@@ -899,22 +870,22 @@ class CSPerson
*
* @return string
*/
- public function getFSEMaDemarcheCode()
+ public function getFSEMaDemarcheCode(): ?string
{
return $this->fSEMaDemarcheCode;
}
- public function getDispositifsNotes()
+ public function getDispositifsNotes(): ?string
{
return $this->dispositifsNotes;
}
- public function setDispositifsNotes(?string $dispositifsNotes)
+ public function setDispositifsNotes(?string $dispositifsNotes): void
{
$this->dispositifsNotes = $dispositifsNotes;
}
- public function setPerson(Person $person)
+ public function setPerson(Person $person): void
{
$this->person = $person;
$this->id = $person->getId();
@@ -1008,97 +979,97 @@ class CSPerson
return $this->prescripteur;
}
- public function setDocumentCV(?StoredObject $documentCV = null)
+ public function setDocumentCV(?StoredObject $documentCV = null): void
{
$this->documentCV = $documentCV;
}
- public function setDocumentAgrementIAE(?StoredObject $documentAgrementIAE = null)
+ public function setDocumentAgrementIAE(?StoredObject $documentAgrementIAE = null): void
{
$this->documentAgrementIAE = $documentAgrementIAE;
}
- public function setDocumentRQTH(?StoredObject $documentRQTH = null)
+ public function setDocumentRQTH(?StoredObject $documentRQTH = null): void
{
$this->documentRQTH = $documentRQTH;
}
- public function setDocumentAttestationNEET(?StoredObject $documentAttestationNEET = null)
+ public function setDocumentAttestationNEET(?StoredObject $documentAttestationNEET = null): void
{
$this->documentAttestationNEET = $documentAttestationNEET;
}
- public function setDocumentCI(?StoredObject $documentCI = null)
+ public function setDocumentCI(?StoredObject $documentCI = null): void
{
$this->documentCI = $documentCI;
}
- public function setDocumentTitreSejour(?StoredObject $documentTitreSejour = null)
+ public function setDocumentTitreSejour(?StoredObject $documentTitreSejour = null): void
{
$this->documentTitreSejour = $documentTitreSejour;
}
- public function setDocumentAttestationFiscale(?StoredObject $documentAttestationFiscale = null)
+ public function setDocumentAttestationFiscale(?StoredObject $documentAttestationFiscale = null): void
{
$this->documentAttestationFiscale = $documentAttestationFiscale;
}
- public function setDocumentPermis(?StoredObject $documentPermis = null)
+ public function setDocumentPermis(?StoredObject $documentPermis = null): void
{
$this->documentPermis = $documentPermis;
}
- public function setDocumentAttestationCAAF(?StoredObject $documentAttestationCAAF = null)
+ public function setDocumentAttestationCAAF(?StoredObject $documentAttestationCAAF = null): void
{
$this->documentAttestationCAAF = $documentAttestationCAAF;
}
- public function setDocumentContraTravail(?StoredObject $documentContraTravail = null)
+ public function setDocumentContraTravail(?StoredObject $documentContraTravail = null): void
{
$this->documentContraTravail = $documentContraTravail;
}
- public function setDocumentAttestationFormation(?StoredObject $documentAttestationFormation = null)
+ public function setDocumentAttestationFormation(?StoredObject $documentAttestationFormation = null): void
{
$this->documentAttestationFormation = $documentAttestationFormation;
}
- public function setDocumentQuittanceLoyer(?StoredObject $documentQuittanceLoyer = null)
+ public function setDocumentQuittanceLoyer(?StoredObject $documentQuittanceLoyer = null): void
{
$this->documentQuittanceLoyer = $documentQuittanceLoyer;
}
- public function setDocumentFactureElectricite(?StoredObject $documentFactureElectricite = null)
+ public function setDocumentFactureElectricite(?StoredObject $documentFactureElectricite = null): void
{
$this->documentFactureElectricite = $documentFactureElectricite;
}
- public function setPrescripteur(?ThirdParty $prescripteur = null)
+ public function setPrescripteur(?ThirdParty $prescripteur = null): void
{
$this->prescripteur = $prescripteur;
}
- public function getSituationLogementPrecision()
+ public function getSituationLogementPrecision(): ?string
{
return $this->situationLogementPrecision;
}
- public function getAcompteDIF()
+ public function getAcompteDIF(): ?float
{
return $this->acompteDIF;
}
- public function getHandicapIs()
+ public function getHandicapIs(): ?bool
{
return $this->handicapIs;
}
- public function getHandicapNotes()
+ public function getHandicapNotes(): ?string
{
return $this->handicapNotes;
}
- public function getHandicapRecommandation()
+ public function getHandicapRecommandation(): ?string
{
return $this->handicapRecommandation;
}
@@ -1108,7 +1079,7 @@ class CSPerson
return $this->mobiliteMoyenDeTransport;
}
- public function getMobiliteNotes()
+ public function getMobiliteNotes(): ?string
{
return $this->mobiliteNotes;
}
@@ -1198,7 +1169,7 @@ class CSPerson
return $this;
}
- public function getTypeContratAide()
+ public function getTypeContratAide(): ?string
{
return $this->typeContratAide;
}
diff --git a/src/Bundle/ChillJobBundle/src/Entity/CV.php b/src/Bundle/ChillJobBundle/src/Entity/CV.php
index 12a57baca..9554d2d9c 100644
--- a/src/Bundle/ChillJobBundle/src/Entity/CV.php
+++ b/src/Bundle/ChillJobBundle/src/Entity/CV.php
@@ -30,10 +30,8 @@ class CV implements \Stringable
#[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null;
- /**
- * @Assert\NotNull()
- */
#[ORM\Column(name: 'reportDate', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE)]
+ #[Assert\NotNull]
private ?\DateTimeInterface $reportDate = null;
public const FORMATION_LEVEL = [
@@ -47,10 +45,8 @@ class CV implements \Stringable
'BAC+8',
];
- /**
- * @Assert\NotBlank()
- */
#[ORM\Column(name: 'formationLevel', type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: true)]
+ #[Assert\NotBlank]
private ?string $formationLevel = null;
public const FORMATION_TYPE = [
@@ -71,20 +67,18 @@ class CV implements \Stringable
private ?string $notes = null;
/**
- * @Assert\Valid(traverse=true)
- *
* @var Collection
*/
#[ORM\OneToMany(targetEntity: CV\Formation::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)]
+ #[Assert\Valid(traverse: true)]
// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]
private Collection $formations;
/**
- * @Assert\Valid(traverse=true)
- *
* @var Collection
*/
#[ORM\OneToMany(targetEntity: CV\Experience::class, mappedBy: 'CV', cascade: ['persist', 'remove', 'detach'], orphanRemoval: true)]
+ #[Assert\Valid(traverse: true)]
// #[ORM\OrderBy(['startDate' => Order::Descending, 'endDate' => 'DESC'])]
private Collection $experiences;
@@ -103,7 +97,7 @@ class CV implements \Stringable
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -141,7 +135,7 @@ class CV implements \Stringable
*
* @return string|null
*/
- public function getFormationLevel()
+ public function getFormationLevel(): ?string
{
return $this->formationLevel;
}
diff --git a/src/Bundle/ChillJobBundle/src/Entity/CV/Experience.php b/src/Bundle/ChillJobBundle/src/Entity/CV/Experience.php
index 521cc82f6..6aa19160e 100644
--- a/src/Bundle/ChillJobBundle/src/Entity/CV/Experience.php
+++ b/src/Bundle/ChillJobBundle/src/Entity/CV/Experience.php
@@ -36,10 +36,8 @@ class Experience
#[ORM\Column(name: 'startDate', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $startDate = null;
- /**
- * @Assert\GreaterThan(propertyPath="startDate", message="La date de fin doit être postérieure à la date de début")
- */
#[ORM\Column(name: 'endDate', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
+ #[Assert\GreaterThan(propertyPath: 'startDate', message: 'La date de fin doit être postérieure à la date de début')]
private ?\DateTimeInterface $endDate = null;
public const CONTRAT_TYPE = [
@@ -128,7 +126,7 @@ class Experience
*
* @return \DateTimeInterface
*/
- public function getStartDate()
+ public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
@@ -150,7 +148,7 @@ class Experience
*
* @return \DateTimeInterface
*/
- public function getEndDate()
+ public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
diff --git a/src/Bundle/ChillJobBundle/src/Entity/CV/Formation.php b/src/Bundle/ChillJobBundle/src/Entity/CV/Formation.php
index 3394fa795..c5876fd57 100644
--- a/src/Bundle/ChillJobBundle/src/Entity/CV/Formation.php
+++ b/src/Bundle/ChillJobBundle/src/Entity/CV/Formation.php
@@ -27,21 +27,17 @@ class Formation
#[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null;
- /**
- * @Assert\Length(min=3)
- *
- * @Assert\NotNull()
- */
+
#[ORM\Column(name: 'title', type: \Doctrine\DBAL\Types\Types::TEXT)]
+ #[Assert\Length(min: 3)]
+ #[Assert\NotNull]
private ?string $title = null;
#[ORM\Column(name: 'startDate', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $startDate = null;
- /**
- * @Assert\GreaterThan(propertyPath="startDate", message="La date de fin doit être postérieure à la date de début")
- */
#[ORM\Column(name: 'endDate', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
+ #[Assert\GreaterThan(propertyPath: 'startDate', message: 'La date de fin doit être postérieure à la date de début')]
private ?\DateTimeInterface $endDate = null;
public const DIPLOMA_OBTAINED = [
@@ -69,7 +65,7 @@ class Formation
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -91,7 +87,7 @@ class Formation
*
* @return string
*/
- public function getTitle()
+ public function getTitle(): ?string
{
return $this->title;
}
@@ -115,7 +111,7 @@ class Formation
*
* @return \DateTimeInterface
*/
- public function getStartDate()
+ public function getStartDate(): ?\DateTimeInterface
{
return $this->startDate;
}
@@ -139,7 +135,7 @@ class Formation
*
* @return \DateTimeInterface
*/
- public function getEndDate()
+ public function getEndDate(): ?\DateTimeInterface
{
return $this->endDate;
}
@@ -159,7 +155,7 @@ class Formation
/**
* Get diplomaObtained.
*/
- public function getDiplomaObtained()
+ public function getDiplomaObtained(): ?string
{
return $this->diplomaObtained;
}
diff --git a/src/Bundle/ChillJobBundle/src/Entity/Frein.php b/src/Bundle/ChillJobBundle/src/Entity/Frein.php
index b60a342fd..79a41b4d5 100644
--- a/src/Bundle/ChillJobBundle/src/Entity/Frein.php
+++ b/src/Bundle/ChillJobBundle/src/Entity/Frein.php
@@ -29,14 +29,10 @@ class Frein implements HasPerson, \Stringable
#[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null;
- /**
- * @Assert\NotNull()
- *
- * @Assert\GreaterThan("5 years ago",
- * message="La date du rapport ne peut pas être plus de cinq ans dans le passé"
- * )
- */
+
#[ORM\Column(name: 'reportDate', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE)]
+ #[Assert\NotNull]
+ #[Assert\GreaterThan('5 years ago', message: 'La date du rapport ne peut pas être plus de cinq ans dans le passé')]
private ?\DateTimeInterface $reportDate = null;
public const FREINS_PERSO = [
@@ -76,10 +72,8 @@ class Frein implements HasPerson, \Stringable
#[ORM\Column(name: 'notesEmploi', type: \Doctrine\DBAL\Types\Types::TEXT)]
private ?string $notesEmploi = '';
- /**
- * @Assert\NotNull()
- */
#[ORM\ManyToOne(targetEntity: Person::class)]
+ #[Assert\NotNull]
private Person $person;
public function __construct()
@@ -164,9 +158,7 @@ class Frein implements HasPerson, \Stringable
return $this;
}
- /**
- * @Assert\Callback()
- */
+ #[Assert\Callback]
public function validateFreinsCount(ExecutionContextInterface $context, $payload): void
{
$nb = count($this->getFreinsEmploi()) + count($this->getFreinsPerso());
diff --git a/src/Bundle/ChillJobBundle/src/Entity/Immersion.php b/src/Bundle/ChillJobBundle/src/Entity/Immersion.php
index 5ae19a365..b4ea5be18 100644
--- a/src/Bundle/ChillJobBundle/src/Entity/Immersion.php
+++ b/src/Bundle/ChillJobBundle/src/Entity/Immersion.php
@@ -39,54 +39,42 @@ class Immersion implements \Stringable
#[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null;
- /**
- * @Assert\NotNull()
- */
#[ORM\ManyToOne(targetEntity: Person::class)]
+ #[Assert\NotNull]
private ?Person $person = null;
- /**
- * @Assert\NotNull()
- *
- * @Assert\Length(min=2)
- */
+
#[ORM\ManyToOne(targetEntity: ThirdParty::class)]
+ #[Assert\NotNull]
+ #[Assert\Length(min: 2)]
private ?ThirdParty $entreprise = null;
#[ORM\ManyToOne(targetEntity: User::class)]
private ?User $referent = null;
- /**
- * @Assert\NotNull()
- *
- * @Assert\Length(min=2)
- */
+
#[ORM\Column(name: 'domaineActivite', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
+ #[Assert\NotNull]
+ #[Assert\Length(min: 2)]
private ?string $domaineActivite = null;
- /**
- * @Assert\NotNull()
- *
- * @Assert\Length(min=2)
- */
+
#[ORM\Column(name: 'tuteurName', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
+ #[Assert\NotNull]
+ #[Assert\Length(min: 2)]
private ?string $tuteurName = null;
- /**
- * @Assert\NotNull()
- *
- * @Assert\Length(min=2)
- */
+
#[ORM\Column(name: 'tuteurFonction', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
+ #[Assert\NotNull]
+ #[Assert\Length(min: 2)]
private ?string $tuteurFonction = null;
- /**
- * @Assert\NotNull()
- *
- * @Assert\NotBlank()
- */
+
#[ORM\Column(name: 'tuteurPhoneNumber', type: 'phone_number', nullable: true)]
#[PhonenumberConstraint(type: 'any')]
+ #[Assert\NotNull]
+ #[Assert\NotBlank]
private ?PhoneNumber $tuteurPhoneNumber = null;
#[ORM\Column(name: 'structureAccName', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
@@ -105,42 +93,33 @@ class Immersion implements \Stringable
#[ORM\Column(name: 'posteDescriptif', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
private ?string $posteDescriptif = null;
- /**
- * @Assert\NotNull()
- *
- * @Assert\Length(min=2)
- */
+
#[ORM\Column(name: 'posteTitle', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
+ #[Assert\NotNull]
+ #[Assert\Length(min: 2)]
private ?string $posteTitle = null;
- /**
- * @Assert\NotNull()
- *
- * @Assert\Length(min=2)
- */
+
#[ORM\Column(name: 'posteLieu', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
+ #[Assert\NotNull]
+ #[Assert\Length(min: 2)]
private ?string $posteLieu = null;
- /**
- * @Assert\NotNull()
- */
#[ORM\Column(name: 'debutDate', type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
+ #[Assert\NotNull]
private ?\DateTime $debutDate = null;
/**
* @var string|null
- *
- * @Assert\NotNull()
*/
#[ORM\Column(name: 'duration', type: \Doctrine\DBAL\Types\Types::DATEINTERVAL, nullable: true)]
+ #[Assert\NotNull]
private $duration;
- /**
- * @Assert\NotNull()
- *
- * @Assert\Length(min=2)
- */
+
#[ORM\Column(name: 'horaire', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
+ #[Assert\NotNull]
+ #[Assert\Length(min: 2)]
private ?string $horaire = null;
public const OBJECTIFS = [
@@ -286,7 +265,7 @@ class Immersion implements \Stringable
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -308,7 +287,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getDomaineActivite()
+ public function getDomaineActivite(): ?string
{
return $this->domaineActivite;
}
@@ -330,7 +309,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getTuteurName()
+ public function getTuteurName(): ?string
{
return $this->tuteurName;
}
@@ -352,7 +331,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getTuteurFonction()
+ public function getTuteurFonction(): ?string
{
return $this->tuteurFonction;
}
@@ -394,7 +373,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getStructureAccName()
+ public function getStructureAccName(): ?string
{
return $this->structureAccName;
}
@@ -436,7 +415,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getPosteDescriptif()
+ public function getPosteDescriptif(): ?string
{
return $this->posteDescriptif;
}
@@ -458,7 +437,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getPosteTitle()
+ public function getPosteTitle(): ?string
{
return $this->posteTitle;
}
@@ -480,7 +459,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getPosteLieu()
+ public function getPosteLieu(): ?string
{
return $this->posteLieu;
}
@@ -502,7 +481,7 @@ class Immersion implements \Stringable
*
* @return \DateTime
*/
- public function getDebutDate()
+ public function getDebutDate(): ?\DateTime
{
return $this->debutDate;
}
@@ -529,7 +508,7 @@ class Immersion implements \Stringable
return $this->duration;
}
- public function getDateEndComputed()
+ public function getDateEndComputed(): \DateTimeImmutable
{
$startDate = \DateTimeImmutable::createFromMutable($this->getDebutDate());
@@ -553,7 +532,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getHoraire()
+ public function getHoraire(): ?string
{
return $this->horaire;
}
@@ -582,7 +561,7 @@ class Immersion implements \Stringable
return $this->objectifs;
}
- public function getObjectifsAutre()
+ public function getObjectifsAutre(): ?string
{
return $this->objectifsAutre;
}
@@ -635,7 +614,7 @@ class Immersion implements \Stringable
*
* @return string
*/
- public function getNoteImmersion()
+ public function getNoteImmersion(): ?string
{
return $this->noteImmersion;
}
@@ -657,7 +636,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getPrincipalesActivites()
+ public function getPrincipalesActivites(): ?string
{
return $this->principalesActivites;
}
@@ -679,7 +658,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getCompetencesAcquises()
+ public function getCompetencesAcquises(): ?string
{
return $this->competencesAcquises;
}
@@ -701,7 +680,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getCompetencesADevelopper()
+ public function getCompetencesADevelopper(): ?string
{
return $this->competencesADevelopper;
}
@@ -723,7 +702,7 @@ class Immersion implements \Stringable
*
* @return string|null
*/
- public function getNoteBilan()
+ public function getNoteBilan(): ?string
{
return $this->noteBilan;
}
@@ -764,7 +743,7 @@ class Immersion implements \Stringable
return $this;
}
- public function getStructureAccEmail()
+ public function getStructureAccEmail(): ?string
{
return $this->structureAccEmail;
}
@@ -788,12 +767,12 @@ class Immersion implements \Stringable
return $this;
}
- public function getIsBilanFullfilled()
+ public function getIsBilanFullfilled(): ?bool
{
return $this->isBilanFullfilled;
}
- public function getSavoirEtreNote()
+ public function getSavoirEtreNote(): ?string
{
return $this->savoirEtreNote;
}
@@ -812,112 +791,112 @@ class Immersion implements \Stringable
return $this;
}
- public function getPonctualiteSalarie()
+ public function getPonctualiteSalarie(): ?string
{
return $this->ponctualiteSalarie;
}
- public function getPonctualiteSalarieNote()
+ public function getPonctualiteSalarieNote(): ?string
{
return $this->ponctualiteSalarieNote;
}
- public function getAssiduite()
+ public function getAssiduite(): ?string
{
return $this->assiduite;
}
- public function getAssiduiteNote()
+ public function getAssiduiteNote(): ?string
{
return $this->assiduiteNote;
}
- public function getInteretActivite()
+ public function getInteretActivite(): ?string
{
return $this->interetActivite;
}
- public function getInteretActiviteNote()
+ public function getInteretActiviteNote(): ?string
{
return $this->interetActiviteNote;
}
- public function getIntegreRegle()
+ public function getIntegreRegle(): ?string
{
return $this->integreRegle;
}
- public function getIntegreRegleNote()
+ public function getIntegreRegleNote(): ?string
{
return $this->integreRegleNote;
}
- public function getEspritInitiative()
+ public function getEspritInitiative(): ?string
{
return $this->espritInitiative;
}
- public function getEspritInitiativeNote()
+ public function getEspritInitiativeNote(): ?string
{
return $this->espritInitiativeNote;
}
- public function getOrganisation()
+ public function getOrganisation(): ?string
{
return $this->organisation;
}
- public function getOrganisationNote()
+ public function getOrganisationNote(): ?string
{
return $this->organisationNote;
}
- public function getCapaciteTravailEquipe()
+ public function getCapaciteTravailEquipe(): ?string
{
return $this->capaciteTravailEquipe;
}
- public function getCapaciteTravailEquipeNote()
+ public function getCapaciteTravailEquipeNote(): ?string
{
return $this->capaciteTravailEquipeNote;
}
- public function getStyleVestimentaire()
+ public function getStyleVestimentaire(): ?string
{
return $this->styleVestimentaire;
}
- public function getStyleVestimentaireNote()
+ public function getStyleVestimentaireNote(): ?string
{
return $this->styleVestimentaireNote;
}
- public function getLangageProf()
+ public function getLangageProf(): ?string
{
return $this->langageProf;
}
- public function getLangageProfNote()
+ public function getLangageProfNote(): ?string
{
return $this->langageProfNote;
}
- public function getAppliqueConsigne()
+ public function getAppliqueConsigne(): ?string
{
return $this->appliqueConsigne;
}
- public function getAppliqueConsigneNote()
+ public function getAppliqueConsigneNote(): ?string
{
return $this->appliqueConsigneNote;
}
- public function getRespectHierarchie()
+ public function getRespectHierarchie(): ?string
{
return $this->respectHierarchie;
}
- public function getRespectHierarchieNote()
+ public function getRespectHierarchieNote(): ?string
{
return $this->respectHierarchieNote;
}
diff --git a/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php b/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php
index 6c808307e..2b541bf67 100644
--- a/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php
+++ b/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php
@@ -32,16 +32,12 @@ class ProjetProfessionnel implements \Stringable
#[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null;
- /**
- * @Assert\NotNull()
- */
#[ORM\ManyToOne(targetEntity: Person::class)]
+ #[Assert\NotNull]
private ?Person $person = null;
- /**
- * @Assert\NotNull()
- */
#[ORM\Column(name: 'reportDate', type: Types::DATE_MUTABLE)]
+ #[Assert\NotNull]
private ?\DateTimeInterface $reportDate = null;
/**
@@ -62,10 +58,9 @@ class ProjetProfessionnel implements \Stringable
/**
* @var array|null
- *
- * @Assert\Count(min=1, minMessage="Indiquez au moins un type de contrat")
*/
#[ORM\Column(name: 'typeContrat', type: Types::JSON, nullable: true)]
+ #[Assert\Count(min: 1, minMessage: 'Indiquez au moins un type de contrat')]
private $typeContrat;
#[ORM\Column(name: 'typeContratNotes', type: Types::TEXT, nullable: true)]
@@ -78,10 +73,9 @@ class ProjetProfessionnel implements \Stringable
/**
* @var array|null
- *
- * @Assert\Count(min=1, minMessage="Indiquez un volume horaire souhaité")
*/
#[ORM\Column(name: 'volumeHoraire', type: Types::JSON, nullable: true)]
+ #[Assert\Count(min: 1, minMessage: 'Indiquez un volume horaire souhaité')]
private $volumeHoraire;
#[ORM\Column(name: 'volumeHoraireNotes', type: Types::TEXT, nullable: true)]
@@ -120,7 +114,7 @@ class ProjetProfessionnel implements \Stringable
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -144,7 +138,7 @@ class ProjetProfessionnel implements \Stringable
*
* @return \DateTimeInterface
*/
- public function getReportDate()
+ public function getReportDate(): ?\DateTimeInterface
{
return $this->reportDate;
}
@@ -188,7 +182,7 @@ class ProjetProfessionnel implements \Stringable
*
* @return string|null
*/
- public function getTypeContratNotes()
+ public function getTypeContratNotes(): ?string
{
return $this->typeContratNotes;
}
@@ -232,7 +226,7 @@ class ProjetProfessionnel implements \Stringable
*
* @return string|null
*/
- public function getVolumeHoraireNotes()
+ public function getVolumeHoraireNotes(): ?string
{
return $this->volumeHoraireNotes;
}
@@ -254,7 +248,7 @@ class ProjetProfessionnel implements \Stringable
*
* @return string|null
*/
- public function getIdee()
+ public function getIdee(): ?string
{
return $this->idee;
}
@@ -276,7 +270,7 @@ class ProjetProfessionnel implements \Stringable
*
* @return string|null
*/
- public function getEnCoursConstruction()
+ public function getEnCoursConstruction(): ?string
{
return $this->enCoursConstruction;
}
@@ -298,7 +292,7 @@ class ProjetProfessionnel implements \Stringable
*
* @return string|null
*/
- public function getValideNotes()
+ public function getValideNotes(): ?string
{
return $this->valideNotes;
}
@@ -320,7 +314,7 @@ class ProjetProfessionnel implements \Stringable
*
* @return string|null
*/
- public function getProjetProfessionnelNote()
+ public function getProjetProfessionnelNote(): ?string
{
return $this->projetProfessionnelNote;
}
diff --git a/src/Bundle/ChillJobBundle/src/Entity/Rome/Appellation.php b/src/Bundle/ChillJobBundle/src/Entity/Rome/Appellation.php
index 1d2c3b026..d614ee03f 100644
--- a/src/Bundle/ChillJobBundle/src/Entity/Rome/Appellation.php
+++ b/src/Bundle/ChillJobBundle/src/Entity/Rome/Appellation.php
@@ -39,7 +39,7 @@ class Appellation implements \Stringable
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -61,7 +61,7 @@ class Appellation implements \Stringable
*
* @return string
*/
- public function getCode()
+ public function getCode(): ?string
{
return $this->code;
}
@@ -83,7 +83,7 @@ class Appellation implements \Stringable
*
* @return string
*/
- public function getLibelle()
+ public function getLibelle(): ?string
{
return $this->libelle;
}
diff --git a/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php b/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php
index 2df9ff3aa..31d29461a 100644
--- a/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php
+++ b/src/Bundle/ChillJobBundle/src/Entity/Rome/Metier.php
@@ -49,7 +49,7 @@ class Metier
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -71,7 +71,7 @@ class Metier
*
* @return string
*/
- public function getLibelle()
+ public function getLibelle(): ?string
{
return $this->libelle;
}
@@ -93,7 +93,7 @@ class Metier
*
* @return string
*/
- public function getCode()
+ public function getCode(): ?string
{
return $this->code;
}
diff --git a/src/Bundle/ChillJobBundle/src/Export/ListCV.php b/src/Bundle/ChillJobBundle/src/Export/ListCV.php
index 896c7db01..757ef4c06 100644
--- a/src/Bundle/ChillJobBundle/src/Export/ListCV.php
+++ b/src/Bundle/ChillJobBundle/src/Export/ListCV.php
@@ -86,7 +86,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface
/**
* Add a form to collect data from the user.
*/
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('fields', ChoiceType::class, [
@@ -218,7 +218,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface
*
* @return array
*/
- public function getQueryKeys($data)
+ public function getQueryKeys($data): array
{
return array_keys($data['fields']);
}
@@ -228,7 +228,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface
*
* @return array
*/
- private function getFields()
+ private function getFields(): array
{
return array_keys(self::FIELDS);
}
diff --git a/src/Bundle/ChillJobBundle/src/Export/ListFrein.php b/src/Bundle/ChillJobBundle/src/Export/ListFrein.php
index 8e3a64294..b82c53a44 100644
--- a/src/Bundle/ChillJobBundle/src/Export/ListFrein.php
+++ b/src/Bundle/ChillJobBundle/src/Export/ListFrein.php
@@ -99,7 +99,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
/**
* Add a form to collect data from the user.
*/
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('fields', ChoiceType::class, [
@@ -225,7 +225,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
*
* @return array
*/
- private function getFields()
+ private function getFields(): array
{
return array_keys(self::FIELDS);
}
@@ -270,7 +270,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
* @param string $item (&) passed by reference
* @param string $key
*/
- private function translationCompatKey(&$item, $key)
+ private function translationCompatKey(&$item, $key): void
{
$prefix = substr_replace($key, 'freins_', 0, 6);
$item = $prefix.'.'.$item;
diff --git a/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php b/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php
index 0a1eeb753..34258096c 100644
--- a/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php
+++ b/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php
@@ -104,7 +104,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn
/**
* Add a form to collect data from the user.
*/
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('fields', ChoiceType::class, [
@@ -231,7 +231,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn
*
* @return array
*/
- private function getFields()
+ private function getFields(): array
{
return array_keys(self::FIELDS);
}
@@ -294,7 +294,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn
* @param string $item (&) passed by reference
* @param string $key
*/
- private function translationCompatKey(&$item, $key)
+ private function translationCompatKey(&$item, $key): void
{
$key = str_replace('label', $item, $key);
$key = str_replace('__', '.', $key);
diff --git a/src/Bundle/ChillJobBundle/src/Form/CSPersonDispositifsType.php b/src/Bundle/ChillJobBundle/src/Form/CSPersonDispositifsType.php
index 187c5f656..b135e950e 100644
--- a/src/Bundle/ChillJobBundle/src/Form/CSPersonDispositifsType.php
+++ b/src/Bundle/ChillJobBundle/src/Form/CSPersonDispositifsType.php
@@ -23,7 +23,7 @@ use Chill\MainBundle\Form\Type\ChillDateType;
class CSPersonDispositifsType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('accompagnement', ChoiceType::class, [
@@ -108,7 +108,7 @@ class CSPersonDispositifsType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(['data_class' => CSPerson::class]);
@@ -118,7 +118,7 @@ class CSPersonDispositifsType extends AbstractType
;
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'job_bundle_csperson';
}
diff --git a/src/Bundle/ChillJobBundle/src/Form/CSPersonPersonalSituationType.php b/src/Bundle/ChillJobBundle/src/Form/CSPersonPersonalSituationType.php
index ba04d8b0f..d9544fb8d 100644
--- a/src/Bundle/ChillJobBundle/src/Form/CSPersonPersonalSituationType.php
+++ b/src/Bundle/ChillJobBundle/src/Form/CSPersonPersonalSituationType.php
@@ -27,7 +27,7 @@ use Chill\PersonBundle\Form\Type\Select2MaritalStatusType;
class CSPersonPersonalSituationType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
// quick and dirty way to handle marital status...
@@ -240,7 +240,7 @@ class CSPersonPersonalSituationType extends AbstractType
;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(['data_class' => CSPerson::class]);
@@ -249,7 +249,7 @@ class CSPersonPersonalSituationType extends AbstractType
;
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'job_bundle_csperson';
}
diff --git a/src/Bundle/ChillJobBundle/src/Form/CV/ExperienceType.php b/src/Bundle/ChillJobBundle/src/Form/CV/ExperienceType.php
index de74f2a22..4b27e49cb 100644
--- a/src/Bundle/ChillJobBundle/src/Form/CV/ExperienceType.php
+++ b/src/Bundle/ChillJobBundle/src/Form/CV/ExperienceType.php
@@ -22,7 +22,7 @@ use Chill\JobBundle\Entity\CV\Experience;
class ExperienceType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('poste', TextType::class, [
@@ -58,12 +58,12 @@ class ExperienceType extends AbstractType
;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(['data_class' => Experience::class]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'job_bundle_cv_experience';
}
diff --git a/src/Bundle/ChillJobBundle/src/Form/CV/FormationType.php b/src/Bundle/ChillJobBundle/src/Form/CV/FormationType.php
index 83093d95b..147e545e5 100644
--- a/src/Bundle/ChillJobBundle/src/Form/CV/FormationType.php
+++ b/src/Bundle/ChillJobBundle/src/Form/CV/FormationType.php
@@ -21,7 +21,7 @@ use Chill\JobBundle\Entity\CV\Formation as F;
class FormationType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TextType::class, [
@@ -63,12 +63,12 @@ class FormationType extends AbstractType
;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(['data_class' => F::class]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'job_bundle_cv_formation';
}
diff --git a/src/Bundle/ChillJobBundle/src/Form/CVType.php b/src/Bundle/ChillJobBundle/src/Form/CVType.php
index c6fb6614d..6d4442729 100644
--- a/src/Bundle/ChillJobBundle/src/Form/CVType.php
+++ b/src/Bundle/ChillJobBundle/src/Form/CVType.php
@@ -25,7 +25,7 @@ use Chill\MainBundle\Form\Type\Select2LanguageType;
class CVType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('reportDate', ChillDateType::class, [
@@ -79,12 +79,12 @@ class CVType extends AbstractType
;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(['data_class' => CV::class]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'job_bundle_cv';
}
diff --git a/src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php b/src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
index 834ba6fc9..49ce6d5d3 100644
--- a/src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
+++ b/src/Bundle/ChillJobBundle/src/Form/ChoiceLoader/RomeAppellationChoiceLoader.php
@@ -71,7 +71,7 @@ class RomeAppellationChoiceLoader implements ChoiceLoaderInterface
return new ArrayChoiceList($this->lazyLoadedAppellations, $value);
}
- public function loadChoicesForValues($values, $value = null)
+ public function loadChoicesForValues($values, $value = null): array
{
$choices = [];
$code = '';
@@ -135,7 +135,7 @@ class RomeAppellationChoiceLoader implements ChoiceLoaderInterface
return $choices;
}
- public function loadValuesForChoices(array $choices, $value = null)
+ public function loadValuesForChoices(array $choices, $value = null): array
{
$values = [];
diff --git a/src/Bundle/ChillJobBundle/src/Form/FreinType.php b/src/Bundle/ChillJobBundle/src/Form/FreinType.php
index 43c28ddeb..97aacc489 100644
--- a/src/Bundle/ChillJobBundle/src/Form/FreinType.php
+++ b/src/Bundle/ChillJobBundle/src/Form/FreinType.php
@@ -21,7 +21,7 @@ use Symfony\Component\Form\Extension\Core\Type\TextareaType;
class FreinType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('reportDate', ChillDateType::class, [
@@ -54,12 +54,12 @@ class FreinType extends AbstractType
;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(['data_class' => Frein::class]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'job_bundle_frein';
}
diff --git a/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php b/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php
index ed5e2276e..03d2bee4f 100644
--- a/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php
+++ b/src/Bundle/ChillJobBundle/src/Form/ImmersionType.php
@@ -27,7 +27,7 @@ use Chill\JobBundle\Entity\Immersion;
class ImmersionType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
if ('immersion' === $options['step']) {
$builder
@@ -179,7 +179,7 @@ class ImmersionType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(['data_class' => Immersion::class, 'step' => 'immersion']);
@@ -190,7 +190,7 @@ class ImmersionType extends AbstractType
;
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'job_bundle_immersion';
}
diff --git a/src/Bundle/ChillJobBundle/src/Form/ProjetProfessionnelType.php b/src/Bundle/ChillJobBundle/src/Form/ProjetProfessionnelType.php
index 4817dfcc3..990288ea7 100644
--- a/src/Bundle/ChillJobBundle/src/Form/ProjetProfessionnelType.php
+++ b/src/Bundle/ChillJobBundle/src/Form/ProjetProfessionnelType.php
@@ -22,7 +22,7 @@ use Chill\JobBundle\Form\Type\PickRomeAppellationType;
class ProjetProfessionnelType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('souhait', PickRomeAppellationType::class, [
@@ -96,12 +96,12 @@ class ProjetProfessionnelType extends AbstractType
;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(['data_class' => ProjetProfessionnel::class]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'job_bundle_projetprofessionnel';
}
diff --git a/src/Bundle/ChillJobBundle/src/Form/Type/PickRomeAppellationType.php b/src/Bundle/ChillJobBundle/src/Form/Type/PickRomeAppellationType.php
index b3cb1bc01..624960065 100644
--- a/src/Bundle/ChillJobBundle/src/Form/Type/PickRomeAppellationType.php
+++ b/src/Bundle/ChillJobBundle/src/Form/Type/PickRomeAppellationType.php
@@ -77,12 +77,12 @@ class PickRomeAppellationType extends AbstractType
$this->validator = $validator;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
// ->addModelTransformer($this->romeAppellationTransformer)
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Appellation::class)
@@ -97,12 +97,12 @@ class PickRomeAppellationType extends AbstractType
;
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
- public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options)
+ public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options): void
{
$view->vars['attr']['data-rome-appellation-picker'] = true;
$view->vars['attr']['data-select-interactive-loading'] = true;
diff --git a/src/Bundle/ChillJobBundle/src/Menu/MenuBuilder.php b/src/Bundle/ChillJobBundle/src/Menu/MenuBuilder.php
index 61f3d713a..86ef1f8cd 100644
--- a/src/Bundle/ChillJobBundle/src/Menu/MenuBuilder.php
+++ b/src/Bundle/ChillJobBundle/src/Menu/MenuBuilder.php
@@ -28,7 +28,7 @@ class MenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
/** @var \Chill\PersonBundle\Entity\Person $person */
$person = $parameters['person'];
diff --git a/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsJobVoter.php b/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsJobVoter.php
index af4935893..0df2a2d13 100644
--- a/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsJobVoter.php
+++ b/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsJobVoter.php
@@ -45,7 +45,7 @@ class ExportsJobVoter extends AbstractChillVoter implements ProvideRoleHierarchy
/**
* @return bool
*/
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
if ($subject instanceof Center) {
return self::EXPORT === $attribute;
@@ -60,7 +60,7 @@ class ExportsJobVoter extends AbstractChillVoter implements ProvideRoleHierarchy
/**
* @return bool
*/
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
{
$user = $token->getUser();
diff --git a/src/Bundle/ChillJobBundle/src/Security/Authorization/JobVoter.php b/src/Bundle/ChillJobBundle/src/Security/Authorization/JobVoter.php
index 54de180f5..c7c13395c 100644
--- a/src/Bundle/ChillJobBundle/src/Security/Authorization/JobVoter.php
+++ b/src/Bundle/ChillJobBundle/src/Security/Authorization/JobVoter.php
@@ -49,7 +49,7 @@ class JobVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterfa
$this->authorizationHelper = $authorizationHelper;
}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
if (!\in_array($attribute, self::ALL, true)) {
return false;
@@ -66,7 +66,7 @@ class JobVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterfa
return false;
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
{
if ($subject instanceof Person) {
$center = $subject->getCenter();
diff --git a/src/Bundle/ChillMainBundle/CRUD/CompilerPass/CRUDControllerCompilerPass.php b/src/Bundle/ChillMainBundle/CRUD/CompilerPass/CRUDControllerCompilerPass.php
index 601dc9833..922f18ed0 100644
--- a/src/Bundle/ChillMainBundle/CRUD/CompilerPass/CRUDControllerCompilerPass.php
+++ b/src/Bundle/ChillMainBundle/CRUD/CompilerPass/CRUDControllerCompilerPass.php
@@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\Definition;
class CRUDControllerCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$crudConfig = $container->getParameter('chill_main_crud_route_loader_config');
$apiConfig = $container->getParameter('chill_main_api_route_loader_config');
diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
index 19e9014da..ce584aa2c 100644
--- a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
+++ b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php
@@ -695,7 +695,7 @@ class CRUDController extends AbstractController
/**
* @return \Chill\MainBundle\Entity\Center[]
*/
- protected function getReachableCenters(string $role, ?Scope $scope = null)
+ protected function getReachableCenters(string $role, ?Scope $scope = null): array
{
return $this->getAuthorizationHelper()
->getReachableCenters($this->getUser(), $role, $scope);
diff --git a/src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php b/src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php
index 535e47c91..029402ef3 100644
--- a/src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php
+++ b/src/Bundle/ChillMainBundle/CRUD/Resolver/Resolver.php
@@ -94,7 +94,7 @@ class Resolver
/**
* @return bool
*/
- public function hasAction($crudName, $action)
+ public function hasAction($crudName, $action): bool
{
return \array_key_exists(
$action,
diff --git a/src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php b/src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php
index b553db0f4..458265ae2 100644
--- a/src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php
+++ b/src/Bundle/ChillMainBundle/CRUD/Routing/CRUDRoutesLoader.php
@@ -39,7 +39,7 @@ class CRUDRoutesLoader extends Loader
*
* @param mixed|null $type
*/
- public function load($resource, $type = null): RouteCollection
+ public function load(mixed $resource, $type = null): RouteCollection
{
if (true === $this->isLoaded) {
throw new \RuntimeException('Do not add the "CRUD" loader twice');
diff --git a/src/Bundle/ChillMainBundle/ChillMainBundle.php b/src/Bundle/ChillMainBundle/ChillMainBundle.php
index bca92b85c..b360cf239 100644
--- a/src/Bundle/ChillMainBundle/ChillMainBundle.php
+++ b/src/Bundle/ChillMainBundle/ChillMainBundle.php
@@ -36,7 +36,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillMainBundle extends Bundle
{
- public function build(ContainerBuilder $container)
+ public function build(ContainerBuilder $container): void
{
parent::build($container);
diff --git a/src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php b/src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php
index 44a86cb24..0d086ee87 100644
--- a/src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/ChillImportUsersCommand.php
@@ -30,6 +30,7 @@ use Symfony\Component\Console\Question\ConfirmationQuestion;
use Symfony\Component\Validator\ConstraintViolationListInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
+#[\Symfony\Component\Console\Attribute\AsCommand]
class ChillImportUsersCommand extends Command
{
protected static $defaultDescription = 'Import users from csv file';
@@ -71,7 +72,7 @@ class ChillImportUsersCommand extends Command
]);
}
- protected function concatenateViolations(ConstraintViolationListInterface $list)
+ protected function concatenateViolations(ConstraintViolationListInterface $list): string
{
$str = [];
@@ -122,7 +123,7 @@ class ChillImportUsersCommand extends Command
return $groupCenter;
}
- protected function createUser($offset, $data)
+ protected function createUser($offset, $data): \Chill\MainBundle\Entity\User
{
$user = new User();
$user
diff --git a/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php b/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php
index c4d835dbd..1951cdffa 100644
--- a/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php
@@ -27,6 +27,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Class ChillUserSendRenewPasswordCodeCommand.
*/
+#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:user:send-password-recover-code')]
class ChillUserSendRenewPasswordCodeCommand extends Command
{
protected static $defaultDescription = 'Send a message with code to recover password';
@@ -82,7 +83,6 @@ class ChillUserSendRenewPasswordCodeCommand extends Command
protected function configure()
{
$this
- ->setName('chill:user:send-password-recover-code')
->addArgument('csvfile', InputArgument::REQUIRED, 'CSV file with the list of users')
->addOption('template', null, InputOption::VALUE_REQUIRED, 'Template for email')
->addOption('expiration', null, InputOption::VALUE_REQUIRED, 'Expiration of the link, as an unix timestamp')
diff --git a/src/Bundle/ChillMainBundle/Command/ExecuteCronJobCommand.php b/src/Bundle/ChillMainBundle/Command/ExecuteCronJobCommand.php
index 1dc56314b..b735cec3a 100644
--- a/src/Bundle/ChillMainBundle/Command/ExecuteCronJobCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/ExecuteCronJobCommand.php
@@ -17,6 +17,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 ExecuteCronJobCommand extends Command
{
protected static $defaultDescription = 'Execute the cronjob(s) given as argument, or one cronjob scheduled by system.';
diff --git a/src/Bundle/ChillMainBundle/Command/LoadAddressesBEFromBestAddressCommand.php b/src/Bundle/ChillMainBundle/Command/LoadAddressesBEFromBestAddressCommand.php
index db852c650..79d5de2cb 100644
--- a/src/Bundle/ChillMainBundle/Command/LoadAddressesBEFromBestAddressCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/LoadAddressesBEFromBestAddressCommand.php
@@ -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:main:address-ref-from-best-addresses')]
class LoadAddressesBEFromBestAddressCommand extends Command
{
protected static $defaultDescription = 'Import BE addresses from BeST Address (see https://osoc19.github.io/best/)';
@@ -33,7 +34,6 @@ class LoadAddressesBEFromBestAddressCommand extends Command
protected function configure()
{
$this
- ->setName('chill:main:address-ref-from-best-addresses')
->addArgument('lang', InputArgument::REQUIRED, "Language code, for example 'fr'")
->addArgument('list', InputArgument::IS_ARRAY, "The list to add, for example 'full', or 'extract' (dev) or '1xxx' (brussel CP)")
->addOption('send-report-email', 's', InputOption::VALUE_REQUIRED, 'Email address where a list of unimported addresses can be send');
diff --git a/src/Bundle/ChillMainBundle/Command/LoadAddressesFRFromBANCommand.php b/src/Bundle/ChillMainBundle/Command/LoadAddressesFRFromBANCommand.php
index 8483c0be1..1bb1082b6 100644
--- a/src/Bundle/ChillMainBundle/Command/LoadAddressesFRFromBANCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/LoadAddressesFRFromBANCommand.php
@@ -18,6 +18,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:main:address-ref-from-ban')]
class LoadAddressesFRFromBANCommand extends Command
{
protected static $defaultDescription = 'Import FR addresses from BAN (see https://adresses.data.gouv.fr';
@@ -29,7 +30,7 @@ class LoadAddressesFRFromBANCommand extends Command
protected function configure()
{
- $this->setName('chill:main:address-ref-from-ban')
+ $this
->addArgument('departementNo', InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'a list of departement numbers')
->addOption('send-report-email', 's', InputOption::VALUE_REQUIRED, 'Email address where a list of unimported addresses can be send');
}
diff --git a/src/Bundle/ChillMainBundle/Command/LoadAddressesFRFromBANOCommand.php b/src/Bundle/ChillMainBundle/Command/LoadAddressesFRFromBANOCommand.php
index a5471f2aa..e81be9431 100644
--- a/src/Bundle/ChillMainBundle/Command/LoadAddressesFRFromBANOCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/LoadAddressesFRFromBANOCommand.php
@@ -18,6 +18,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:main:address-ref-from-bano')]
class LoadAddressesFRFromBANOCommand extends Command
{
protected static $defaultDescription = 'Import FR addresses from bano (see https://bano.openstreetmap.fr';
@@ -29,7 +30,7 @@ class LoadAddressesFRFromBANOCommand extends Command
protected function configure()
{
- $this->setName('chill:main:address-ref-from-bano')
+ $this
->addArgument('departementNo', InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'a list of departement numbers')
->addOption('send-report-email', 's', InputOption::VALUE_REQUIRED, 'Email address where a list of unimported addresses can be send');
}
diff --git a/src/Bundle/ChillMainBundle/Command/LoadAddressesLUFromBDAddressCommand.php b/src/Bundle/ChillMainBundle/Command/LoadAddressesLUFromBDAddressCommand.php
index 10e2383a3..d8d3035a9 100644
--- a/src/Bundle/ChillMainBundle/Command/LoadAddressesLUFromBDAddressCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/LoadAddressesLUFromBDAddressCommand.php
@@ -17,6 +17,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:main:address-ref-lux')]
class LoadAddressesLUFromBDAddressCommand extends Command
{
protected static $defaultDescription = 'Import LUX addresses from BD addresses (see https://data.public.lu/fr/datasets/adresses-georeferencees-bd-adresses/)';
@@ -30,7 +31,6 @@ class LoadAddressesLUFromBDAddressCommand extends Command
protected function configure()
{
$this
- ->setName('chill:main:address-ref-lux')
->addOption('send-report-email', 's', InputOption::VALUE_REQUIRED, 'Email address where a list of unimported addresses can be send');
}
diff --git a/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php
index 376df4e52..71dd7d872 100644
--- a/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php
@@ -23,6 +23,7 @@ use Symfony\Component\Intl\Languages;
/*
* Load or update the languages entities command
*/
+#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:main:languages:populate')]
class LoadAndUpdateLanguagesCommand extends Command
{
final public const INCLUDE_ANCIENT = 'include_ancient';
@@ -53,7 +54,6 @@ class LoadAndUpdateLanguagesCommand extends Command
protected function configure()
{
$this
- ->setName('chill:main:languages:populate')
->addOption(
self::INCLUDE_REGIONAL_VERSION,
null,
diff --git a/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php
index 3f7f82523..bb3d28806 100644
--- a/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php
@@ -18,6 +18,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Intl\Countries;
+#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:main:countries:populate')]
class LoadCountriesCommand extends Command
{
/**
@@ -55,7 +56,6 @@ class LoadCountriesCommand extends Command
*/
protected function configure()
{
- $this->setName('chill:main:countries:populate');
}
/**
diff --git a/src/Bundle/ChillMainBundle/Command/LoadPostalCodeFR.php b/src/Bundle/ChillMainBundle/Command/LoadPostalCodeFR.php
index eb0bef879..1cacb49cf 100644
--- a/src/Bundle/ChillMainBundle/Command/LoadPostalCodeFR.php
+++ b/src/Bundle/ChillMainBundle/Command/LoadPostalCodeFR.php
@@ -16,6 +16,7 @@ use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
+#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:main:postal-code:load:FR')]
class LoadPostalCodeFR extends Command
{
protected static $defaultDescription = 'Load France\'s postal code from online open data';
@@ -27,7 +28,6 @@ class LoadPostalCodeFR extends Command
public function configure(): void
{
- $this->setName('chill:main:postal-code:load:FR');
}
public function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
index 4f0896114..372ffb6bc 100644
--- a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php
@@ -23,6 +23,7 @@ use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Validator\Validator\ValidatorInterface;
+#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:main:postal-code:populate')]
class LoadPostalCodesCommand extends Command
{
protected static $defaultDescription = 'Add the postal code from a csv file.';
@@ -34,7 +35,7 @@ class LoadPostalCodesCommand extends Command
protected function configure()
{
- $this->setName('chill:main:postal-code:populate')
+ $this
->setHelp('This script will try to avoid existing postal code '
."using the postal code and name. \n"
.'The CSV file must have the following columns: '
@@ -105,7 +106,7 @@ class LoadPostalCodesCommand extends Command
return Command::SUCCESS;
}
- private function addPostalCode($row, OutputInterface $output)
+ private function addPostalCode($row, OutputInterface $output): void
{
if ('FR' === $row[2] && 4 === \strlen((string) $row[0])) {
// CP in FRANCE are on 5 digit
diff --git a/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php b/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php
index 6924b8049..457a02f17 100644
--- a/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php
@@ -22,6 +22,7 @@ use Symfony\Component\Security\Core\Encoder\EncoderFactory;
/**
* Class SetPasswordCommand.
*/
+#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:user:set_password')]
class SetPasswordCommand extends Command
{
protected static $defaultDescription = 'set a password to user';
@@ -41,7 +42,7 @@ class SetPasswordCommand extends Command
->findOneBy(['username' => $username]);
}
- public function _setPassword(User $user, $password)
+ public function _setPassword(User $user, $password): void
{
$defaultEncoder = new \Symfony\Component\PasswordHasher\Hasher\MessageDigestPasswordHasher('sha512', true, 5000);
$encoders = [
@@ -54,9 +55,9 @@ class SetPasswordCommand extends Command
$this->entityManager->flush($user);
}
- public function configure()
+ public function configure(): void
{
- $this->setName('chill:user:set_password')
+ $this
->addArgument('username', InputArgument::REQUIRED, 'the user\'s '
.'username you want to change password')
->addArgument('password', InputArgument::OPTIONAL, 'the new password');
diff --git a/src/Bundle/ChillMainBundle/Command/SynchronizeEntityInfoViewsCommand.php b/src/Bundle/ChillMainBundle/Command/SynchronizeEntityInfoViewsCommand.php
index 16a90dbe8..9e11ac091 100644
--- a/src/Bundle/ChillMainBundle/Command/SynchronizeEntityInfoViewsCommand.php
+++ b/src/Bundle/ChillMainBundle/Command/SynchronizeEntityInfoViewsCommand.php
@@ -16,6 +16,7 @@ use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
+#[\Symfony\Component\Console\Attribute\AsCommand]
class SynchronizeEntityInfoViewsCommand extends Command
{
protected static $defaultDescription = 'Update or create sql views which provide info for various entities';
diff --git a/src/Bundle/ChillMainBundle/Controller/AbsenceController.php b/src/Bundle/ChillMainBundle/Controller/AbsenceController.php
index 3961c9f3a..2a2a90e59 100644
--- a/src/Bundle/ChillMainBundle/Controller/AbsenceController.php
+++ b/src/Bundle/ChillMainBundle/Controller/AbsenceController.php
@@ -22,7 +22,7 @@ class AbsenceController extends AbstractController
public function __construct(private readonly ChillSecurity $security, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
#[Route(path: '/{_locale}/absence', name: 'chill_main_user_absence_index', methods: ['GET', 'POST'])]
- public function setAbsence(Request $request)
+ public function setAbsence(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$user = $this->security->getUser();
$form = $this->createForm(AbsenceType::class, $user);
@@ -43,7 +43,7 @@ class AbsenceController extends AbstractController
}
#[Route(path: '/{_locale}/absence/unset', name: 'chill_main_user_absence_unset', methods: ['GET', 'POST'])]
- public function unsetAbsence(Request $request)
+ public function unsetAbsence(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse
{
$user = $this->security->getUser();
diff --git a/src/Bundle/ChillMainBundle/Controller/AdminController.php b/src/Bundle/ChillMainBundle/Controller/AdminController.php
index abdfb679d..a56eb7ce2 100644
--- a/src/Bundle/ChillMainBundle/Controller/AdminController.php
+++ b/src/Bundle/ChillMainBundle/Controller/AdminController.php
@@ -17,31 +17,31 @@ use Symfony\Component\Routing\Annotation\Route;
class AdminController extends AbstractController
{
#[Route(path: '/{_locale}/admin', name: 'chill_main_admin_central')]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillMain/Admin/index.html.twig');
}
#[Route(path: '/{_locale}/admin/language', name: 'chill_main_language_admin')]
- public function indexLanguageAction()
+ public function indexLanguageAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillMain/Admin/indexLanguage.html.twig');
}
#[Route(path: '/{_locale}/admin/location', name: 'chill_main_location_admin')]
- public function indexLocationAction()
+ public function indexLocationAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillMain/Admin/indexLocation.html.twig');
}
#[Route(path: '/{_locale}/admin/user', name: 'chill_main_user_admin')]
- public function indexUserAction()
+ public function indexUserAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillMain/Admin/indexUser.html.twig');
}
#[Route(path: '/{_locale}/admin/dashboard', name: 'chill_main_dashboard_admin')]
- public function indexDashboardAction()
+ public function indexDashboardAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillMain/Admin/indexDashboard.html.twig');
}
diff --git a/src/Bundle/ChillMainBundle/Controller/DefaultController.php b/src/Bundle/ChillMainBundle/Controller/DefaultController.php
index 389ed7764..4733190dd 100644
--- a/src/Bundle/ChillMainBundle/Controller/DefaultController.php
+++ b/src/Bundle/ChillMainBundle/Controller/DefaultController.php
@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class DefaultController extends AbstractController
{
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/homepage', name: 'chill_main_homepage')]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
if ($this->isGranted('ROLE_ADMIN')) {
return $this->redirectToRoute('chill_main_admin_central', [], 302);
@@ -29,12 +29,12 @@ class DefaultController extends AbstractController
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/homepage', name: 'chill_main_homepage_without_locale')]
- public function indexWithoutLocaleAction()
+ public function indexWithoutLocaleAction(): \Symfony\Component\HttpFoundation\RedirectResponse
{
return $this->redirectToRoute('chill_main_homepage');
}
- public function testAction()
+ public function testAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillMain/Tabs/index.html.twig', [
'tabs' => [
diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php
index 08b89e4bb..997a785ab 100644
--- a/src/Bundle/ChillMainBundle/Controller/ExportController.php
+++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php
@@ -66,7 +66,7 @@ class ExportController extends AbstractController
}
#[Route(path: '/{_locale}/exports/download/{alias}', name: 'chill_main_export_download', methods: ['GET'])]
- public function downloadResultAction(Request $request, mixed $alias)
+ public function downloadResultAction(Request $request, mixed $alias): \Symfony\Component\HttpFoundation\Response
{
/** @var ExportManager $exportManager */
$exportManager = $this->exportManager;
@@ -434,7 +434,7 @@ class ExportController extends AbstractController
*
* @return RedirectResponse
*/
- private function forwardToGenerate(Request $request, DirectExportInterface|ExportInterface $export, $alias, ?SavedExport $savedExport)
+ private function forwardToGenerate(Request $request, DirectExportInterface|ExportInterface $export, $alias, ?SavedExport $savedExport): \Symfony\Component\HttpFoundation\RedirectResponse
{
$dataCenters = $this->session->get('centers_step_raw', null);
$dataFormatter = $this->session->get('formatter_step_raw', null);
@@ -509,7 +509,7 @@ class ExportController extends AbstractController
*
* @return Response
*/
- private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, ?SavedExport $savedExport = null)
+ private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, ?SavedExport $savedExport = null): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
if (!$this->filterStatsByCenters) {
return $this->redirectToRoute('chill_main_export_new', [
diff --git a/src/Bundle/ChillMainBundle/Controller/MenuController.php b/src/Bundle/ChillMainBundle/Controller/MenuController.php
index 2298bde15..165abccb0 100644
--- a/src/Bundle/ChillMainBundle/Controller/MenuController.php
+++ b/src/Bundle/ChillMainBundle/Controller/MenuController.php
@@ -18,7 +18,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
*/
class MenuController extends AbstractController
{
- public function writeMenuAction($menu, $layout, $activeRouteKey = null, array $args = [])
+ public function writeMenuAction($menu, $layout, $activeRouteKey = null, array $args = []): \Symfony\Component\HttpFoundation\Response
{
return $this->render($layout, [
'menu_composer' => $this->get('chill.main.menu_composer'),
diff --git a/src/Bundle/ChillMainBundle/Controller/NotificationApiController.php b/src/Bundle/ChillMainBundle/Controller/NotificationApiController.php
index 1c086cdf2..ad9954a57 100644
--- a/src/Bundle/ChillMainBundle/Controller/NotificationApiController.php
+++ b/src/Bundle/ChillMainBundle/Controller/NotificationApiController.php
@@ -95,9 +95,7 @@ class NotificationApiController
return new JsonResponse(null, JsonResponse::HTTP_ACCEPTED, [], false);
}
- /**
- * @Route("/mark/allread", name="chill_api_main_notification_mark_allread", methods={"POST"})
- */
+ #[Route(path: '/mark/allread', name: 'chill_api_main_notification_mark_allread', methods: ['POST'])]
public function markAllRead(): JsonResponse
{
$user = $this->security->getUser();
@@ -111,9 +109,7 @@ class NotificationApiController
return new JsonResponse($modifiedNotificationIds);
}
- /**
- * @Route("/mark/undoallread", name="chill_api_main_notification_mark_undoallread", methods={"POST"})
- */
+ #[Route(path: '/mark/undoallread', name: 'chill_api_main_notification_mark_undoallread', methods: ['POST'])]
public function undoAllRead(Request $request): JsonResponse
{
$user = $this->security->getUser();
diff --git a/src/Bundle/ChillMainBundle/Controller/PasswordController.php b/src/Bundle/ChillMainBundle/Controller/PasswordController.php
index 958f66fd1..deb4d0b10 100644
--- a/src/Bundle/ChillMainBundle/Controller/PasswordController.php
+++ b/src/Bundle/ChillMainBundle/Controller/PasswordController.php
@@ -45,7 +45,7 @@ final class PasswordController extends AbstractController
* @return Response
*/
#[Route(path: '/public/{_locale}/password/request-changed', name: 'password_request_recover_changed')]
- public function changeConfirmedAction()
+ public function changeConfirmedAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillMain/Password/recover_password_changed.html.twig');
}
@@ -190,7 +190,7 @@ final class PasswordController extends AbstractController
* @return Response
*/
#[Route(path: '/public/{_locale}/password/request-confirm', name: 'password_request_recover_confirm')]
- public function requestRecoverConfirmAction()
+ public function requestRecoverConfirmAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillMain/Password/request_recover_password_confirm.html.twig');
}
@@ -199,7 +199,7 @@ final class PasswordController extends AbstractController
* @return Response
*/
#[Route(path: '/{_locale}/my/password', name: 'change_my_password')]
- public function UserPasswordAction(Request $request)
+ public function UserPasswordAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
if (!$this->security->isGranted('ROLE_USER')) {
throw new AccessDeniedHttpException();
@@ -246,7 +246,7 @@ final class PasswordController extends AbstractController
/**
* @return \Symfony\Component\Form\FormInterface
*/
- protected function requestRecoverForm()
+ protected function requestRecoverForm(): \Symfony\Component\Form\FormInterface
{
$builder = $this->createFormBuilder();
$builder
@@ -280,7 +280,7 @@ final class PasswordController extends AbstractController
/**
* @return \Symfony\Component\Form\FormInterface
*/
- private function passwordForm(User $user)
+ private function passwordForm(User $user): \Symfony\Component\Form\FormInterface
{
return $this
->createForm(
diff --git a/src/Bundle/ChillMainBundle/Controller/ScopeController.php b/src/Bundle/ChillMainBundle/Controller/ScopeController.php
index 45278d7af..4a95f9537 100644
--- a/src/Bundle/ChillMainBundle/Controller/ScopeController.php
+++ b/src/Bundle/ChillMainBundle/Controller/ScopeController.php
@@ -34,7 +34,7 @@ class ScopeController extends AbstractController
* Creates a new Scope entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/scope/create', name: 'admin_scope_create', methods: ['POST'])]
- public function createAction(Request $request)
+ public function createAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$scope = new Scope();
$form = $this->createCreateForm($scope);
@@ -79,7 +79,7 @@ class ScopeController extends AbstractController
* Lists all Scope entities.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/scope/', name: 'admin_scope')]
- public function indexAction()
+ public function indexAction(): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -94,7 +94,7 @@ class ScopeController extends AbstractController
* Displays a form to create a new Scope entity.
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/admin/scope/new', name: 'admin_scope_new')]
- public function newAction()
+ public function newAction(): \Symfony\Component\HttpFoundation\Response
{
$scope = new Scope();
$form = $this->createCreateForm($scope);
@@ -108,7 +108,7 @@ class ScopeController extends AbstractController
/**
* Finds and displays a Scope entity.
*/
- public function showAction(mixed $id)
+ public function showAction(mixed $id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
diff --git a/src/Bundle/ChillMainBundle/Controller/SearchController.php b/src/Bundle/ChillMainBundle/Controller/SearchController.php
index 09e558b0a..3e003493c 100644
--- a/src/Bundle/ChillMainBundle/Controller/SearchController.php
+++ b/src/Bundle/ChillMainBundle/Controller/SearchController.php
@@ -35,7 +35,7 @@ class SearchController extends AbstractController
public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi) {}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/search/advanced/{name}', name: 'chill_main_advanced_search')]
- public function advancedSearchAction(mixed $name, Request $request)
+ public function advancedSearchAction(mixed $name, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
try {
/** @var Chill\MainBundle\Search\SearchProvider $variable */
@@ -80,7 +80,7 @@ class SearchController extends AbstractController
}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/search/advanced', name: 'chill_main_advanced_search_list')]
- public function advancedSearchListAction(Request $request)
+ public function advancedSearchListAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
/** @var Chill\MainBundle\Search\SearchProvider $variable */
$searchProvider = $this->searchProvider;
diff --git a/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php b/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php
index 97507739e..5b9b62371 100644
--- a/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php
+++ b/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php
@@ -23,7 +23,7 @@ class TimelineCenterController extends AbstractController
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security) {}
#[Route(path: '/{_locale}/center/timeline', name: 'chill_center_timeline', methods: ['GET'])]
- public function centerAction(Request $request)
+ public function centerAction(Request $request): \Symfony\Component\HttpFoundation\Response
{
// collect reachable center for each group
$user = $this->security->getUser();
diff --git a/src/Bundle/ChillMainBundle/Controller/UIController.php b/src/Bundle/ChillMainBundle/Controller/UIController.php
index 718d9a3d0..8b4b345b5 100644
--- a/src/Bundle/ChillMainBundle/Controller/UIController.php
+++ b/src/Bundle/ChillMainBundle/Controller/UIController.php
@@ -21,7 +21,7 @@ class UIController extends AbstractController
{
public function showNotificationUserCounterAction(
CountNotificationUser $counter,
- ) {
+ ): \Symfony\Component\HttpFoundation\Response {
$nb = $counter->getSumNotification($this->getUser());
return $this->render('@ChillMain/UI/notification_user_counter.html.twig', [
diff --git a/src/Bundle/ChillMainBundle/Controller/UserController.php b/src/Bundle/ChillMainBundle/Controller/UserController.php
index 66c084e11..e1e80696c 100644
--- a/src/Bundle/ChillMainBundle/Controller/UserController.php
+++ b/src/Bundle/ChillMainBundle/Controller/UserController.php
@@ -203,7 +203,7 @@ class UserController extends CRUDController
* Displays a form to edit the user current location.
*/
#[Route(path: '/{_locale}/main/user/current-location/edit', name: 'chill_main_user_currentlocation_edit')]
- public function editCurrentLocationAction(Request $request)
+ public function editCurrentLocationAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$user = $this->security->getUser();
$form = $this->createForm(UserCurrentLocationType::class, $user)
@@ -234,7 +234,7 @@ class UserController extends CRUDController
* Displays a form to edit the user password.
*/
#[Route(path: '/{_locale}/admin/user/{id}/edit_password', name: 'admin_user_edit_password')]
- public function editPasswordAction(User $user, Request $request)
+ public function editPasswordAction(User $user, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$editForm = $this->createEditPasswordForm($user);
$editForm->handleRequest($request);
@@ -244,7 +244,7 @@ class UserController extends CRUDController
// logging for prod
$this->logger->info('update password for an user', [
- 'by' => $this->getUser()->getUsername(),
+ 'by' => $this->getUser()->getUserIdentifier(),
'user' => $user->getUsername(),
]);
diff --git a/src/Bundle/ChillMainBundle/Controller/UserProfileController.php b/src/Bundle/ChillMainBundle/Controller/UserProfileController.php
index a48d1a1e2..de86495c7 100644
--- a/src/Bundle/ChillMainBundle/Controller/UserProfileController.php
+++ b/src/Bundle/ChillMainBundle/Controller/UserProfileController.php
@@ -34,7 +34,7 @@ final class UserProfileController extends AbstractController
* User profile that allows editing of phonenumber and visualization of certain data.
*/
#[Route(path: '/{_locale}/main/user/my-profile', name: 'chill_main_user_profile')]
- public function __invoke(Request $request)
+ public function __invoke(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
if (!$this->security->isGranted('ROLE_USER')) {
throw new AccessDeniedHttpException();
diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php
index 1c71e17cb..d38f364e1 100644
--- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php
+++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php
@@ -51,7 +51,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
$manager->flush();
}
- public function setContainer(?ContainerInterface $container = null)
+ public function setContainer(?ContainerInterface $container = null): void
{
$this->container = $container;
}
@@ -61,7 +61,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
*
* @return AddressReference
*/
- private function getRandomAddressReference()
+ private function getRandomAddressReference(): \Chill\MainBundle\Entity\AddressReference
{
$ar = new AddressReference();
@@ -84,7 +84,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
*
* @return Point
*/
- private function getRandomPoint()
+ private function getRandomPoint(): \Chill\MainBundle\Doctrine\Model\Point
{
$lonBrussels = 4.35243;
$latBrussels = 50.84676;
diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php
index 1f68abd21..542ce648c 100644
--- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php
+++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php
@@ -43,7 +43,7 @@ class LoadCountries extends AbstractFixture implements ContainerAwareInterface,
$manager->flush();
}
- public function setContainer(?ContainerInterface $container = null)
+ public function setContainer(?ContainerInterface $container = null): void
{
$this->container = $container;
}
diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php
index a5b49e347..e3fbb1e99 100644
--- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php
+++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php
@@ -57,7 +57,7 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface,
$manager->flush();
}
- public function setContainer(?ContainerInterface $container = null)
+ public function setContainer(?ContainerInterface $container = null): void
{
$this->container = $container;
}
diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php
index a1185c655..04e053890 100644
--- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php
+++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php
@@ -65,7 +65,7 @@ class LoadLocationType extends AbstractFixture implements ContainerAwareInterfac
$manager->flush();
}
- public function setContainer(?ContainerInterface $container = null)
+ public function setContainer(?ContainerInterface $container = null): void
{
$this->container = $container;
}
diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php
index b1cebbaab..4217f196a 100644
--- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php
+++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadPostalCodes.php
@@ -337,7 +337,7 @@ class LoadPostalCodes extends AbstractFixture implements OrderedFixtureInterface
$this->loadPostalCodeCSV($manager, self::$postalCodeFrance, 'FR');
}
- private function loadPostalCodeCSV(ObjectManager $manager, string $csv, string $countryCode)
+ private function loadPostalCodeCSV(ObjectManager $manager, string $csv, string $countryCode): void
{
$lines = str_getcsv($csv, "\n");
$country = $manager->getRepository(Country::class)
diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php
index 3afdefbab..600dfa1e2 100644
--- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php
+++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php
@@ -92,7 +92,7 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde
$manager->flush();
}
- public function setContainer(?ContainerInterface $container = null)
+ public function setContainer(?ContainerInterface $container = null): void
{
if (null === $container) {
throw new \LogicException('$container should not be null');
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
index 9fa3b0f42..4c5297f8d 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
@@ -102,7 +102,7 @@ class ChillMainExtension extends Extension implements
*/
protected $widgetFactories = [];
- public function addWidgetFactory(WidgetFactoryInterface $factory)
+ public function addWidgetFactory(WidgetFactoryInterface $factory): void
{
$this->widgetFactories[] = $factory;
}
@@ -123,7 +123,7 @@ class ChillMainExtension extends Extension implements
/**
* @throws \Exception
*/
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
// configuration for main bundle
$configuration = $this->getConfiguration($configs, $container);
@@ -232,7 +232,7 @@ class ChillMainExtension extends Extension implements
// $this->configureSms($config['short_messages'], $container, $loader);
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->prependNotifierTexterWithLegacyData($container);
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ACLFlagsCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ACLFlagsCompilerPass.php
index 6518d6115..740d8fe93 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ACLFlagsCompilerPass.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ACLFlagsCompilerPass.php
@@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Reference;
class ACLFlagsCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$permissionGroupType = $container->getDefinition(PermissionsGroupType::class);
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ExportsCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ExportsCompilerPass.php
index c2126da1e..d8da384c8 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ExportsCompilerPass.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/ExportsCompilerPass.php
@@ -28,7 +28,7 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class ExportsCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
if (!$container->has(ExportManager::class)) {
throw new \LogicException('service '.ExportManager::class.' is not defined. It is required by ExportsCompilerPass');
@@ -45,7 +45,7 @@ class ExportsCompilerPass implements CompilerPassInterface
private function compileExportElementsProvider(
Definition $chillManagerDefinition,
ContainerBuilder $container,
- ) {
+ ): void {
$taggedServices = $container->findTaggedServiceIds(
'chill.export_elements_provider'
);
@@ -74,7 +74,7 @@ class ExportsCompilerPass implements CompilerPassInterface
private function compileFormatters(
Definition $chillManagerDefinition,
ContainerBuilder $container,
- ) {
+ ): void {
$taggedServices = $container->findTaggedServiceIds(
'chill.export_formatter'
);
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/MenuCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/MenuCompilerPass.php
index a91436d3b..2df5e2757 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/MenuCompilerPass.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/MenuCompilerPass.php
@@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Reference;
class MenuCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('chill.main.menu_composer')) {
throw new \LogicException(sprintf('The service %s does not exists in container.', MenuComposer::class));
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/NotificationCounterCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/NotificationCounterCompilerPass.php
index a0ea00e8a..8f58257c4 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/NotificationCounterCompilerPass.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/NotificationCounterCompilerPass.php
@@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Reference;
class NotificationCounterCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition(CountNotificationUser::class)) {
throw new \LogicException('The service '.CountNotificationUser::class.' should be defined');
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/SearchableServicesCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/SearchableServicesCompilerPass.php
index ee305f964..4ffe86d67 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/SearchableServicesCompilerPass.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/SearchableServicesCompilerPass.php
@@ -22,7 +22,7 @@ class SearchableServicesCompilerPass implements CompilerPassInterface
*
* @see \Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface::process()
*/
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('chill_main.search_provider')) {
throw new \LogicException('service chill_main.search_provider is not defined.');
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/TimelineCompilerClass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/TimelineCompilerClass.php
index 28ef7a991..92fab2259 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/TimelineCompilerClass.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/TimelineCompilerClass.php
@@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class TimelineCompilerClass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition('chill_main.timeline_builder')) {
throw new \LogicException('service chill_main.timeline_builder is not defined.');
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/WidgetsCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/WidgetsCompilerPass.php
index 198d44db1..2309b9571 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/WidgetsCompilerPass.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/CompilerPass/WidgetsCompilerPass.php
@@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
*/
class WidgetsCompilerPass extends AbstractWidgetsCompilerPass
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$this->doProcess($container, 'chill_main', 'chill_main.widgets');
}
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ConfigConsistencyCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/ConfigConsistencyCompilerPass.php
index 202d6f468..5d2ce8dc4 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/ConfigConsistencyCompilerPass.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/ConfigConsistencyCompilerPass.php
@@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
*/
class ConfigConsistencyCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$availableLanguages = $container
->getParameter('chill_main.available_languages');
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php
index c3b179ec4..071eec65b 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AbstractWidgetsCompilerPass.php
@@ -123,7 +123,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
ContainerBuilder $container,
$extension,
$containerWidgetConfigParameterName,
- ) {
+ ): void {
if (!$container->hasDefinition(self::WIDGET_MANAGER)) {
throw new \LogicException('the service '.self::WIDGET_MANAGER.' should be present. It is required by '.self::class);
}
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AddWidgetConfigurationTrait.php b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AddWidgetConfigurationTrait.php
index 47040f0e1..d6c0ecfb9 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AddWidgetConfigurationTrait.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/Widget/AddWidgetConfigurationTrait.php
@@ -124,7 +124,7 @@ trait AddWidgetConfigurationTrait
/**
* @param WidgetFactoryInterface[] $widgetFactories
*/
- public function setWidgetFactories(array $widgetFactories)
+ public function setWidgetFactories(array $widgetFactories): void
{
$this->widgetFactories = $widgetFactories;
}
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Age.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Age.php
index cce2f9ba4..715054920 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Age.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Age.php
@@ -37,7 +37,7 @@ class Age extends FunctionNode
);
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php
index bc6134c60..5648773e3 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php
@@ -42,7 +42,7 @@ class Extract extends FunctionNode
);
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php
index 56b2a9cda..aae16d1eb 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/GetJsonFieldByKey.php
@@ -30,7 +30,7 @@ class GetJsonFieldByKey extends FunctionNode
);
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Greatest.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Greatest.php
index 6467b93c5..9fb1611c8 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Greatest.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Greatest.php
@@ -35,7 +35,7 @@ class Greatest extends FunctionNode
return 'GREATEST('.implode(', ', array_map(static fn (Node $expr) => $expr->dispatch($sqlWalker), $this->exprs)).')';
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$this->exprs = [];
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php
index 171b069d3..416970f01 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonAggregate.php
@@ -30,7 +30,7 @@ class JsonAggregate extends FunctionNode
return sprintf('jsonb_agg(%s)', $this->expr->dispatch($sqlWalker));
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonBuildObject.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonBuildObject.php
index ea6ea4c53..49fd8f9bb 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonBuildObject.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonBuildObject.php
@@ -34,7 +34,7 @@ class JsonBuildObject extends FunctionNode
return 'JSONB_BUILD_OBJECT('.implode(', ', array_map(static fn (Node $expr) => $expr->dispatch($sqlWalker), $this->exprs)).')';
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$lexer = $parser->getLexer();
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php
index 7abf15972..5537ec0f4 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php
@@ -26,7 +26,7 @@ class JsonExtract extends FunctionNode
return sprintf('%s->>%s', $this->element->dispatch($sqlWalker), $this->keyToExtract->dispatch($sqlWalker));
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Least.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Least.php
index aa6844e88..8e60422fe 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Least.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Least.php
@@ -35,7 +35,7 @@ class Least extends FunctionNode
return 'LEAST('.implode(', ', array_map(static fn (Node $expr) => $expr->dispatch($sqlWalker), $this->exprs)).')';
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$this->exprs = [];
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php
index 9f3d1b861..d42e78ad6 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/STContains.php
@@ -28,7 +28,7 @@ class STContains extends FunctionNode
', '.$this->secondPart->dispatch($sqlWalker).')';
}
- public function parse(\Doctrine\ORM\Query\Parser $parser)
+ public function parse(\Doctrine\ORM\Query\Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/STX.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/STX.php
index f0d99d837..429c6c0cb 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/STX.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/STX.php
@@ -24,7 +24,7 @@ class STX extends FunctionNode
return sprintf('ST_X(%s)', $this->field->dispatch($sqlWalker));
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/STY.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/STY.php
index 42842605d..acd837c7e 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/STY.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/STY.php
@@ -24,7 +24,7 @@ class STY extends FunctionNode
return sprintf('ST_Y(%s)', $this->field->dispatch($sqlWalker));
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php
index 477e0c542..c2071202b 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Similarity.php
@@ -25,7 +25,7 @@ class Similarity extends FunctionNode
', '.$this->secondPart->dispatch($sqlWalker).')';
}
- public function parse(\Doctrine\ORM\Query\Parser $parser)
+ public function parse(\Doctrine\ORM\Query\Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php
index 0096825a4..d457ede2d 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/StrictWordSimilarityOPS.php
@@ -26,7 +26,7 @@ class StrictWordSimilarityOPS extends \Doctrine\ORM\Query\AST\Functions\Function
' <<% '.$this->secondPart->dispatch($sqlWalker);
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php
index dc73aea92..0c3c3ca9a 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php
@@ -33,7 +33,7 @@ class ToChar extends FunctionNode
);
}
- public function parse(Parser $parser)
+ public function parse(Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php
index 12a745a0c..eacb0e3e7 100644
--- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php
+++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Unaccent.php
@@ -28,7 +28,7 @@ class Unaccent extends FunctionNode
return 'UNACCENT('.$this->string->dispatch($sqlWalker).')';
}
- public function parse(\Doctrine\ORM\Query\Parser $parser)
+ public function parse(\Doctrine\ORM\Query\Parser $parser): void
{
$parser->match(\Doctrine\ORM\Query\TokenType::T_IDENTIFIER);
$parser->match(\Doctrine\ORM\Query\TokenType::T_OPEN_PARENTHESIS);
diff --git a/src/Bundle/ChillMainBundle/Entity/Address.php b/src/Bundle/ChillMainBundle/Entity/Address.php
index 38b309a76..cc0726c70 100644
--- a/src/Bundle/ChillMainBundle/Entity/Address.php
+++ b/src/Bundle/ChillMainBundle/Entity/Address.php
@@ -274,7 +274,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -289,7 +289,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
return $this->isNoAddress;
}
- public function getLinkedToThirdParty()
+ public function getLinkedToThirdParty(): ?\Chill\ThirdPartyBundle\Entity\ThirdParty
{
return $this->linkedToThirdParty;
}
@@ -334,7 +334,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
*
* @deprecated
*/
- public function getStreetAddress1()
+ public function getStreetAddress1(): string
{
return $this->street;
}
@@ -346,7 +346,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
*
* @deprecated
*/
- public function getStreetAddress2()
+ public function getStreetAddress2(): string
{
return $this->streetNumber;
}
@@ -575,7 +575,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
*
* @param array $payload
*/
- public function validate(ExecutionContextInterface $context, $payload)
+ public function validate(ExecutionContextInterface $context, $payload): void
{
if (!$this->getValidFrom() instanceof \DateTime) {
$context
diff --git a/src/Bundle/ChillMainBundle/Entity/Center.php b/src/Bundle/ChillMainBundle/Entity/Center.php
index 1ac7f5977..8d4a4a4c8 100644
--- a/src/Bundle/ChillMainBundle/Entity/Center.php
+++ b/src/Bundle/ChillMainBundle/Entity/Center.php
@@ -90,7 +90,7 @@ class Center implements HasCenterInterface, \Stringable
/**
* @return string
*/
- public function getName()
+ public function getName(): string
{
return $this->name;
}
diff --git a/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php b/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php
index ea0d4ec29..df19c941e 100644
--- a/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php
+++ b/src/Bundle/ChillMainBundle/Entity/Embeddable/CommentEmbeddable.php
@@ -36,7 +36,7 @@ class CommentEmbeddable
/**
* @return \DateTime
*/
- public function getDate()
+ public function getDate(): ?\DateTime
{
return $this->date;
}
@@ -51,17 +51,17 @@ class CommentEmbeddable
return null === $this->getComment() || '' === $this->getComment();
}
- public function setComment(?string $comment)
+ public function setComment(?string $comment): void
{
$this->comment = $comment;
}
- public function setDate(?\DateTime $date)
+ public function setDate(?\DateTime $date): void
{
$this->date = $date;
}
- public function setUserId(?int $userId)
+ public function setUserId(?int $userId): void
{
$this->userId = $userId;
}
diff --git a/src/Bundle/ChillMainBundle/Entity/Language.php b/src/Bundle/ChillMainBundle/Entity/Language.php
index 894b929ac..2dba6548f 100644
--- a/src/Bundle/ChillMainBundle/Entity/Language.php
+++ b/src/Bundle/ChillMainBundle/Entity/Language.php
@@ -41,7 +41,7 @@ class Language
*
* @return string
*/
- public function getId()
+ public function getId(): ?string
{
return $this->id;
}
@@ -51,7 +51,7 @@ class Language
*
* @return string array
*/
- public function getName()
+ public function getName(): array
{
return $this->name;
}
diff --git a/src/Bundle/ChillMainBundle/Entity/Notification.php b/src/Bundle/ChillMainBundle/Entity/Notification.php
index 9f08e0487..76ed9b51d 100644
--- a/src/Bundle/ChillMainBundle/Entity/Notification.php
+++ b/src/Bundle/ChillMainBundle/Entity/Notification.php
@@ -119,7 +119,7 @@ class Notification implements TrackUpdateInterface
return $this;
}
- public function addAddressesEmail(string $email)
+ public function addAddressesEmail(string $email): void
{
if (!\in_array($email, $this->addressesEmails, true)) {
$this->addressesEmails[] = $email;
@@ -274,7 +274,7 @@ class Notification implements TrackUpdateInterface
}
#[ORM\PreFlush]
- public function registerUnread()
+ public function registerUnread(): void
{
foreach ($this->addedAddresses as $addressee) {
$this->addUnreadBy($addressee);
@@ -312,7 +312,7 @@ class Notification implements TrackUpdateInterface
return $this;
}
- public function removeAddressesEmail(string $email)
+ public function removeAddressesEmail(string $email): void
{
if (\in_array($email, $this->addressesEmails, true)) {
$this->addressesEmails = array_filter($this->addressesEmails, static fn ($e) => $e !== $email);
diff --git a/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php b/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php
index 723513c8b..359e324d1 100644
--- a/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php
+++ b/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php
@@ -57,7 +57,7 @@ class PermissionsGroup
$this->groupCenters = new ArrayCollection();
}
- public function addRoleScope(RoleScope $roleScope)
+ public function addRoleScope(RoleScope $roleScope): void
{
$this->roleScopes->add($roleScope);
}
@@ -65,7 +65,7 @@ class PermissionsGroup
/**
* @return string[]
*/
- public function getFlags()
+ public function getFlags(): array
{
return $this->flags;
}
@@ -73,7 +73,7 @@ class PermissionsGroup
/**
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -81,7 +81,7 @@ class PermissionsGroup
/**
* @return string
*/
- public function getName()
+ public function getName(): string
{
return $this->name;
}
@@ -95,7 +95,7 @@ class PermissionsGroup
* Test that a role scope is associated only once
* with the permission group.
*/
- public function isRoleScopePresentOnce(ExecutionContextInterface $context)
+ public function isRoleScopePresentOnce(ExecutionContextInterface $context): void
{
$roleScopesId = array_map(
static fn (RoleScope $roleScope) => $roleScope->getId(),
@@ -115,7 +115,7 @@ class PermissionsGroup
/**
* @throws \RuntimeException if the roleScope could not be removed
*/
- public function removeRoleScope(RoleScope $roleScope)
+ public function removeRoleScope(RoleScope $roleScope): void
{
$result = $this->roleScopes->removeElement($roleScope);
diff --git a/src/Bundle/ChillMainBundle/Entity/PostalCode.php b/src/Bundle/ChillMainBundle/Entity/PostalCode.php
index ecab19a5f..cbfad7938 100644
--- a/src/Bundle/ChillMainBundle/Entity/PostalCode.php
+++ b/src/Bundle/ChillMainBundle/Entity/PostalCode.php
@@ -92,7 +92,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
*
* @return string
*/
- public function getCode()
+ public function getCode(): ?string
{
return $this->code;
}
@@ -102,7 +102,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
*
* @return Country
*/
- public function getCountry()
+ public function getCountry(): ?\Chill\MainBundle\Entity\Country
{
return $this->country;
}
@@ -112,7 +112,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -122,7 +122,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
*
* @return string
*/
- public function getName()
+ public function getName(): ?string
{
return $this->name;
}
@@ -132,7 +132,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
*
* @return int
*/
- public function getOrigin()
+ public function getOrigin(): int
{
return $this->origin;
}
diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php
index 8a31779f9..b8910ef8d 100644
--- a/src/Bundle/ChillMainBundle/Entity/User.php
+++ b/src/Bundle/ChillMainBundle/Entity/User.php
@@ -141,7 +141,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
return $this;
}
- public function eraseCredentials() {}
+ public function eraseCredentials(): void {}
public function getAbsenceStart(): ?\DateTimeImmutable
{
@@ -153,7 +153,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
*
* @return array
*/
- public function getAttributes()
+ public function getAttributes(): array
{
if (null === $this->attributes) {
$this->attributes = [];
@@ -180,7 +180,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
/**
* @return string
*/
- public function getEmailCanonical()
+ public function getEmailCanonical(): ?string
{
return $this->emailCanonical;
}
@@ -307,7 +307,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
/**
* @return string
*/
- public function getUsername()
+ public function getUsername(): string
{
return $this->username;
}
@@ -320,7 +320,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
/**
* @return string
*/
- public function getUsernameCanonical()
+ public function getUsernameCanonical(): ?string
{
return $this->usernameCanonical;
}
@@ -341,7 +341,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
/**
* @return bool
*/
- public function isAccountNonLocked()
+ public function isAccountNonLocked(): bool
{
return $this->locked;
}
@@ -357,7 +357,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
/**
* @return bool
*/
- public function isEnabled()
+ public function isEnabled(): bool
{
return $this->enabled;
}
@@ -367,7 +367,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
* use this function to avoid a user to be associated to the same groupCenter
* more than once.
*/
- public function isGroupCenterPresentOnce(ExecutionContextInterface $context)
+ public function isGroupCenterPresentOnce(ExecutionContextInterface $context): void
{
$groupCentersIds = [];
@@ -389,7 +389,7 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
/**
* @throws \RuntimeException if the groupCenter is not in the collection
*/
- public function removeGroupCenter(GroupCenter $groupCenter)
+ public function removeGroupCenter(GroupCenter $groupCenter): void
{
if (false === $this->groupCenters->removeElement($groupCenter)) {
throw new \RuntimeException('The groupCenter could not be removed, it seems not to be associated with the user. Aborting.');
diff --git a/src/Bundle/ChillMainBundle/Export/ExportManager.php b/src/Bundle/ChillMainBundle/Export/ExportManager.php
index 949523eb0..9bcf8d362 100644
--- a/src/Bundle/ChillMainBundle/Export/ExportManager.php
+++ b/src/Bundle/ChillMainBundle/Export/ExportManager.php
@@ -160,7 +160,7 @@ class ExportManager
*
* @internal used by DI
*/
- public function addFormatter(FormatterInterface $formatter, string $alias)
+ public function addFormatter(FormatterInterface $formatter, string $alias): void
{
$this->formatters[$alias] = $formatter;
}
@@ -534,7 +534,7 @@ class ExportManager
QueryBuilder $qb,
array $data,
array $center,
- ) {
+ ): void {
$aggregators = $this->retrieveUsedAggregators($data);
foreach ($aggregators as $alias => $aggregator) {
@@ -561,7 +561,7 @@ class ExportManager
QueryBuilder $qb,
mixed $data,
array $centers,
- ) {
+ ): void {
$filters = $this->retrieveUsedFilters($data);
foreach ($filters as $alias => $filter) {
@@ -658,7 +658,7 @@ class ExportManager
*
* @return string[]
*/
- private function retrieveUsedModifiers(mixed $data)
+ private function retrieveUsedModifiers(mixed $data): array
{
if (null === $data) {
return [];
diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php
index f0c2b9cee..ede88a0cf 100644
--- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php
+++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php
@@ -59,7 +59,7 @@ class CSVFormatter implements FormatterInterface
/**
* @uses appendAggregatorForm
*/
- public function buildForm(FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases)
+ public function buildForm(FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases): void
{
$aggregators = $this->exportManager->getAggregators($aggregatorAliases);
$nb = \count($aggregatorAliases);
@@ -119,7 +119,7 @@ class CSVFormatter implements FormatterInterface
array $exportData,
array $filtersData,
array $aggregatorsData,
- ) {
+ ): \Symfony\Component\HttpFoundation\Response {
$this->result = $result;
$this->orderingHeaders($formatterData);
$this->export = $this->exportManager->getExport($exportAlias);
@@ -145,7 +145,7 @@ class CSVFormatter implements FormatterInterface
return 'tabular';
}
- protected function gatherLabels()
+ protected function gatherLabels(): array
{
return array_merge(
$this->gatherLabelsFromAggregators(),
@@ -345,7 +345,7 @@ class CSVFormatter implements FormatterInterface
*
* @param string $nbAggregators
*/
- private function appendAggregatorForm(FormBuilderInterface $builder, $nbAggregators)
+ private function appendAggregatorForm(FormBuilderInterface $builder, $nbAggregators): void
{
$builder->add('order', ChoiceType::class, [
'choices' => array_combine(
diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php
index fda49f202..39bee9681 100644
--- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php
+++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php
@@ -69,7 +69,7 @@ class CSVListFormatter implements FormatterInterface
FormBuilderInterface $builder,
$exportAlias,
array $aggregatorAliases,
- ) {
+ ): void {
$builder->add('numerotation', ChoiceType::class, [
'choices' => [
'yes' => true,
@@ -109,7 +109,7 @@ class CSVListFormatter implements FormatterInterface
array $exportData,
array $filtersData,
array $aggregatorsData,
- ) {
+ ): \Symfony\Component\HttpFoundation\Response {
$this->result = $result;
$this->exportAlias = $exportAlias;
$this->exportData = $exportData;
diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php
index 9385f1b61..d830bf22a 100644
--- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php
+++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php
@@ -67,7 +67,7 @@ class CSVPivotedListFormatter implements FormatterInterface
FormBuilderInterface $builder,
$exportAlias,
array $aggregatorAliases,
- ) {
+ ): void {
$builder->add('numerotation', ChoiceType::class, [
'choices' => [
'yes' => true,
@@ -108,7 +108,7 @@ class CSVPivotedListFormatter implements FormatterInterface
array $exportData,
array $filtersData,
array $aggregatorsData,
- ) {
+ ): \Symfony\Component\HttpFoundation\Response {
$this->result = $result;
$this->exportAlias = $exportAlias;
$this->exportData = $exportData;
diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php
index 76e17378f..cf15f5bbd 100644
--- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php
+++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php
@@ -130,7 +130,7 @@ class SpreadSheetFormatter implements FormatterInterface
FormBuilderInterface $builder,
$exportAlias,
array $aggregatorAliases,
- ) {
+ ): void {
// choosing between formats
$builder->add('format', ChoiceType::class, [
'choices' => [
@@ -417,7 +417,7 @@ class SpreadSheetFormatter implements FormatterInterface
*
* @return string
*/
- protected function getDisplayableResult($key, mixed $value)
+ protected function getDisplayableResult($key, mixed $value): mixed
{
if (false === $this->cacheDisplayableResultIsInitialized) {
$this->initializeCache($key);
diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php
index 3c5e90381..1bb004012 100644
--- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php
+++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php
@@ -73,7 +73,7 @@ class SpreadsheetListFormatter implements FormatterInterface
FormBuilderInterface $builder,
$exportAlias,
array $aggregatorAliases,
- ) {
+ ): void {
$builder
->add('format', ChoiceType::class, [
'choices' => [
@@ -121,7 +121,7 @@ class SpreadsheetListFormatter implements FormatterInterface
array $exportData,
array $filtersData,
array $aggregatorsData,
- ) {
+ ): \Symfony\Component\HttpFoundation\Response {
$this->result = $result;
$this->exportAlias = $exportAlias;
$this->exportData = $exportData;
diff --git a/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php b/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php
index 9161316e7..65a5d20cc 100644
--- a/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php
+++ b/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php
@@ -81,7 +81,7 @@ class ExportAddressHelper
public function __construct(private readonly AddressRender $addressRender, private readonly AddressRepository $addressRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
- public function addSelectClauses(int $params, QueryBuilder $queryBuilder, $entityName = 'address', $prefix = 'add')
+ public function addSelectClauses(int $params, QueryBuilder $queryBuilder, $entityName = 'address', $prefix = 'add'): void
{
foreach (self::ALL as $key => $bitmask) {
if (($params & $bitmask) === $bitmask) {
diff --git a/src/Bundle/ChillMainBundle/Form/AbsenceType.php b/src/Bundle/ChillMainBundle/Form/AbsenceType.php
index d0aed640c..cc78aac8f 100644
--- a/src/Bundle/ChillMainBundle/Form/AbsenceType.php
+++ b/src/Bundle/ChillMainBundle/Form/AbsenceType.php
@@ -19,7 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class AbsenceType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('absenceStart', ChillDateType::class, [
@@ -29,7 +29,7 @@ class AbsenceType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => User::class,
diff --git a/src/Bundle/ChillMainBundle/Form/CenterType.php b/src/Bundle/ChillMainBundle/Form/CenterType.php
index 62b018f11..0962ccf75 100644
--- a/src/Bundle/ChillMainBundle/Form/CenterType.php
+++ b/src/Bundle/ChillMainBundle/Form/CenterType.php
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class CenterType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TextType::class, [
@@ -32,7 +32,7 @@ class CenterType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Center::class);
diff --git a/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php b/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
index d2dd47962..fe8da5b1c 100644
--- a/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
+++ b/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php
@@ -55,7 +55,7 @@ class PostalCodeChoiceLoader implements ChoiceLoaderInterface
*
* @return array
*/
- public function loadChoicesForValues(array $values, $value = null)
+ public function loadChoicesForValues(array $values, $value = null): array
{
$choices = [];
@@ -75,7 +75,7 @@ class PostalCodeChoiceLoader implements ChoiceLoaderInterface
*
* @return array|string[]
*/
- public function loadValuesForChoices(array $choices, $value = null)
+ public function loadValuesForChoices(array $choices, $value = null): array
{
$values = [];
diff --git a/src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php b/src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php
index a4cab4a9b..5c08aa57c 100644
--- a/src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php
+++ b/src/Bundle/ChillMainBundle/Form/DataMapper/AddressDataMapper.php
@@ -28,7 +28,7 @@ class AddressDataMapper implements DataMapperInterface
* @param Address $address
* @param \Iterator $forms
*/
- public function mapDataToForms($address, \Traversable $forms)
+ public function mapDataToForms($address, \Traversable $forms): void
{
if (null === $address) {
return;
@@ -78,7 +78,7 @@ class AddressDataMapper implements DataMapperInterface
* @param \Iterator $forms
* @param Address $address
*/
- public function mapFormsToData(\Traversable $forms, &$address)
+ public function mapFormsToData(\Traversable $forms, &$address): void
{
if (!$address instanceof Address) {
$address = new Address();
diff --git a/src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php b/src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php
index 3f1284db8..4c198e943 100644
--- a/src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php
+++ b/src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php
@@ -21,7 +21,7 @@ final class PrivateCommentDataMapper extends AbstractType implements DataMapperI
{
public function __construct(private readonly Security $security) {}
- public function mapDataToForms($viewData, \Traversable $forms)
+ public function mapDataToForms($viewData, \Traversable $forms): void
{
if (null === $viewData) {
return null;
@@ -36,7 +36,7 @@ final class PrivateCommentDataMapper extends AbstractType implements DataMapperI
$forms['comments']->setData($viewData->getCommentForUser($this->security->getUser()));
}
- public function mapFormsToData(\Traversable $forms, &$viewData)
+ public function mapFormsToData(\Traversable $forms, &$viewData): void
{
$forms = iterator_to_array($forms);
diff --git a/src/Bundle/ChillMainBundle/Form/DataMapper/RollingDateDataMapper.php b/src/Bundle/ChillMainBundle/Form/DataMapper/RollingDateDataMapper.php
index 254860e64..ef436be7b 100644
--- a/src/Bundle/ChillMainBundle/Form/DataMapper/RollingDateDataMapper.php
+++ b/src/Bundle/ChillMainBundle/Form/DataMapper/RollingDateDataMapper.php
@@ -17,7 +17,7 @@ use Symfony\Component\Form\Exception;
class RollingDateDataMapper implements DataMapperInterface
{
- public function mapDataToForms($viewData, \Traversable $forms)
+ public function mapDataToForms($viewData, \Traversable $forms): void
{
if (null === $viewData) {
return;
diff --git a/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php b/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php
index d6a0cea20..339e913b9 100644
--- a/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php
+++ b/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php
@@ -18,7 +18,7 @@ class ScopePickerDataMapper implements DataMapperInterface
{
public function __construct(private readonly ?Scope $scope = null) {}
- public function mapDataToForms($data, \Traversable $forms)
+ public function mapDataToForms($data, \Traversable $forms): void
{
$forms = iterator_to_array($forms);
@@ -37,7 +37,7 @@ class ScopePickerDataMapper implements DataMapperInterface
}
}
- public function mapFormsToData(\Traversable $forms, &$data)
+ public function mapFormsToData(\Traversable $forms, &$data): void
{
$forms = iterator_to_array($forms);
diff --git a/src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php b/src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php
index bb45940fc..897b7b4b9 100644
--- a/src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php
+++ b/src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php
@@ -45,7 +45,7 @@ class IdToEntityDataTransformer implements DataTransformerInterface
*
* @return array|object[]|T[]|T|object
*/
- public function reverseTransform($value)
+ public function reverseTransform($value): mixed
{
if ($this->multiple) {
if (null === $value | '' === $value) {
diff --git a/src/Bundle/ChillMainBundle/Form/EntityWorkflowCommentType.php b/src/Bundle/ChillMainBundle/Form/EntityWorkflowCommentType.php
index 965097c1f..d7675ac5b 100644
--- a/src/Bundle/ChillMainBundle/Form/EntityWorkflowCommentType.php
+++ b/src/Bundle/ChillMainBundle/Form/EntityWorkflowCommentType.php
@@ -17,7 +17,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class EntityWorkflowCommentType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('comment', ChillTextareaType::class, [
diff --git a/src/Bundle/ChillMainBundle/Form/LocationFormType.php b/src/Bundle/ChillMainBundle/Form/LocationFormType.php
index 7f61cccce..ee2c5214a 100644
--- a/src/Bundle/ChillMainBundle/Form/LocationFormType.php
+++ b/src/Bundle/ChillMainBundle/Form/LocationFormType.php
@@ -26,7 +26,7 @@ final class LocationFormType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('locationType', EntityType::class, [
@@ -63,7 +63,7 @@ final class LocationFormType extends AbstractType
/**
* @param OptionsResolverInterface $resolver
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\MainBundle\Entity\Location::class,
@@ -73,7 +73,7 @@ final class LocationFormType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_mainbundle_location';
}
diff --git a/src/Bundle/ChillMainBundle/Form/LocationTypeType.php b/src/Bundle/ChillMainBundle/Form/LocationTypeType.php
index d75c40716..9ef492bab 100644
--- a/src/Bundle/ChillMainBundle/Form/LocationTypeType.php
+++ b/src/Bundle/ChillMainBundle/Form/LocationTypeType.php
@@ -19,7 +19,7 @@ use Symfony\Component\Form\FormBuilderInterface;
final class LocationTypeType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add(
'title',
diff --git a/src/Bundle/ChillMainBundle/Form/NewsItemType.php b/src/Bundle/ChillMainBundle/Form/NewsItemType.php
index 6fe513055..02fe55d0d 100644
--- a/src/Bundle/ChillMainBundle/Form/NewsItemType.php
+++ b/src/Bundle/ChillMainBundle/Form/NewsItemType.php
@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class NewsItemType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TextType::class, [
@@ -50,7 +50,7 @@ class NewsItemType extends AbstractType
/**
* @return void
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefault('data_class', NewsItem::class);
}
diff --git a/src/Bundle/ChillMainBundle/Form/NotificationCommentType.php b/src/Bundle/ChillMainBundle/Form/NotificationCommentType.php
index b94790cb7..5f2e19121 100644
--- a/src/Bundle/ChillMainBundle/Form/NotificationCommentType.php
+++ b/src/Bundle/ChillMainBundle/Form/NotificationCommentType.php
@@ -17,7 +17,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class NotificationCommentType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('content', ChillTextareaType::class, [
'required' => false,
diff --git a/src/Bundle/ChillMainBundle/Form/NotificationType.php b/src/Bundle/ChillMainBundle/Form/NotificationType.php
index 2bd8ba820..79207cc04 100644
--- a/src/Bundle/ChillMainBundle/Form/NotificationType.php
+++ b/src/Bundle/ChillMainBundle/Form/NotificationType.php
@@ -26,7 +26,7 @@ use Symfony\Component\Validator\Constraints\NotNull;
class NotificationType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TextType::class, [
@@ -59,7 +59,7 @@ class NotificationType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefault('class', Notification::class);
}
diff --git a/src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php b/src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php
index bd9f897e1..037a88749 100644
--- a/src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php
+++ b/src/Bundle/ChillMainBundle/Form/PermissionsGroupType.php
@@ -27,12 +27,12 @@ class PermissionsGroupType extends AbstractType
*/
protected $flagProviders = [];
- public function addFlagProvider(PermissionsGroupFlagProvider $provider)
+ public function addFlagProvider(PermissionsGroupFlagProvider $provider): void
{
$this->flagProviders[] = $provider;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TextType::class);
@@ -53,7 +53,7 @@ class PermissionsGroupType extends AbstractType
/**
* @param OptionsResolverInterface $resolver
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\MainBundle\Entity\PermissionsGroup::class,
@@ -63,7 +63,7 @@ class PermissionsGroupType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_mainbundle_permissionsgroup';
}
diff --git a/src/Bundle/ChillMainBundle/Form/RegroupmentType.php b/src/Bundle/ChillMainBundle/Form/RegroupmentType.php
index 22814598a..f6e655f19 100644
--- a/src/Bundle/ChillMainBundle/Form/RegroupmentType.php
+++ b/src/Bundle/ChillMainBundle/Form/RegroupmentType.php
@@ -22,7 +22,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class RegroupmentType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TextType::class, [
@@ -39,7 +39,7 @@ class RegroupmentType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Regroupment::class);
diff --git a/src/Bundle/ChillMainBundle/Form/SavedExportType.php b/src/Bundle/ChillMainBundle/Form/SavedExportType.php
index 16aa4e42e..b60d60e89 100644
--- a/src/Bundle/ChillMainBundle/Form/SavedExportType.php
+++ b/src/Bundle/ChillMainBundle/Form/SavedExportType.php
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class SavedExportType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TextType::class, [
@@ -31,7 +31,7 @@ class SavedExportType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'class' => SavedExport::class,
diff --git a/src/Bundle/ChillMainBundle/Form/ScopeType.php b/src/Bundle/ChillMainBundle/Form/ScopeType.php
index c5a7657b0..894a23a88 100644
--- a/src/Bundle/ChillMainBundle/Form/ScopeType.php
+++ b/src/Bundle/ChillMainBundle/Form/ScopeType.php
@@ -19,7 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class ScopeType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
@@ -33,7 +33,7 @@ class ScopeType extends AbstractType
/**
* @param OptionsResolverInterface $resolver
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\MainBundle\Entity\Scope::class,
@@ -43,7 +43,7 @@ class ScopeType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_mainbundle_scope';
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/AddressDateType.php b/src/Bundle/ChillMainBundle/Form/Type/AddressDateType.php
index 020a434f6..9ac28edc7 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/AddressDateType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/AddressDateType.php
@@ -18,7 +18,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class AddressDateType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add(
@@ -30,7 +30,7 @@ class AddressDateType extends AbstractType
);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefault('data_class', Address::class);
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/AddressType.php b/src/Bundle/ChillMainBundle/Form/Type/AddressType.php
index 8ae05b8b4..5b21a4808 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/AddressType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/AddressType.php
@@ -32,7 +32,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
class AddressType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('street', TextType::class, [
@@ -75,7 +75,7 @@ class AddressType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('data_class', Address::class)
diff --git a/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php b/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php
index 1b371a473..c263b5339 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php
@@ -79,7 +79,7 @@ trait AppendScopeChoiceTypeTrait
* - Chill\MainBundle\Entity\Center for center
* - Symfony\Component\Security\Core\Role\Role for role
*/
- public function appendScopeChoicesOptions(OptionsResolver $resolver)
+ public function appendScopeChoicesOptions(OptionsResolver $resolver): void
{
$resolver
->setRequired(['center', 'role'])
diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php
index 84a42b96b..58a1c9af0 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/ChillCollectionType.php
@@ -27,7 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
class ChillCollectionType extends AbstractType
{
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['button_add_label'] = $options['button_add_label'];
$view->vars['button_remove_label'] = $options['button_remove_label'];
@@ -39,7 +39,7 @@ class ChillCollectionType extends AbstractType
$view->vars['uniqid'] = uniqid();
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
@@ -52,7 +52,7 @@ class ChillCollectionType extends AbstractType
]);
}
- public function getParent()
+ public function getParent(): ?string
{
return \Symfony\Component\Form\Extension\Core\Type\CollectionType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php
index 0063ee7d9..ce9491cfe 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/ChillDateTimeType.php
@@ -23,7 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
class ChillDateTimeType extends AbstractType
{
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('date_widget', 'single_text')
@@ -33,7 +33,7 @@ class ChillDateTimeType extends AbstractType
->setDefault('html5', true);
}
- public function getParent()
+ public function getParent(): ?string
{
return DateTimeType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php
index 95fc9daad..f314e302d 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/ChillDateType.php
@@ -23,14 +23,14 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
class ChillDateType extends AbstractType
{
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('widget', 'single_text')
->setDefault('html5', true);
}
- public function getParent()
+ public function getParent(): ?string
{
return DateType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php
index 700726619..61d1f7f04 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/ChillPhoneNumberType.php
@@ -30,7 +30,7 @@ class ChillPhoneNumberType extends AbstractType
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('default_region', $this->defaultCarrierCode)
@@ -38,7 +38,7 @@ class ChillPhoneNumberType extends AbstractType
->setDefault('type', \libphonenumber\PhoneNumberType::FIXED_LINE_OR_MOBILE);
}
- public function getParent()
+ public function getParent(): ?string
{
return PhoneNumberType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php b/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php
index ef3d371b3..65a4ea6a0 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/ChillTextareaType.php
@@ -28,14 +28,14 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
final class ChillTextareaType extends AbstractType
{
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
if (!$options['disable_editor']) {
$view->vars['attr']['ckeditor'] = true;
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefined('disable_editor')
@@ -43,7 +43,7 @@ final class ChillTextareaType extends AbstractType
->setAllowedTypes('disable_editor', 'bool');
}
- public function getParent()
+ public function getParent(): ?string
{
return TextareaType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php
index 2b1d2f3e0..18e201606 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/CommentType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/CommentType.php
@@ -33,7 +33,7 @@ class CommentType extends AbstractType
$this->user = $tokenStorage->getToken()->getUser();
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('comment', ChillTextareaType::class, [
@@ -53,12 +53,12 @@ class CommentType extends AbstractType
});
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['fullWidth'] = true;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefined('disable_editor')
diff --git a/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php
index 89a82d469..c6b4a4f1c 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php
@@ -23,7 +23,7 @@ class ComposedGroupCenterType extends AbstractType
{
public function __construct(private readonly CenterRepository $centerRepository) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$centers = $this->centerRepository->findActive();
@@ -37,7 +37,7 @@ class ComposedGroupCenterType extends AbstractType
]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'composed_groupcenter';
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php
index 2183b85f2..4775626fa 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php
@@ -47,7 +47,7 @@ class ComposedRoleScopeType extends AbstractType
$this->roleProvider = $roleProvider;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
// store values used in internal function
$translatableStringHelper = $this->translatableStringHelper;
@@ -82,7 +82,7 @@ class ComposedRoleScopeType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefault('data_class', \Chill\MainBundle\Entity\RoleScope::class);
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php
index 04094537b..fe9f9540a 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php
@@ -19,7 +19,7 @@ final readonly class AddressToIdDataTransformer implements DataTransformerInterf
{
public function __construct(private AddressRepository $addressRepository) {}
- public function reverseTransform($value)
+ public function reverseTransform($value): mixed
{
if (null === $value || '' === $value) {
return null;
@@ -38,7 +38,7 @@ final readonly class AddressToIdDataTransformer implements DataTransformerInterf
return $address;
}
- public function transform($value)
+ public function transform($value): mixed
{
if (null === $value) {
return '';
diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php
index d328d38f0..5002d2fad 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php
@@ -22,7 +22,7 @@ class CenterTransformer implements DataTransformerInterface
{
public function __construct(private readonly CenterRepository $centerRepository, private readonly bool $multiple = false) {}
- public function reverseTransform($id)
+ public function reverseTransform($id): mixed
{
if (null === $id) {
if ($this->multiple) {
@@ -55,7 +55,7 @@ class CenterTransformer implements DataTransformerInterface
return $centers[0];
}
- public function transform($center)
+ public function transform($center): mixed
{
if (null === $center) {
return '';
diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/DateIntervalTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/DateIntervalTransformer.php
index 7bc447f29..136b22a5e 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/DateIntervalTransformer.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/DateIntervalTransformer.php
@@ -17,7 +17,7 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException;
class DateIntervalTransformer implements DataTransformerInterface
{
- public function reverseTransform($value)
+ public function reverseTransform($value): mixed
{
if (empty($value) || empty($value['n'])) {
return null;
@@ -32,7 +32,7 @@ class DateIntervalTransformer implements DataTransformerInterface
}
}
- public function transform($value)
+ public function transform($value): mixed
{
if (empty($value)) {
return null;
diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/EntityToJsonTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/EntityToJsonTransformer.php
index 8f0126049..ee1de004b 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/EntityToJsonTransformer.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/EntityToJsonTransformer.php
@@ -26,7 +26,7 @@ class EntityToJsonTransformer implements DataTransformerInterface
{
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly bool $multiple, private readonly string $type) {}
- public function reverseTransform($value)
+ public function reverseTransform($value): mixed
{
if ('' === $value) {
return $this->multiple ? [] : null;
@@ -66,7 +66,7 @@ class EntityToJsonTransformer implements DataTransformerInterface
]);
}
- private function denormalizeOne(array $item)
+ private function denormalizeOne(array $item): mixed
{
if (!\array_key_exists('type', $item)) {
throw new TransformationFailedException('the key "type" is missing on element');
diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php
index 808093278..1cb342d2b 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php
@@ -22,7 +22,7 @@ class MultipleObjectsToIdTransformer implements DataTransformerInterface
/**
* Transforms a string (id) to an object (item).
*/
- public function reverseTransform($array)
+ public function reverseTransform($array): mixed
{
$ret = new ArrayCollection();
diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php
index e56778bf2..84e80c5bb 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php
@@ -48,7 +48,7 @@ class ObjectToIdTransformer implements DataTransformerInterface
*
* @return string
*/
- public function transform($object)
+ public function transform($object): mixed
{
if (null === $object) {
return '';
diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php
index dde8b7b9e..ebc3ba15a 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php
@@ -20,7 +20,7 @@ class PostalCodeToIdTransformer implements DataTransformerInterface
{
public function __construct(private readonly PostalCodeRepositoryInterface $postalCodeRepository) {}
- public function reverseTransform($value)
+ public function reverseTransform($value): mixed
{
if (null === $value || trim('') === $value) {
return null;
@@ -33,7 +33,7 @@ class PostalCodeToIdTransformer implements DataTransformerInterface
return $this->postalCodeRepository->find((int) $value);
}
- public function transform($value)
+ public function transform($value): mixed
{
if (null === $value) {
return null;
diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php
index 2779f2cdd..2ffdeeac2 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php
@@ -20,7 +20,7 @@ class ScopeTransformer implements DataTransformerInterface
{
public function __construct(private readonly EntityManagerInterface $em) {}
- public function reverseTransform($id)
+ public function reverseTransform($id): mixed
{
if (null === $id) {
return null;
@@ -38,7 +38,7 @@ class ScopeTransformer implements DataTransformerInterface
return $scope;
}
- public function transform($scope)
+ public function transform($scope): mixed
{
if (null === $scope) {
return null;
diff --git a/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php b/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php
index c9bc4dd82..e7cc91668 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/DateIntervalType.php
@@ -51,7 +51,7 @@ use Symfony\Component\Validator\Constraints\GreaterThan;
*/
class DateIntervalType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('n', IntegerType::class, [
@@ -68,7 +68,7 @@ class DateIntervalType extends AbstractType
$builder->addModelTransformer(new DateIntervalTransformer());
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefined('unit_choices')
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php
index fe4c43830..7f523ab32 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php
@@ -40,7 +40,7 @@ class ExportType extends AbstractType
$this->personFieldsConfig = $parameterBag->get('chill_person.person_fields');
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$export = $this->exportManager->getExport($options['export_alias']);
@@ -123,7 +123,7 @@ class ExportType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setRequired(['export_alias', 'picked_centers'])
->setAllowedTypes('export_alias', ['string'])
@@ -133,7 +133,7 @@ class ExportType extends AbstractType
]);
}
- public function getParent()
+ public function getParent(): ?string
{
return FormType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php
index d4873df83..aa54e2e50 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php
@@ -26,7 +26,7 @@ class FilterType extends AbstractType
public function __construct() {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$filter = $options['filter'];
@@ -53,7 +53,7 @@ class FilterType extends AbstractType
$builder->add($filterFormBuilder);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setRequired('filter')
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php
index b2b58c809..969916014 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Export/FormatterType.php
@@ -28,7 +28,7 @@ class FormatterType extends AbstractType
$this->exportManager = $manager;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$formatter = $this->exportManager->getFormatter($options['formatter_alias']);
@@ -39,7 +39,7 @@ class FormatterType extends AbstractType
);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setRequired(['formatter_alias', 'export_alias',
'aggregator_aliases', ]);
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php
index fa8caf488..942101f89 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php
@@ -35,7 +35,7 @@ final class PickCenterType extends AbstractType
private readonly AuthorizationHelperForCurrentUserInterface $authorizationHelper,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$export = $this->exportManager->getExport($options['export_alias']);
$centers = $this->authorizationHelper->getReachableCenters(
@@ -70,7 +70,7 @@ final class PickCenterType extends AbstractType
$builder->setDataMapper(new ExportPickCenterDataMapper());
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setRequired('export_alias');
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickFormatterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickFormatterType.php
index 8a2883657..61823d194 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickFormatterType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickFormatterType.php
@@ -29,7 +29,7 @@ class PickFormatterType extends AbstractType
$this->exportManager = $exportManager;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$export = $this->exportManager->getExport($options['export_alias']);
$allowedFormatters = $this->exportManager
@@ -49,7 +49,7 @@ class PickFormatterType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setRequired(['export_alias']);
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php b/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
index 139328b7c..ba4fba25c 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormView;
final class FilterOrderType extends \Symfony\Component\Form\AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
/** @var FilterOrderHelper $helper */
$helper = $options['helper'];
@@ -145,7 +145,7 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
);
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
/** @var FilterOrderHelper $helper */
$helper = $options['helper'];
@@ -157,7 +157,7 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
}
}
- public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver)
+ public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver): void
{
$resolver->setRequired('helper')
->setAllowedTypes('helper', FilterOrderHelper::class);
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php b/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php
index 190e09f30..085b44e06 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php
@@ -43,12 +43,12 @@ final class PickAddressType extends AbstractType
{
public function __construct(private readonly AddressToIdDataTransformer $addressToIdDataTransformer, private readonly TranslatorInterface $translator) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->addModelTransformer($this->addressToIdDataTransformer);
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['uniqid'] = $view->vars['attr']['data-input-address'] = \uniqid('input_address_');
$view->vars['attr']['data-use-valid-from'] = (int) $options['use_valid_from'];
@@ -57,7 +57,7 @@ final class PickAddressType extends AbstractType
$view->vars['attr']['data-button-text-update'] = $this->translator->trans($options['button_text_update']);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'class' => Address::class,
@@ -72,7 +72,7 @@ final class PickAddressType extends AbstractType
]);
}
- public function getParent()
+ public function getParent(): ?string
{
return HiddenType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php
index ba6cc874d..7ea568ad5 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php
@@ -39,7 +39,7 @@ class PickCenterType extends AbstractType
/**
* add a data transformer if user can reach only one center.
*/
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$centers = $this->getReachableCenters($options['role'], $options['scopes']);
@@ -78,7 +78,7 @@ class PickCenterType extends AbstractType
));
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['is_hidden'] = \count($this->getReachableCenters(
$options['role'],
@@ -112,7 +112,7 @@ class PickCenterType extends AbstractType
* configure default options, i.e. add choices if user can reach multiple
* centers.
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Center::class)
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php b/src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php
index f9aa09ce8..1f3e27f48 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php
@@ -23,7 +23,7 @@ class PickCivilityType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('label', 'Civility')
@@ -41,7 +41,7 @@ class PickCivilityType extends AbstractType
->setDefault('class', Civility::class);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickLocationTypeType.php b/src/Bundle/ChillMainBundle/Form/Type/PickLocationTypeType.php
index 8aa216da1..c9213935d 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PickLocationTypeType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PickLocationTypeType.php
@@ -21,7 +21,7 @@ class PickLocationTypeType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php b/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php
index 1a1ed4354..25c7d8386 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php
@@ -23,17 +23,17 @@ class PickPostalCodeType extends AbstractType
{
public function __construct(private readonly PostalCodeToIdTransformer $postalCodeToIdTransformer) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->addViewTransformer($this->postalCodeToIdTransformer);
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['uniqid'] = $view->vars['attr']['data-input-postal-code'] = uniqid('input_pick_postal_code_');
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', PostalCode::class)
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickRollingDateType.php b/src/Bundle/ChillMainBundle/Form/Type/PickRollingDateType.php
index ca10530e8..89b599c2f 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PickRollingDateType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PickRollingDateType.php
@@ -24,7 +24,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class PickRollingDateType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('roll', ChoiceType::class, [
@@ -45,12 +45,12 @@ class PickRollingDateType extends AbstractType
$builder->setDataMapper(new RollingDateDataMapper());
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['uniqid'] = uniqid('rollingdate-');
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'class' => RollingDate::class,
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php b/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php
index 0bb5ecee3..adab77c4d 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php
@@ -43,12 +43,12 @@ class PickUserDynamicType extends AbstractType
private readonly Security $security,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->addViewTransformer(new EntityToJsonTransformer($this->denormalizer, $this->serializer, $options['multiple'], 'user'));
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['multiple'] = $options['multiple'];
$view->vars['types'] = ['user'];
@@ -68,7 +68,7 @@ class PickUserDynamicType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('multiple', false)
@@ -84,7 +84,7 @@ class PickUserDynamicType extends AbstractType
->setAllowedTypes('submit_on_adding_new_entity', ['bool']);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'pick_entity_dynamic';
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickUserGroupOrUserDynamicType.php b/src/Bundle/ChillMainBundle/Form/Type/PickUserGroupOrUserDynamicType.php
index 6d24e145e..e8f4b26bc 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PickUserGroupOrUserDynamicType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PickUserGroupOrUserDynamicType.php
@@ -35,12 +35,12 @@ final class PickUserGroupOrUserDynamicType extends AbstractType
private readonly Security $security,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->addViewTransformer(new EntityToJsonTransformer($this->denormalizer, $this->serializer, $options['multiple'], 'user_group_or_user'));
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['multiple'] = $options['multiple'];
$view->vars['types'] = ['user-group', 'user'];
@@ -60,7 +60,7 @@ final class PickUserGroupOrUserDynamicType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('multiple', false)
@@ -76,7 +76,7 @@ final class PickUserGroupOrUserDynamicType extends AbstractType
->setAllowedTypes('submit_on_adding_new_entity', ['bool']);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'pick_entity_dynamic';
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php b/src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php
index 9d1cdb626..39a8fa689 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php
@@ -22,7 +22,7 @@ class PickUserLocationType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly LocationRepository $locationRepository) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php b/src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php
index f7055858f..5d67be663 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PostalCodeType.php
@@ -59,7 +59,7 @@ class PostalCodeType extends AbstractType
$this->translator = $translator;
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['attr']['data-postal-code'] = 'data-postal-code';
$view->vars['attr']['data-select-interactive-loading'] = true;
@@ -71,7 +71,7 @@ class PostalCodeType extends AbstractType
$view->vars['attr']['data-searching-label'] = $this->translator->trans('select2.searching');
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
// create a local copy for usage in Closure
$helper = $this->translatableStringHelper;
@@ -83,7 +83,7 @@ class PostalCodeType extends AbstractType
->setDefault('placeholder', 'Select a postal code');
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php b/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php
index 0d26b5a95..a6c2a90a4 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php
@@ -23,7 +23,7 @@ class PrivateCommentType extends AbstractType
{
public function __construct(protected PrivateCommentDataMapper $dataMapper) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('comments', ChillTextareaType::class, [
@@ -33,12 +33,12 @@ class PrivateCommentType extends AbstractType
->setDataMapper($this->dataMapper);
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['fullWidth'] = true;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefined('disable_editor')
diff --git a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php
index 6f10626c6..9abab5e36 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php
@@ -45,7 +45,7 @@ class ScopePickerType extends AbstractType
private readonly TranslatableStringHelperInterface $translatableStringHelper,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$items = array_values(
array_filter(
@@ -78,12 +78,12 @@ class ScopePickerType extends AbstractType
}
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['fullWidth'] = true;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
// create `center` option
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php
index d965a919a..44b94eb29 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Select2ChoiceType.php
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
class Select2ChoiceType extends AbstractType
{
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults(
[
@@ -29,7 +29,7 @@ class Select2ChoiceType extends AbstractType
);
}
- public function getParent()
+ public function getParent(): ?string
{
return ChoiceType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php
index e9ff503df..b7e1c5eda 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php
@@ -28,13 +28,13 @@ class Select2CountryType extends AbstractType
{
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$transformer = new ObjectToIdTransformer($this->em, Country::class);
$builder->addModelTransformer($transformer);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$countries = $this->em->getRepository(Country::class)->findAll();
$choices = [];
@@ -62,12 +62,12 @@ class Select2CountryType extends AbstractType
]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'select2_chill_country';
}
- public function getParent()
+ public function getParent(): ?string
{
return Select2ChoiceType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php
index bf300a389..e6632aaad 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Select2EntityType.php
@@ -20,14 +20,14 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
class Select2EntityType extends AbstractType
{
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->replaceDefaults(
['attr' => ['class' => 'select2 ']]
);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php
index 68a3970ba..b85447906 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php
@@ -28,13 +28,13 @@ class Select2LanguageType extends AbstractType
{
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$transformer = new MultipleObjectsToIdTransformer($this->em, Language::class);
$builder->addModelTransformer($transformer);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$languages = $this->em->getRepository(Language::class)->findAll();
$preferredLanguages = $this->parameterBag->get('chill_main.available_languages');
@@ -58,12 +58,12 @@ class Select2LanguageType extends AbstractType
]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'select2_chill_language';
}
- public function getParent()
+ public function getParent(): ?string
{
return Select2ChoiceType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/TranslatableStringFormType.php b/src/Bundle/ChillMainBundle/Form/Type/TranslatableStringFormType.php
index 6945d28fb..6725e9d68 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/TranslatableStringFormType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/TranslatableStringFormType.php
@@ -31,7 +31,7 @@ class TranslatableStringFormType extends AbstractType
$this->frameworkTranslatorFallback = $translator->getFallbackLocales();
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
foreach ($this->availableLanguages as $lang) {
$builder->add(
@@ -46,7 +46,7 @@ class TranslatableStringFormType extends AbstractType
}
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'translatable_string';
}
diff --git a/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php b/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php
index b49d59442..df46a7d4a 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php
@@ -55,7 +55,7 @@ class UserPickerType extends AbstractType
$this->tokenStorage = $tokenStorage;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
// create `center` option
@@ -87,7 +87,7 @@ class UserPickerType extends AbstractType
});
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php b/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php
index bf6a5d172..4bff4f13b 100644
--- a/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php
+++ b/src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php
@@ -17,7 +17,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class UserCurrentLocationType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('currentLocation', PickUserLocationType::class);
}
diff --git a/src/Bundle/ChillMainBundle/Form/UserGroupType.php b/src/Bundle/ChillMainBundle/Form/UserGroupType.php
index 2e3819560..3bf06af1c 100644
--- a/src/Bundle/ChillMainBundle/Form/UserGroupType.php
+++ b/src/Bundle/ChillMainBundle/Form/UserGroupType.php
@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class UserGroupType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('label', TranslatableStringFormType::class, [
diff --git a/src/Bundle/ChillMainBundle/Form/UserJobType.php b/src/Bundle/ChillMainBundle/Form/UserJobType.php
index 32ddc3179..5fea4c844 100644
--- a/src/Bundle/ChillMainBundle/Form/UserJobType.php
+++ b/src/Bundle/ChillMainBundle/Form/UserJobType.php
@@ -17,7 +17,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class UserJobType extends \Symfony\Component\Form\AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('label', TranslatableStringFormType::class, [
diff --git a/src/Bundle/ChillMainBundle/Form/UserPasswordType.php b/src/Bundle/ChillMainBundle/Form/UserPasswordType.php
index 256e68731..933b55790 100644
--- a/src/Bundle/ChillMainBundle/Form/UserPasswordType.php
+++ b/src/Bundle/ChillMainBundle/Form/UserPasswordType.php
@@ -43,7 +43,7 @@ class UserPasswordType extends AbstractType
$this->chillLogger = $chillLogger;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('new_password', RepeatedType::class, [
@@ -93,7 +93,7 @@ class UserPasswordType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setRequired('user')
@@ -103,7 +103,7 @@ class UserPasswordType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_mainbundle_user_password';
}
diff --git a/src/Bundle/ChillMainBundle/Form/UserPhonenumberType.php b/src/Bundle/ChillMainBundle/Form/UserPhonenumberType.php
index 579829b84..78211f677 100644
--- a/src/Bundle/ChillMainBundle/Form/UserPhonenumberType.php
+++ b/src/Bundle/ChillMainBundle/Form/UserPhonenumberType.php
@@ -19,7 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class UserPhonenumberType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('phonenumber', ChillPhoneNumberType::class, [
@@ -27,7 +27,7 @@ class UserPhonenumberType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => User::class,
diff --git a/src/Bundle/ChillMainBundle/Form/UserType.php b/src/Bundle/ChillMainBundle/Form/UserType.php
index 9d62fbc6a..551dcf6a4 100644
--- a/src/Bundle/ChillMainBundle/Form/UserType.php
+++ b/src/Bundle/ChillMainBundle/Form/UserType.php
@@ -38,7 +38,7 @@ class UserType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('username')
@@ -153,7 +153,7 @@ class UserType extends AbstractType
/**
* @param OptionsResolverInterface $resolver
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\MainBundle\Entity\User::class,
@@ -167,7 +167,7 @@ class UserType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_mainbundle_user';
}
diff --git a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php
index 222927b42..7f423b4a1 100644
--- a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php
+++ b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php
@@ -38,7 +38,7 @@ class WorkflowStepType extends AbstractType
private readonly EntityWorkflowManager $entityWorkflowManager,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
/** @var EntityWorkflow $entityWorkflow */
$entityWorkflow = $options['entity_workflow'];
@@ -210,7 +210,7 @@ class WorkflowStepType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('data_class', WorkflowTransitionContextDTO::class)
diff --git a/src/Bundle/ChillMainBundle/Form/WorkflowTransitionType.php b/src/Bundle/ChillMainBundle/Form/WorkflowTransitionType.php
index bf2646e60..2c035155a 100644
--- a/src/Bundle/ChillMainBundle/Form/WorkflowTransitionType.php
+++ b/src/Bundle/ChillMainBundle/Form/WorkflowTransitionType.php
@@ -18,7 +18,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class WorkflowTransitionType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('current_step', WorkflowStepType::class, [
@@ -27,7 +27,7 @@ class WorkflowTransitionType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setRequired('entity_workflow')
diff --git a/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php b/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php
index 3268fee05..58b90948f 100644
--- a/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php
+++ b/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php
@@ -20,7 +20,7 @@ class PersistNotificationOnTerminateEventSubscriber implements EventSubscriberIn
{
public function __construct(private readonly EntityManagerInterface $em, private readonly NotificationPersisterInterface $persister) {}
- public static function getSubscribedEvents()
+ public static function getSubscribedEvents(): array
{
return [
'kernel.terminate' => [
diff --git a/src/Bundle/ChillMainBundle/Notification/Mailer.php b/src/Bundle/ChillMainBundle/Notification/Mailer.php
index 48adcd24f..c40e16b05 100644
--- a/src/Bundle/ChillMainBundle/Notification/Mailer.php
+++ b/src/Bundle/ChillMainBundle/Notification/Mailer.php
@@ -74,7 +74,7 @@ class Mailer
array $bodies,
?callable $callback = null,
mixed $force = false,
- ) {
+ ): void {
$fromEmail = $this->routeParameters['from_email'];
$fromName = $this->routeParameters['from_name'];
$to = $recipient instanceof User ? $recipient->getEmail() : $recipient;
diff --git a/src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php b/src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php
index ede9a6a61..5227db18d 100644
--- a/src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php
+++ b/src/Bundle/ChillMainBundle/Pagination/ChillItemsPerPageTwig.php
@@ -43,7 +43,7 @@ class ChillItemsPerPageTwig extends AbstractExtension
Environment $env,
PaginatorInterface $paginator,
$template = '@ChillMain/Pagination/items_per_page.html.twig',
- ) {
+ ): string {
return $env->render($template, [
'paginator' => $paginator,
'current' => $paginator->getItemsPerPage(),
diff --git a/src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php b/src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php
index c8f06f1a9..6a0bf5897 100644
--- a/src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php
+++ b/src/Bundle/ChillMainBundle/Pagination/ChillPaginationTwig.php
@@ -47,7 +47,7 @@ class ChillPaginationTwig extends AbstractExtension
Environment $env,
PaginatorInterface $paginator,
$template = '@ChillMain/Pagination/long.html.twig',
- ) {
+ ): string {
$t = match ($template) {
'long' => self::LONG_TEMPLATE,
'short' => self::SHORT_TEMPLATE,
diff --git a/src/Bundle/ChillMainBundle/Pagination/Paginator.php b/src/Bundle/ChillMainBundle/Pagination/Paginator.php
index b2500dfc2..bd9eebe9f 100644
--- a/src/Bundle/ChillMainBundle/Pagination/Paginator.php
+++ b/src/Bundle/ChillMainBundle/Pagination/Paginator.php
@@ -180,7 +180,7 @@ class Paginator implements PaginatorInterface
return $page->getNumber() === $this->currentPageNumber;
}
- public function setItemsPerPage(int $itemsPerPage)
+ public function setItemsPerPage(int $itemsPerPage): void
{
$this->itemPerPage = $itemsPerPage;
}
diff --git a/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php b/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php
index 9a809287b..e8a5af835 100644
--- a/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php
+++ b/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php
@@ -96,7 +96,7 @@ final readonly class PaginatorFactory implements PaginatorFactoryInterface
return $request->get('_route');
}
- private function getCurrentRouteParameters()
+ private function getCurrentRouteParameters(): array
{
return array_merge(
$this->router->getContext()->getParameters(),
diff --git a/src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php b/src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php
index d41f9225f..254f8aeae 100644
--- a/src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php
+++ b/src/Bundle/ChillMainBundle/Redis/RedisConnectionFactory.php
@@ -31,7 +31,7 @@ final class RedisConnectionFactory implements EventSubscriberInterface
$this->redis = new ChillRedis();
}
- public function create()
+ public function create(): \Chill\MainBundle\Redis\ChillRedis
{
$result = $this->redis->connect($this->host, $this->port, $this->timeout);
@@ -51,7 +51,7 @@ final class RedisConnectionFactory implements EventSubscriberInterface
];
}
- public function onKernelFinishRequest()
+ public function onKernelFinishRequest(): void
{
$this->redis->close();
}
diff --git a/src/Bundle/ChillMainBundle/Routing/Loader/ChillRoutesLoader.php b/src/Bundle/ChillMainBundle/Routing/Loader/ChillRoutesLoader.php
index 37faf98ab..2aac07dae 100644
--- a/src/Bundle/ChillMainBundle/Routing/Loader/ChillRoutesLoader.php
+++ b/src/Bundle/ChillMainBundle/Routing/Loader/ChillRoutesLoader.php
@@ -27,7 +27,7 @@ class ChillRoutesLoader extends Loader
parent::__construct();
}
- public function load($resource, $type = null)
+ public function load(mixed $resource, $type = null): mixed
{
$collection = new RouteCollection();
@@ -40,7 +40,7 @@ class ChillRoutesLoader extends Loader
return $collection;
}
- public function supports($resource, $type = null)
+ public function supports($resource, $type = null): bool
{
return 'chill_routes' === $type;
}
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php
index 0d91a0438..1d74adc08 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminLanguageMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
// all the entries below must have ROLE_ADMIN permissions
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php
index b69399daf..df6998d0a 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminLocationMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
// all the entries below must have ROLE_ADMIN permissions
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminNewsMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminNewsMenuBuilder.php
index 08e72884f..5c778a466 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminNewsMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminNewsMenuBuilder.php
@@ -19,7 +19,7 @@ class AdminNewsMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly AuthorizationCheckerInterface $authorizationChecker) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php
index 6c2baf0fd..613e511f4 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php
@@ -30,7 +30,7 @@ class AdminUserMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
// all the entries below must have ROLE_ADMIN permissions
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php
index ab73932b5..96a2c8e38 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php
@@ -28,7 +28,7 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
*/
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator, protected ParameterBagInterface $parameterBag) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
$menu->addChild($this->translator->trans('Homepage'), [
'route' => 'chill_main_homepage',
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php
index 228e2c967..16d7e0298 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php
@@ -24,7 +24,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly NotificationByUserCounter $notificationByUserCounter, private readonly WorkflowByUserCounter $workflowByUserCounter, private readonly Security $security, private readonly TranslatorInterface $translator, protected ParameterBagInterface $parameterBag, private readonly RequestStack $requestStack) {}
- public function buildMenu($menuId, \Knp\Menu\MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, \Knp\Menu\MenuItem $menu, array $parameters): void
{
$user = $this->security->getUser();
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuComposer.php b/src/Bundle/ChillMainBundle/Routing/MenuComposer.php
index e16b10e8f..54d00d990 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuComposer.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuComposer.php
@@ -31,7 +31,7 @@ class MenuComposer
public function __construct(private readonly RouterInterface $router, private readonly FactoryInterface $menuFactory, private readonly TranslatorInterface $translator) {}
- public function addLocalMenuBuilder(LocalMenuBuilderInterface $menuBuilder, $menuId)
+ public function addLocalMenuBuilder(LocalMenuBuilderInterface $menuBuilder, $menuId): void
{
$this->localMenuBuilders[$menuId][] = $menuBuilder;
}
@@ -121,12 +121,12 @@ class MenuComposer
* available as a service (RouterInterface is provided as a service and
* added to this class as paramater in __construct).
*/
- public function setRouteCollection(RouteCollection $routeCollection)
+ public function setRouteCollection(RouteCollection $routeCollection): void
{
$this->routeCollection = $routeCollection;
}
- private function reorderMenu(ItemInterface $menu)
+ private function reorderMenu(ItemInterface $menu): void
{
$ordered = [];
$unordered = [];
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php
index 3b6ce7e02..bc74d0fc4 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php
@@ -46,7 +46,7 @@ class MenuTwig extends AbstractExtension
* @param string $menuId
* @param mixed[] $params
*/
- public function chillMenu(Environment $env, $menuId, array $params = [])
+ public function chillMenu(Environment $env, $menuId, array $params = []): string
{
$resolvedParams = array_merge($this->defaultParams, $params);
diff --git a/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php b/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php
index 12568287d..65b451ed6 100644
--- a/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php
+++ b/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php
@@ -19,7 +19,7 @@ class SearchUserApiProvider implements SearchApiInterface
{
public function __construct(private readonly UserRepository $userRepository) {}
- public function getResult(string $key, array $metadata, float $pertinence)
+ public function getResult(string $key, array $metadata, float $pertinence): ?\Chill\MainBundle\Entity\User
{
return $this->userRepository->find($metadata['id']);
}
diff --git a/src/Bundle/ChillMainBundle/Search/SearchProvider.php b/src/Bundle/ChillMainBundle/Search/SearchProvider.php
index fbf005430..7c74ea566 100644
--- a/src/Bundle/ChillMainBundle/Search/SearchProvider.php
+++ b/src/Bundle/ChillMainBundle/Search/SearchProvider.php
@@ -47,7 +47,7 @@ class SearchProvider
*/
private array $searchServices = [];
- public function addSearchService(SearchInterface $service, $name)
+ public function addSearchService(SearchInterface $service, $name): void
{
$this->searchServices[$name] = $service;
@@ -83,7 +83,7 @@ class SearchProvider
*
* @return SearchInterface[], with an int as array key
*/
- public function getByOrder()
+ public function getByOrder(): array
{
// sort the array
uasort($this->searchServices, static fn (SearchInterface $a, SearchInterface $b) => $a->getOrder() <=> $b->getOrder());
@@ -106,7 +106,7 @@ class SearchProvider
throw new UnknowSearchNameException($name);
}
- public function getHasAdvancedFormSearchServices()
+ public function getHasAdvancedFormSearchServices(): array
{
// sort the array
uasort($this->hasAdvancedFormSearchServices, static fn (HasAdvancedSearchFormInterface $a, HasAdvancedSearchFormInterface $b): int => $a->getOrder() <=> $b->getOrder());
@@ -214,7 +214,7 @@ class SearchProvider
*
* @return string
*/
- private function extractDefault($subject)
+ private function extractDefault($subject): string
{
return trim(str_replace($this->mustBeExtracted, '', $subject));
}
diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
index 52f1646c4..af72efad9 100644
--- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
+++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php
@@ -221,7 +221,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
*
* @return bool true if the child role is granted by parent role
*/
- private function isRoleReached(string $childRole, string $parentRole)
+ private function isRoleReached(string $childRole, string $parentRole): bool
{
return $this->parentRoleHelper->isRoleReached($childRole, $parentRole);
}
diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowStepSignatureVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowStepSignatureVoter.php
index ef2813e30..e0e90843c 100644
--- a/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowStepSignatureVoter.php
+++ b/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowStepSignatureVoter.php
@@ -24,13 +24,13 @@ final class EntityWorkflowStepSignatureVoter extends Voter
public const REJECT = 'CHILL_MAIN_ENTITY_WORKFLOW_SIGNATURE_REJECT';
- protected function supports(string $attribute, $subject)
+ protected function supports(string $attribute, $subject): bool
{
return $subject instanceof EntityWorkflowStepSignature
&& in_array($attribute, [self::SIGN, self::CANCEL, self::REJECT], true);
}
- protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token): bool
{
/** @var EntityWorkflowStepSignature $subject */
if ($subject->getSigner() instanceof Person) {
diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php
index 9f3ea6845..74146864c 100644
--- a/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php
+++ b/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php
@@ -36,7 +36,7 @@ class EntityWorkflowVoter extends Voter
private readonly Registry $registry,
) {}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
return $subject instanceof EntityWorkflow && \in_array($attribute, self::getRoles(), true);
}
diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/UserGroupVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/UserGroupVoter.php
index 7256c2567..84cb74e4c 100644
--- a/src/Bundle/ChillMainBundle/Security/Authorization/UserGroupVoter.php
+++ b/src/Bundle/ChillMainBundle/Security/Authorization/UserGroupVoter.php
@@ -23,12 +23,12 @@ final class UserGroupVoter extends Voter
public function __construct(private readonly Security $security) {}
- protected function supports(string $attribute, $subject)
+ protected function supports(string $attribute, $subject): bool
{
return self::APPEND_TO_GROUP === $attribute && $subject instanceof UserGroup;
}
- protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token): bool
{
/* @var UserGroup $subject */
if ($this->security->isGranted('ROLE_ADMIN')) {
diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/WorkflowEntityDeletionVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/WorkflowEntityDeletionVoter.php
index 3444a57a6..72ee949dd 100644
--- a/src/Bundle/ChillMainBundle/Security/Authorization/WorkflowEntityDeletionVoter.php
+++ b/src/Bundle/ChillMainBundle/Security/Authorization/WorkflowEntityDeletionVoter.php
@@ -23,7 +23,7 @@ class WorkflowEntityDeletionVoter extends Voter
*/
public function __construct(private $handlers, private readonly EntityWorkflowRepository $entityWorkflowRepository) {}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
if (!\is_object($subject)) {
return false;
@@ -39,7 +39,7 @@ class WorkflowEntityDeletionVoter extends Voter
return false;
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
{
foreach ($this->handlers as $handler) {
if ($handler->isObjectSupported($subject)) {
diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php
index 264b77056..180e6dbda 100644
--- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php
+++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php
@@ -40,7 +40,7 @@ class PasswordRecoverEvent extends \Symfony\Contracts\EventDispatcher\Event
/**
* @return string
*/
- public function getToken()
+ public function getToken(): ?string
{
return $this->token;
}
diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEventSubscriber.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEventSubscriber.php
index 2e4ec2848..3db6fd73e 100644
--- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEventSubscriber.php
+++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEventSubscriber.php
@@ -40,7 +40,7 @@ class PasswordRecoverEventSubscriber implements EventSubscriberInterface
];
}
- public function onAskTokenInvalidForm(PasswordRecoverEvent $event)
+ public function onAskTokenInvalidForm(PasswordRecoverEvent $event): void
{
// set global lock
$this->locker->createLock('ask_token_invalid_form_global', null);
@@ -51,12 +51,12 @@ class PasswordRecoverEventSubscriber implements EventSubscriberInterface
}
}
- public function onAskTokenSuccess(PasswordRecoverEvent $event)
+ public function onAskTokenSuccess(PasswordRecoverEvent $event): void
{
$this->locker->createLock('ask_token_success_by_user', $event->getUser());
}
- public function onInvalidToken(PasswordRecoverEvent $event)
+ public function onInvalidToken(PasswordRecoverEvent $event): void
{
// set global lock
$this->locker->createLock('invalid_token_global', null);
diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverLocker.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverLocker.php
index 30121bc38..eb8ea0010 100644
--- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverLocker.php
+++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverLocker.php
@@ -55,7 +55,7 @@ class PasswordRecoverLocker
$this->logger = $logger;
}
- public function createLock($usage, $discriminator = null)
+ public function createLock($usage, $discriminator = null): void
{
$max = $this->getMax($usage);
$ttl = $this->getTtl($usage);
diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php
index b325a9345..1fb83b2ba 100644
--- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php
+++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php
@@ -28,7 +28,7 @@ class RecoverPasswordHelper
*
* @return string
*/
- public function generateUrl(User $user, \DateTimeInterface $expiration, $absolute = true, array $parameters = [])
+ public function generateUrl(User $user, \DateTimeInterface $expiration, $absolute = true, array $parameters = []): string
{
return $this->urlGenerator->generate(
self::RECOVER_PASSWORD_ROUTE,
@@ -48,7 +48,7 @@ class RecoverPasswordHelper
$force = false,
array $additionalUrlParameters = [],
$emailSubject = 'Recover your password',
- ) {
+ ): void {
if (null === $user->getEmail() || '' === trim($user->getEmail())) {
throw new \UnexpectedValueException('No emaail associated to the user');
}
diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php b/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php
index 032c28a9b..0ac92c11a 100644
--- a/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php
+++ b/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php
@@ -29,7 +29,7 @@ final class ResolverTwigExtension extends \Twig\Extension\AbstractExtension
/**
* @return bool
*/
- public function isScopeConcerned($entity, ?array $options = [])
+ public function isScopeConcerned($entity, ?array $options = []): bool
{
return $this->scopeResolverDispatcher->isConcerned($entity, $options);
}
@@ -37,7 +37,7 @@ final class ResolverTwigExtension extends \Twig\Extension\AbstractExtension
/**
* @return Center|Center[]|null
*/
- public function resolveCenter(mixed $entity, ?array $options = [])
+ public function resolveCenter(mixed $entity, ?array $options = []): array
{
return $this->centerResolverDispatcher->resolveCenters($entity, $options);
}
diff --git a/src/Bundle/ChillMainBundle/Security/RoleProvider.php b/src/Bundle/ChillMainBundle/Security/RoleProvider.php
index ccaa92409..ab2004526 100644
--- a/src/Bundle/ChillMainBundle/Security/RoleProvider.php
+++ b/src/Bundle/ChillMainBundle/Security/RoleProvider.php
@@ -73,7 +73,7 @@ class RoleProvider
/**
* initialize the array for caching role and titles.
*/
- private function initializeRolesTitlesCache()
+ private function initializeRolesTitlesCache(): void
{
// break if already initialized
if (null !== $this->rolesTitlesCache) {
diff --git a/src/Bundle/ChillMainBundle/Security/UserProvider/UserProvider.php b/src/Bundle/ChillMainBundle/Security/UserProvider/UserProvider.php
index a561fe0bc..9ddcc41df 100644
--- a/src/Bundle/ChillMainBundle/Security/UserProvider/UserProvider.php
+++ b/src/Bundle/ChillMainBundle/Security/UserProvider/UserProvider.php
@@ -22,7 +22,7 @@ class UserProvider implements UserProviderInterface
{
public function __construct(protected EntityManagerInterface $em) {}
- public function loadUserByUsername($username): UserInterface
+ public function loadUserByIdentifier($username): UserInterface
{
try {
$user = $this->em->createQuery(sprintf(
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php
index bbae6bd40..f4255f5f0 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php
@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
-class AddressNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class AddressNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
@@ -53,7 +53,7 @@ class AddressNormalizer implements ContextAwareNormalizerInterface, NormalizerAw
* @param Address $address
* @param string|null $format
*/
- public function normalize($address, $format = null, array $context = [])
+ public function normalize($address, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
if ($address instanceof Address) {
$data = [
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php
index 7c41bcb8a..046f9a97e 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php
@@ -22,7 +22,7 @@ class CenterNormalizer implements DenormalizerInterface, NormalizerInterface
{
public function __construct(private readonly CenterRepository $repository) {}
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
if (null === $data) {
return null;
@@ -49,7 +49,7 @@ class CenterNormalizer implements DenormalizerInterface, NormalizerInterface
return $center;
}
- public function normalize($center, $format = null, array $context = [])
+ public function normalize($center, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
/* @var Center $center */
return [
@@ -60,12 +60,12 @@ class CenterNormalizer implements DenormalizerInterface, NormalizerInterface
];
}
- public function supportsDenormalization($data, $type, $format = null)
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return Center::class === $type;
}
- public function supportsNormalization($data, $format = null): bool
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
return $data instanceof Center && 'json' === $format;
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php
index 117e18704..bf84abf69 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CollectionNormalizer.php
@@ -24,7 +24,7 @@ class CollectionNormalizer implements NormalizerAwareInterface, NormalizerInterf
* @param Collection $collection
* @param string|null $format
*/
- public function normalize($collection, $format = null, array $context = [])
+ public function normalize($collection, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
$paginator = $collection->getPaginator();
@@ -41,7 +41,7 @@ class CollectionNormalizer implements NormalizerAwareInterface, NormalizerInterf
];
}
- public function supportsNormalization($data, $format = null): bool
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
return $data instanceof Collection;
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php
index 59f0302f0..b3b7f5d38 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php
@@ -19,7 +19,7 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
-class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class CommentEmbeddableDocGenNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php
index 2493b1794..d826d47c6 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php
@@ -18,11 +18,11 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException;
use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
-class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInterface
+class DateNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, DenormalizerInterface
{
public function __construct(private readonly RequestStack $requestStack, private readonly ParameterBagInterface $parameterBag) {}
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
if (null === $data) {
return null;
@@ -51,7 +51,7 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
return $result;
}
- public function normalize($date, $format = null, array $context = [])
+ public function normalize($date, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
/* @var DateTimeInterface $date */
switch ($format) {
@@ -93,7 +93,7 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt
throw new UnexpectedValueException("format not supported: {$format}");
}
- public function supportsDenormalization($data, $type, $format = null): bool
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return \DateTimeInterface::class === $type
|| \DateTime::class === $type
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php
index 12b7a908f..3f413e442 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DiscriminatedObjectDenormalizer.php
@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
/**
* Denormalize an object given a list of supported class.
*/
-class DiscriminatedObjectDenormalizer implements ContextAwareDenormalizerInterface, DenormalizerAwareInterface
+class DiscriminatedObjectDenormalizer implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface, DenormalizerAwareInterface
{
use DenormalizerAwareTrait;
@@ -35,7 +35,7 @@ class DiscriminatedObjectDenormalizer implements ContextAwareDenormalizerInterfa
*/
final public const TYPE = '@multi';
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
foreach ($context[self::ALLOWED_TYPES] as $localType) {
if ($this->denormalizer->supportsDenormalization($data, $localType, $format)) {
@@ -50,7 +50,7 @@ class DiscriminatedObjectDenormalizer implements ContextAwareDenormalizerInterfa
throw new RuntimeException(sprintf('Could not find any denormalizer for those ALLOWED_TYPES: %s', \implode(', ', $context[self::ALLOWED_TYPES])), previous: $lastException ?? null);
}
- public function supportsDenormalization($data, $type, $format = null, array $context = [])
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
if (self::TYPE !== $type) {
return false;
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php
index ed34a45be..edfef0ee6 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php
@@ -21,7 +21,7 @@ class DoctrineExistingEntityNormalizer implements DenormalizerInterface
{
public function __construct(private readonly EntityManagerInterface $em, private readonly ClassMetadataFactoryInterface $serializerMetadataFactory) {}
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
if (\array_key_exists(AbstractNormalizer::OBJECT_TO_POPULATE, $context)) {
return $context[AbstractNormalizer::OBJECT_TO_POPULATE];
@@ -31,7 +31,7 @@ class DoctrineExistingEntityNormalizer implements DenormalizerInterface
->find($data['id']);
}
- public function supportsDenormalization($data, $type, $format = null)
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
if (false === \is_array($data)) {
return false;
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowAttachmentNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowAttachmentNormalizer.php
index 38b9f19ec..d893ba149 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowAttachmentNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowAttachmentNormalizer.php
@@ -47,8 +47,19 @@ class EntityWorkflowAttachmentNormalizer implements NormalizerInterface, Normali
];
}
- public function supportsNormalization($data, ?string $format = null)
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return 'json' === $format && $data instanceof EntityWorkflowAttachment;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ if ('json' !== $format) {
+ return [];
+ }
+
+ return [
+ EntityWorkflowAttachment::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php
index a84220099..af8687084 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php
@@ -30,7 +30,7 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn
*
* @return array
*/
- public function normalize($object, ?string $format = null, array $context = [])
+ public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
$workflow = $this->registry->get($object, $object->getWorkflowName());
$handler = $this->entityWorkflowManager->getHandler($object);
@@ -49,8 +49,19 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn
];
}
- public function supportsNormalization($data, ?string $format = null): bool
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof EntityWorkflow && 'json' === $format;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ if ('json' !== $format) {
+ return [];
+ }
+
+ return [
+ EntityWorkflow::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php
index 0f640f38b..4c7319c6a 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php
@@ -75,7 +75,7 @@ class EntityWorkflowStepNormalizer implements NormalizerAwareInterface, Normaliz
return $data;
}
- public function supportsNormalization($data, ?string $format = null): bool
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof EntityWorkflowStep && 'json' === $format;
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/GenderDocGenNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/GenderDocGenNormalizer.php
index fee232ddc..62dbc73f8 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/GenderDocGenNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/GenderDocGenNormalizer.php
@@ -17,18 +17,18 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
-class GenderDocGenNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class GenderDocGenNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
- public function supportsNormalization($data, ?string $format = null, array $context = [])
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof Gender;
}
- public function normalize($gender, ?string $format = null, array $context = [])
+ public function normalize($gender, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
return [
'id' => $gender->getId(),
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php
index 2f6d57db1..b726504a2 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php
@@ -30,7 +30,7 @@ class NotificationNormalizer implements NormalizerAwareInterface, NormalizerInte
*
* @return array|\ArrayObject|bool|float|int|string|void|null
*/
- public function normalize($object, ?string $format = null, array $context = [])
+ public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
$entity = $this->entityManager
->getRepository($object->getRelatedEntityClass())
@@ -51,7 +51,7 @@ class NotificationNormalizer implements NormalizerAwareInterface, NormalizerInte
];
}
- public function supportsNormalization($data, ?string $format = null)
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof Notification && 'json' === $format;
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php
index 28d7c623d..fb855d431 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php
@@ -19,7 +19,7 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException;
use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
-class PhonenumberNormalizer implements ContextAwareNormalizerInterface, DenormalizerInterface
+class PhonenumberNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, DenormalizerInterface
{
private readonly string $defaultCarrierCode;
@@ -37,7 +37,7 @@ class PhonenumberNormalizer implements ContextAwareNormalizerInterface, Denormal
*
* @throws UnexpectedValueException
*/
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
if ('' === trim((string) $data)) {
return null;
@@ -59,7 +59,7 @@ class PhonenumberNormalizer implements ContextAwareNormalizerInterface, Denormal
return $this->phoneNumberUtil->formatOutOfCountryCallingNumber($object, $this->defaultCarrierCode);
}
- public function supportsDenormalization($data, $type, $format = null)
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return 'libphonenumber\PhoneNumber' === $type;
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php
index 4084bce44..3b1ed326c 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PointNormalizer.php
@@ -17,7 +17,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
class PointNormalizer implements DenormalizerInterface
{
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
if (!\is_array($data)) {
throw new InvalidArgumentException('point data is not an array. It should be an array of 2 coordinates.');
@@ -30,7 +30,7 @@ class PointNormalizer implements DenormalizerInterface
return Point::fromLonLat($data[0], $data[1]);
}
- public function supportsDenormalization($data, $type, $format = null): bool
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return Point::class === $type;
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php
index 515e831c0..4dbcb2466 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php
@@ -38,13 +38,20 @@ class PrivateCommentEmbeddableNormalizer implements NormalizerInterface, Denorma
return $object->getCommentForUser($this->security->getUser());
}
- public function supportsDenormalization($data, string $type, ?string $format = null): bool
+ public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool
{
return PrivateCommentEmbeddable::class === $type;
}
- public function supportsNormalization($data, ?string $format = null): bool
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof PrivateCommentEmbeddable;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ return [
+ PrivateCommentEmbeddable::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserGroupDenormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserGroupDenormalizer.php
index 0960ea218..81b85ce7b 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserGroupDenormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserGroupDenormalizer.php
@@ -24,7 +24,7 @@ class UserGroupDenormalizer implements DenormalizerInterface
return $this->userGroupRepository->find($data['id']);
}
- public function supportsDenormalization($data, string $type, ?string $format = null): bool
+ public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool
{
return UserGroup::class === $type
&& 'json' === $format
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserGroupNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserGroupNormalizer.php
index 8738167eb..2a6a4fefe 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserGroupNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserGroupNormalizer.php
@@ -19,7 +19,7 @@ class UserGroupNormalizer implements NormalizerInterface
{
public function __construct(private readonly UserGroupRenderInterface $userGroupRender) {}
- public function normalize($object, ?string $format = null, array $context = [])
+ public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
/* @var UserGroup $object */
@@ -34,8 +34,15 @@ class UserGroupNormalizer implements NormalizerInterface
];
}
- public function supportsNormalization($data, ?string $format = null)
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof UserGroup;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ return [
+ UserGroup::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php
index c05468f6d..e089c7b7f 100644
--- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php
+++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php
@@ -24,7 +24,7 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
-class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class UserNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
@@ -48,7 +48,7 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
*
* @throws \Symfony\Component\Serializer\Exception\ExceptionInterface
*/
- public function normalize($object, $format = null, array $context = [])
+ public function normalize($object, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
/** @var array{"chill:user:at_date"?: \DateTimeImmutable|\DateTime} $context */
/** @var User $object */
diff --git a/src/Bundle/ChillMainBundle/Service/Notifier/SentMessageEventSubscriber.php b/src/Bundle/ChillMainBundle/Service/Notifier/SentMessageEventSubscriber.php
index 2d003d775..dc9d3d475 100644
--- a/src/Bundle/ChillMainBundle/Service/Notifier/SentMessageEventSubscriber.php
+++ b/src/Bundle/ChillMainBundle/Service/Notifier/SentMessageEventSubscriber.php
@@ -21,7 +21,7 @@ final readonly class SentMessageEventSubscriber implements EventSubscriberInterf
private LoggerInterface $logger,
) {}
- public static function getSubscribedEvents()
+ public static function getSubscribedEvents(): array
{
return [
SentMessageEvent::class => ['onSentMessage', 0],
diff --git a/src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php b/src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php
index a3968231e..ff5c04ed3 100644
--- a/src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php
+++ b/src/Bundle/ChillMainBundle/Templating/CSVCellTwig.php
@@ -29,7 +29,7 @@ class CSVCellTwig extends AbstractExtension
*
* @return string the safe string
*/
- public function csvCellFilter($content)
+ public function csvCellFilter($content): string|array
{
return str_replace('"', '""', $content);
}
diff --git a/src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php b/src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php
index ac0def71b..d5112482a 100644
--- a/src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php
+++ b/src/Bundle/ChillMainBundle/Templating/ChillTwigHelper.php
@@ -56,7 +56,7 @@ class ChillTwigHelper extends AbstractExtension
$message = 'No value',
$template = 'default',
array $options = [],
- ) {
+ ): string {
if ($value instanceof \DateTimeInterface) {
$options = \array_merge([
'date_format' => 'medium',
diff --git a/src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php b/src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php
index 9e06eaee8..9c1ad3a30 100644
--- a/src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php
+++ b/src/Bundle/ChillMainBundle/Templating/ChillTwigRoutingHelper.php
@@ -99,7 +99,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
*
* @return string
*/
- public function getPathAddReturnPath($name, $parameters = [], $relative = false, $label = null)
+ public function getPathAddReturnPath($name, $parameters = [], $relative = false, $label = null): string
{
$request = $this->requestStack->getCurrentRequest();
@@ -121,7 +121,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
*
* @return string
*/
- public function getPathForwardReturnPath($name, $parameters = [], $relative = false)
+ public function getPathForwardReturnPath($name, $parameters = [], $relative = false): string
{
$request = $this->requestStack->getCurrentRequest();
@@ -146,7 +146,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
*
* @return string
*/
- public function getReturnPathOr($name, $parameters = [], $relative = false)
+ public function getReturnPathOr($name, $parameters = [], $relative = false): string|int|float|bool|null
{
$request = $this->requestStack->getCurrentRequest();
@@ -157,7 +157,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
return $this->originalExtension->getPath($name, $parameters, $relative);
}
- public function isUrlGenerationSafe(Node $argsNode)
+ public function isUrlGenerationSafe(Node $argsNode): array
{
return $this->originalExtension->isUrlGenerationSafe($argsNode);
}
diff --git a/src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php b/src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php
index afdb32349..baf9d18ae 100644
--- a/src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php
+++ b/src/Bundle/ChillMainBundle/Templating/Events/DelegatedBlockRenderingEvent.php
@@ -53,7 +53,7 @@ class DelegatedBlockRenderingEvent extends \Symfony\Contracts\EventDispatcher\Ev
*
* @param string $text
*/
- public function addContent($text)
+ public function addContent($text): void
{
$this->content .= $text;
}
diff --git a/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php b/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php
index eceae8d9c..c6bbc11ea 100644
--- a/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php
+++ b/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php
@@ -50,7 +50,7 @@ class TranslatableStringTwig extends AbstractExtension
return 'chill_main_localize';
}
- public function localize(array $translatableStrings)
+ public function localize(array $translatableStrings): ?string
{
return $this->helper
->localize($translatableStrings);
diff --git a/src/Bundle/ChillMainBundle/Templating/UI/CountNotificationUser.php b/src/Bundle/ChillMainBundle/Templating/UI/CountNotificationUser.php
index 385c952bd..1a59b51c2 100644
--- a/src/Bundle/ChillMainBundle/Templating/UI/CountNotificationUser.php
+++ b/src/Bundle/ChillMainBundle/Templating/UI/CountNotificationUser.php
@@ -24,7 +24,7 @@ class CountNotificationUser
*/
protected $counters = [];
- public function addNotificationCounter(NotificationCounterInterface $counter)
+ public function addNotificationCounter(NotificationCounterInterface $counter): void
{
$this->counters[] = $counter;
}
diff --git a/src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php b/src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php
index 7245c62fb..0efca359b 100644
--- a/src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php
+++ b/src/Bundle/ChillMainBundle/Templating/Widget/WidgetRenderingTwig.php
@@ -78,7 +78,7 @@ class WidgetRenderingTwig extends AbstractExtension
* @param string $place
* @param WidgetInterface $widget
*/
- public function addWidget($place, mixed $ordering, $widget, array $config = [])
+ public function addWidget($place, mixed $ordering, $widget, array $config = []): void
{
$this->widget[$place][$ordering] = [$widget, $config];
}
diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php
index 12182b96b..dde954594 100644
--- a/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php
+++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractAggregatorTest.php
@@ -172,7 +172,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
*
* @return void
*/
- public function testAliasDidNotDisappears(QueryBuilder $qb, array $data)
+ public function testAliasDidNotDisappears(QueryBuilder $qb, array $data): void
{
$aliases = $qb->getAllAliases();
@@ -208,7 +208,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
*
* @param type $data
*/
- public function testAlterQuery(QueryBuilder $query, $data)
+ public function testAlterQuery(QueryBuilder $query, $data): void
{
// retains informations about query
$nbOfFrom = null !== $query->getDQLPart('from') ?
@@ -242,7 +242,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
/**
* Test the `applyOn` method.
*/
- public function testApplyOn()
+ public function testApplyOn(): void
{
$filter = $this->getAggregator();
@@ -261,7 +261,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
*
* @dataProvider dataProviderGetQueryKeys
*/
- public function testGetQueryKeys(array $data)
+ public function testGetQueryKeys(array $data): void
{
$queryKeys = $this->getAggregator()->getQueryKeys($data);
@@ -293,7 +293,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
*
* @dataProvider dataProviderGetResultsAndLabels
*/
- public function testGetResultsAndLabels(QueryBuilder $qb, array $data)
+ public function testGetResultsAndLabels(QueryBuilder $qb, array $data): void
{
// it is more convenient to group the `getResult` and `getLabels` test
// due to the fact that testing both methods use the same tools.
@@ -349,7 +349,7 @@ abstract class AbstractAggregatorTest extends KernelTestCase
/**
* test the `getTitle` method.
*/
- public function testGetTitle()
+ public function testGetTitle(): void
{
$title = $this->getAggregator()->getTitle();
diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php
index 51403f51c..30e7bf3b6 100644
--- a/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php
+++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractExportTest.php
@@ -142,7 +142,7 @@ abstract class AbstractExportTest extends WebTestCase
/**
* Test the formatters type are string.
*/
- public function testGetAllowedFormattersType()
+ public function testGetAllowedFormattersType(): void
{
foreach ($this->getExports() as $export) {
$formattersTypes = $export->getAllowedFormattersTypes();
@@ -159,7 +159,7 @@ abstract class AbstractExportTest extends WebTestCase
/**
* Test that the description is not empty.
*/
- public function testGetDescription()
+ public function testGetDescription(): void
{
foreach ($this->getExports() as $export) {
$this->assertIsString(
@@ -179,7 +179,7 @@ abstract class AbstractExportTest extends WebTestCase
*
* @dataProvider dataProviderGetQueryKeys
*/
- public function testGetQueryKeys(array $data)
+ public function testGetQueryKeys(array $data): void
{
foreach ($this->getExports() as $export) {
$queryKeys = $export->getQueryKeys($data);
@@ -212,7 +212,7 @@ abstract class AbstractExportTest extends WebTestCase
*
* @dataProvider dataProviderInitiateQuery
*/
- public function testGetResultsAndLabels($modifiers, $acl, array $data)
+ public function testGetResultsAndLabels($modifiers, $acl, array $data): void
{
foreach ($this->getExports() as $export) {
// it is more convenient to group the `getResult` and `getLabels` test
@@ -284,7 +284,7 @@ abstract class AbstractExportTest extends WebTestCase
/**
* Test that the getType method return a string.
*/
- public function testGetType()
+ public function testGetType(): void
{
foreach ($this->getExports() as $export) {
$this->assertIsString(
@@ -306,7 +306,7 @@ abstract class AbstractExportTest extends WebTestCase
*
* @dataProvider dataProviderInitiateQuery
*/
- public function testInitiateQuery(mixed $modifiers, mixed $acl, mixed $data)
+ public function testInitiateQuery(mixed $modifiers, mixed $acl, mixed $data): void
{
foreach ($this->getExports() as $export) {
$query = $export->initiateQuery($modifiers, $acl, $data);
@@ -344,7 +344,7 @@ abstract class AbstractExportTest extends WebTestCase
/**
* Test required role is an instance of Role.
*/
- public function testRequiredRole()
+ public function testRequiredRole(): void
{
foreach ($this->getExports() as $export) {
$role = $export->requiredRole();
@@ -361,7 +361,7 @@ abstract class AbstractExportTest extends WebTestCase
*
* @dataProvider dataProviderInitiateQuery
*/
- public function testSupportsModifier(mixed $modifiers, mixed $acl, mixed $data)
+ public function testSupportsModifier(mixed $modifiers, mixed $acl, mixed $data): void
{
foreach ($this->getExports() as $export) {
$query = $export->initiateQuery($modifiers, $acl, $data);
diff --git a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php
index 5c38515fc..6c0a3675a 100644
--- a/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php
+++ b/src/Bundle/ChillMainBundle/Test/Export/AbstractFilterTest.php
@@ -156,7 +156,7 @@ abstract class AbstractFilterTest extends KernelTestCase
*
* @group dbIntensive
*/
- public function testAlterQuery(QueryBuilder $query, array $data)
+ public function testAlterQuery(QueryBuilder $query, array $data): void
{
// retains informations about query
$nbOfFrom = null !== $query->getDQLPart('from') ?
@@ -199,7 +199,7 @@ abstract class AbstractFilterTest extends KernelTestCase
self::assertIsArray($actual);
}
- public function testApplyOn()
+ public function testApplyOn(): void
{
$filter = $this->getFilter();
@@ -211,7 +211,7 @@ abstract class AbstractFilterTest extends KernelTestCase
*
* @param array $data
*/
- public function testDescriptionAction($data)
+ public function testDescriptionAction($data): void
{
$description = $this->getFilter()->describeAction($data);
@@ -263,7 +263,7 @@ abstract class AbstractFilterTest extends KernelTestCase
}
}
- public function testGetTitle()
+ public function testGetTitle(): void
{
$title = $this->getFilter()->getTitle();
diff --git a/src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php b/src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php
index fedc46fa1..2432bb5e3 100644
--- a/src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php
+++ b/src/Bundle/ChillMainBundle/Test/PrepareUserTrait.php
@@ -50,7 +50,7 @@ trait PrepareUserTrait
*
* @throws \LogicException if the trait is not set up
*/
- protected static function prepareUser(array $permissions)
+ protected static function prepareUser(array $permissions): \Chill\MainBundle\Entity\User
{
$user = new User();
diff --git a/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php
index a9aaaa130..70bb9c251 100644
--- a/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Authorization/ParentRoleHelperTest.php
@@ -30,7 +30,7 @@ final class ParentRoleHelperTest extends KernelTestCase
$this->parentRoleHelper = self::getContainer()->get(ParentRoleHelper::class);
}
- public function testGetReachableRoles()
+ public function testGetReachableRoles(): void
{
// this test will be valid until the role hierarchy for person is changed.
// this is not perfect but spare us a mock
@@ -43,7 +43,7 @@ final class ParentRoleHelperTest extends KernelTestCase
$this->assertContains(PersonVoter::SEE, $parentRoles);
}
- public function testIsRoleReached()
+ public function testIsRoleReached(): void
{
$this->assertTrue($this->parentRoleHelper->isRoleReached(PersonVoter::SEE, PersonVoter::CREATE));
$this->assertFalse($this->parentRoleHelper->isRoleReached(PersonVoter::SEE, 'foo'));
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php
index 4a65c434c..177799f21 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/AddressControllerTest.php
@@ -53,7 +53,7 @@ final class AddressControllerTest extends \Symfony\Bundle\FrameworkBundle\Test\W
/**
* @dataProvider generateAddressIds
*/
- public function testDuplicate(int $addressId)
+ public function testDuplicate(int $addressId): void
{
$this->client = $this->getClientAuthenticated();
$this->client->request('POST', "/api/1.0/main/address/{$addressId}/duplicate.json");
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/AddressReferenceApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/AddressReferenceApiControllerTest.php
index 335f6f29b..92f199abf 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/AddressReferenceApiControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/AddressReferenceApiControllerTest.php
@@ -46,7 +46,7 @@ final class AddressReferenceApiControllerTest extends WebTestCase
/**
* @dataProvider provideData
*/
- public function testSearch(int $postCodeId, string $pattern)
+ public function testSearch(int $postCodeId, string $pattern): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/ExportControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/ExportControllerTest.php
index 6c7ade9bb..5a17e72bc 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/ExportControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/ExportControllerTest.php
@@ -25,7 +25,7 @@ final class ExportControllerTest extends WebTestCase
{
use PrepareClientTrait;
- public function testIndex()
+ public function testIndex(): void
{
$client = $this->getClientAuthenticatedAsAdmin();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php
index b6e0bcebf..d14c61eca 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/LoginControllerTest.php
@@ -21,7 +21,7 @@ use Symfony\Component\HttpFoundation\Response;
*/
final class LoginControllerTest extends WebTestCase
{
- public function testLogin()
+ public function testLogin(): void
{
$client = self::createClient();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemApiControllerTest.php
index f8f7aafea..f13c2631c 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemApiControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemApiControllerTest.php
@@ -23,7 +23,7 @@ class NewsItemApiControllerTest extends WebTestCase
{
use PrepareClientTrait;
- public function testListCurrentNewsItems()
+ public function testListCurrentNewsItems(): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemControllerTest.php
index 3881188e9..62c94b04e 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemControllerTest.php
@@ -75,7 +75,7 @@ class NewsItemControllerTest extends WebTestCase
yield [$newsItem];
}
- public function testList()
+ public function testList(): void
{
$client = $this->getClientAuthenticated('admin', 'password');
$client->request('GET', '/fr/admin/news_item');
@@ -86,7 +86,7 @@ class NewsItemControllerTest extends WebTestCase
/**
* @dataProvider generateNewsItemIds
*/
- public function testShowSingleItem(NewsItem $newsItem)
+ public function testShowSingleItem(NewsItem $newsItem): void
{
$client = $this->getClientAuthenticated('admin', 'password');
$client->request('GET', "/fr/admin/news_item/{$newsItem->getId()}/view");
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemsHistoryControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemsHistoryControllerTest.php
index d36fca40c..a64666eda 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemsHistoryControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/NewsItemsHistoryControllerTest.php
@@ -72,7 +72,7 @@ class NewsItemsHistoryControllerTest extends WebTestCase
yield [$news->getId()];
}
- public function testList()
+ public function testList(): void
{
self::ensureKernelShutdown();
$client = $this->getClientAuthenticated();
@@ -85,7 +85,7 @@ class NewsItemsHistoryControllerTest extends WebTestCase
/**
* @dataProvider generateNewsItemIds
*/
- public function testShowSingleItem(int $newsItemId)
+ public function testShowSingleItem(int $newsItemId): void
{
self::ensureKernelShutdown();
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/NotificationApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/NotificationApiControllerTest.php
index 1c19a1466..883df8107 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/NotificationApiControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/NotificationApiControllerTest.php
@@ -74,7 +74,7 @@ final class NotificationApiControllerTest extends WebTestCase
/**
* @dataProvider generateDataMarkAsRead
*/
- public function testMarkAsReadOrUnRead(int $notificationId)
+ public function testMarkAsReadOrUnRead(int $notificationId): void
{
$client = $this->getClientAuthenticated();
$client->request('POST', "/api/1.0/main/notification/{$notificationId}/mark/read");
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/PermissionApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/PermissionApiControllerTest.php
index a99871119..5a9511f04 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/PermissionApiControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/PermissionApiControllerTest.php
@@ -28,7 +28,7 @@ final class PermissionApiControllerTest extends WebTestCase
self::ensureKernelShutdown();
}
- public function testDenormalizingObject()
+ public function testDenormalizingObject(): void
{
// for a unknown reason, the kernel may be booted before running this test...
self::ensureKernelShutdown();
@@ -55,7 +55,7 @@ final class PermissionApiControllerTest extends WebTestCase
$this->assertFalse($data['roles']['FOO_ROLE']);
}
- public function testNullObject()
+ public function testNullObject(): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/PostalCodeApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/PostalCodeApiControllerTest.php
index 1cb8687f8..5dabf4bc1 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/PostalCodeApiControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/PostalCodeApiControllerTest.php
@@ -23,7 +23,7 @@ final class PostalCodeApiControllerTest extends WebTestCase
{
use PrepareClientTrait;
- public function testSearch()
+ public function testSearch(): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/ScopeControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/ScopeControllerTest.php
index b88b0a852..00d1281e1 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/ScopeControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/ScopeControllerTest.php
@@ -23,7 +23,7 @@ final class ScopeControllerTest extends WebTestCase
{
use PrepareClientTrait;
- public function testCompleteScenario()
+ public function testCompleteScenario(): void
{
// Create a new client to browse the application
$client = $this->getClientAuthenticatedAsAdmin();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/SearchApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/SearchApiControllerTest.php
index 4f265658b..713082db7 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/SearchApiControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/SearchApiControllerTest.php
@@ -38,7 +38,7 @@ final class SearchApiControllerTest extends WebTestCase
/**
* @dataProvider generateSearchData
*/
- public function testSearch(string $pattern, array $types)
+ public function testSearch(string $pattern, array $types): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/SearchControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/SearchControllerTest.php
index 949bff407..dcd23493f 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/SearchControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/SearchControllerTest.php
@@ -25,7 +25,7 @@ final class SearchControllerTest extends WebTestCase
{
use PrepareClientTrait;
- public function testDomainUnknow()
+ public function testDomainUnknow(): void
{
$client = $this->getClientAuthenticated();
@@ -42,7 +42,7 @@ final class SearchControllerTest extends WebTestCase
);
}
- public function testParsingIncorrect()
+ public function testParsingIncorrect(): void
{
$client = $this->getClientAuthenticated();
@@ -60,7 +60,7 @@ final class SearchControllerTest extends WebTestCase
* Test the behaviour when no domain is provided in the search pattern :
* the default search should be enabled.
*/
- public function testSearchPath()
+ public function testSearchPath(): void
{
$client = $this->getClientAuthenticated();
@@ -72,7 +72,7 @@ final class SearchControllerTest extends WebTestCase
);
}
- public function testSearchPathEmpty()
+ public function testSearchPathEmpty(): void
{
$client = $this->getClientAuthenticated();
@@ -81,7 +81,7 @@ final class SearchControllerTest extends WebTestCase
$this->assertGreaterThan(0, $crawler->filter('*:contains("Merci de fournir des termes de recherche.")')->count());
}
- public function testUnknowName()
+ public function testUnknowName(): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/UserApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/UserApiControllerTest.php
index 4b08884ca..9b1721286 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/UserApiControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/UserApiControllerTest.php
@@ -27,7 +27,7 @@ final class UserApiControllerTest extends WebTestCase
/**
* @depends testIndex
*/
- public function testEntity(mixed $existingUser)
+ public function testEntity(mixed $existingUser): void
{
$client = $this->getClientAuthenticated();
@@ -52,7 +52,7 @@ final class UserApiControllerTest extends WebTestCase
return $data['results'][0];
}
- public function testUserCurrentLocation()
+ public function testUserCurrentLocation(): void
{
$client = $this->getClientAuthenticated();
@@ -61,7 +61,7 @@ final class UserApiControllerTest extends WebTestCase
$this->assertResponseIsSuccessful();
}
- public function testWhoami()
+ public function testWhoami(): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php
index 483211020..0ac67ea30 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/UserControllerTest.php
@@ -46,7 +46,7 @@ final class UserControllerTest extends WebTestCase
yield [$user->getId(), $user->getUsername()];
}
- public function testList()
+ public function testList(): void
{
$client = $this->getClientAuthenticatedAsAdmin();
@@ -55,7 +55,7 @@ final class UserControllerTest extends WebTestCase
self::assertResponseIsSuccessful();
}
- public function testNew()
+ public function testNew(): void
{
$client = $this->getClientAuthenticated('admin');
@@ -93,7 +93,7 @@ final class UserControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateUserId
*/
- public function testUpdate(int $userId, string $username)
+ public function testUpdate(int $userId, string $username): void
{
$client = $this->getClientAuthenticatedAsAdmin();
$crawler = $client->request('GET', "/fr/admin/main/user/{$userId}/edit");
@@ -114,7 +114,7 @@ final class UserControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateUserId
*/
- public function testUpdatePassword(int $userId, mixed $username)
+ public function testUpdatePassword(int $userId, mixed $username): void
{
$client = $this->getClientAuthenticatedAsAdmin();
$crawler = $client->request('GET', "/fr/admin/user/{$userId}/edit_password");
@@ -135,7 +135,7 @@ final class UserControllerTest extends WebTestCase
$this->isPasswordValid($username, $newPassword);
}
- protected function isPasswordValid($username, $password)
+ protected function isPasswordValid($username, $password): void
{
/** @var \Symfony\Component\PasswordHasher\Hasher\UserPasswordHasher $passwordEncoder */
$passwordEncoder = self::getContainer()
diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/UserProfileControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/UserProfileControllerTest.php
index fd7fd6028..df4f9158d 100644
--- a/src/Bundle/ChillMainBundle/Tests/Controller/UserProfileControllerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Controller/UserProfileControllerTest.php
@@ -23,7 +23,7 @@ final class UserProfileControllerTest extends WebTestCase
{
use PrepareClientTrait;
- public function testPage()
+ public function testPage(): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php
index 548017c90..14cb595b3 100644
--- a/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php
@@ -32,7 +32,7 @@ final class CronManagerTest extends TestCase
{
use ProphecyTrait;
- public function testScheduleMostOldExecutedJob()
+ public function testScheduleMostOldExecutedJob(): void
{
$jobOld1 = new JobCanRun('k');
$jobOld2 = new JobCanRun('l');
diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/AgeTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/AgeTest.php
index cdb24b4b7..02559e256 100644
--- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/AgeTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/AgeTest.php
@@ -64,7 +64,7 @@ final class AgeTest extends KernelTestCase
/**
* @dataProvider generateQueries
*/
- public function testWorking(string $dql, array $args)
+ public function testWorking(string $dql, array $args): void
{
$dql = $this->entityManager->createQuery($dql)->setMaxResults(3);
diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/GreatestTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/GreatestTest.php
index 2cf679be7..a478bda43 100644
--- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/GreatestTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/GreatestTest.php
@@ -32,7 +32,7 @@ final class GreatestTest extends KernelTestCase
$this->entityManager = self::getContainer()->get(EntityManagerInterface::class);
}
- public function testGreatestInDQL()
+ public function testGreatestInDQL(): void
{
$dql = 'SELECT GREATEST(a.validFrom, a.validTo, :now) AS g FROM '.Address::class.' a WHERE a.validTo < :now and a.validFrom < :now';
diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonExtractTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonExtractTest.php
index dec63a64c..e491263c5 100644
--- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonExtractTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonExtractTest.php
@@ -41,7 +41,7 @@ final class JsonExtractTest extends KernelTestCase
/**
* @dataProvider dataGenerateDql
*/
- public function testJsonExtract(string $dql, array $args)
+ public function testJsonExtract(string $dql, array $args): void
{
$results = $this->em->createQuery($dql)
->setMaxResults(2)
diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php
index d61f1af0e..f93d6fa8e 100644
--- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/JsonbExistsInArrayTest.php
@@ -30,7 +30,7 @@ final class JsonbExistsInArrayTest extends KernelTestCase
$this->em = self::getContainer()->get(EntityManagerInterface::class);
}
- public function testDQLFunctionWorks()
+ public function testDQLFunctionWorks(): void
{
$result = $this->em
->createQuery('SELECT JSONB_EXISTS_IN_ARRAY(u.attributes, :param) FROM '.User::class.' u')
diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/LeastTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/LeastTest.php
index d7a3dffba..336259556 100644
--- a/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/LeastTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/DQL/LeastTest.php
@@ -32,7 +32,7 @@ final class LeastTest extends KernelTestCase
$this->entityManager = self::getContainer()->get(EntityManagerInterface::class);
}
- public function testGreatestInDQL()
+ public function testGreatestInDQL(): void
{
$dql = 'SELECT LEAST(a.validFrom, a.validTo, :now) AS g FROM '.Address::class.' a WHERE a.validTo < :now and a.validFrom < :now';
diff --git a/src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php b/src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php
index f4a9451c2..65658a368 100644
--- a/src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Doctrine/Model/PointTest.php
@@ -23,7 +23,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
*/
final class PointTest extends KernelTestCase
{
- public function testFromArrayGeoJson()
+ public function testFromArrayGeoJson(): void
{
$array = [
'type' => 'Point',
@@ -36,7 +36,7 @@ final class PointTest extends KernelTestCase
$this->assertEquals($point, Point::fromArrayGeoJson($array));
}
- public function testFromGeoJson()
+ public function testFromGeoJson(): void
{
$geojson = '{"type":"Point","coordinates":[4.8634,50.47382]}';
$lon = 4.8634;
@@ -46,7 +46,7 @@ final class PointTest extends KernelTestCase
$this->assertEquals($point, Point::fromGeoJson($geojson));
}
- public function testFromLonLat()
+ public function testFromLonLat(): void
{
$lon = 4.8634;
$lat = 50.47382;
@@ -55,7 +55,7 @@ final class PointTest extends KernelTestCase
$this->assertEquals($point, Point::fromLonLat($lon, $lat));
}
- public function testGetLat()
+ public function testGetLat(): void
{
$lon = 4.8634;
$lat = 50.47382;
@@ -64,7 +64,7 @@ final class PointTest extends KernelTestCase
$this->assertEquals($lat, $point->getLat());
}
- public function testGetLon()
+ public function testGetLon(): void
{
$lon = 4.8634;
$lat = 50.47382;
@@ -73,7 +73,7 @@ final class PointTest extends KernelTestCase
$this->assertEquals($lon, $point->getLon());
}
- public function testJsonSerialize()
+ public function testJsonSerialize(): void
{
$lon = 4.8634;
$lat = 50.47382;
@@ -88,7 +88,7 @@ final class PointTest extends KernelTestCase
);
}
- public function testToArrayGeoJson()
+ public function testToArrayGeoJson(): void
{
$lon = 4.8634;
$lat = 50.47382;
@@ -103,7 +103,7 @@ final class PointTest extends KernelTestCase
);
}
- public function testToGeojson()
+ public function testToGeojson(): void
{
$lon = 4.8634;
$lat = 50.47382;
@@ -112,7 +112,7 @@ final class PointTest extends KernelTestCase
$this->assertEquals($point->toGeoJson(), '{"type":"Point","coordinates":[4.8634,50.47382]}');
}
- public function testToWKT()
+ public function testToWKT(): void
{
$lon = 4.8634;
$lat = 50.47382;
@@ -121,7 +121,7 @@ final class PointTest extends KernelTestCase
$this->assertEquals($point->toWKT(), 'SRID=4326;POINT(4.8634 50.47382)');
}
- private function preparePoint($lon, $lat)
+ private function preparePoint($lon, $lat): \Chill\MainBundle\Doctrine\Model\Point
{
return Point::fromLonLat($lon, $lat);
}
diff --git a/src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php b/src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php
index 26a9b5980..56b340022 100644
--- a/src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Entity/NotificationTest.php
@@ -64,7 +64,7 @@ final class NotificationTest extends KernelTestCase
];
}
- public function testAddAddresseeStoreAnUread()
+ public function testAddAddresseeStoreAnUread(): void
{
$notification = new Notification();
$notification->addAddressee($user1 = new User());
@@ -108,7 +108,7 @@ final class NotificationTest extends KernelTestCase
/**
* @dataProvider generateNotificationData
*/
- public function testPrePersistComputeUnread(int $senderId, array $addressesIds)
+ public function testPrePersistComputeUnread(int $senderId, array $addressesIds): void
{
$em = self::getContainer()->get(EntityManagerInterface::class);
$notification = new Notification();
diff --git a/src/Bundle/ChillMainBundle/Tests/Entity/UserTest.php b/src/Bundle/ChillMainBundle/Tests/Entity/UserTest.php
index b9dc56ea5..b278f391c 100644
--- a/src/Bundle/ChillMainBundle/Tests/Entity/UserTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Entity/UserTest.php
@@ -26,7 +26,7 @@ class UserTest extends TestCase
{
use ProphecyTrait;
- public function testMainScopeHistory()
+ public function testMainScopeHistory(): void
{
$user = new User();
$scopeA = new Scope();
@@ -47,7 +47,7 @@ class UserTest extends TestCase
);
}
- public function testUserJobHistory()
+ public function testUserJobHistory(): void
{
$user = new User();
$jobA = new UserJob();
diff --git a/src/Bundle/ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowStepSignatureTest.php b/src/Bundle/ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowStepSignatureTest.php
index 62b6a7d6a..608594869 100644
--- a/src/Bundle/ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowStepSignatureTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowStepSignatureTest.php
@@ -33,7 +33,7 @@ class EntityWorkflowStepSignatureTest extends KernelTestCase
$this->entityManager = self::getContainer()->get(EntityManagerInterface::class);
}
- public function testConstruct()
+ public function testConstruct(): void
{
$workflow = new EntityWorkflow();
$workflow->setWorkflowName('vendee_internal')
diff --git a/src/Bundle/ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowTest.php b/src/Bundle/ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowTest.php
index 3241a41fc..d7e94481c 100644
--- a/src/Bundle/ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Entity/Workflow/EntityWorkflowTest.php
@@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase;
*/
final class EntityWorkflowTest extends TestCase
{
- public function testIsFinalizeWith1Steps()
+ public function testIsFinalizeWith1Steps(): void
{
$entityWorkflow = new EntityWorkflow();
@@ -35,7 +35,7 @@ final class EntityWorkflowTest extends TestCase
$this->assertTrue($entityWorkflow->isFinal());
}
- public function testIsFinalizeWith4Steps()
+ public function testIsFinalizeWith4Steps(): void
{
$entityWorkflow = new EntityWorkflow();
@@ -55,7 +55,7 @@ final class EntityWorkflowTest extends TestCase
$this->assertTrue($entityWorkflow->isFinal());
}
- public function testIsFreeze()
+ public function testIsFreeze(): void
{
$entityWorkflow = new EntityWorkflow();
@@ -81,7 +81,7 @@ final class EntityWorkflowTest extends TestCase
$this->assertTrue($entityWorkflow->getCurrentStep()->isFreezeAfter());
}
- public function testPreviousStepMetadataAreFilled()
+ public function testPreviousStepMetadataAreFilled(): void
{
$entityWorkflow = new EntityWorkflow();
$initialStep = $entityWorkflow->getCurrentStep();
@@ -108,7 +108,7 @@ final class EntityWorkflowTest extends TestCase
self::assertEquals('to_step_two', $previous->getTransitionAfter());
}
- public function testSetStepSignatureForUserIsCreated()
+ public function testSetStepSignatureForUserIsCreated(): void
{
$entityWorkflow = new EntityWorkflow();
$dto = new WorkflowTransitionContextDTO($entityWorkflow);
@@ -122,7 +122,7 @@ final class EntityWorkflowTest extends TestCase
self::assertSame($user, $actual->getSignatures()->first()->getSigner());
}
- public function testSetStepSignatureForPersonIsCreated()
+ public function testSetStepSignatureForPersonIsCreated(): void
{
$entityWorkflow = new EntityWorkflow();
$dto = new WorkflowTransitionContextDTO($entityWorkflow);
diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php
index e2d0e1393..5beef8199 100644
--- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php
@@ -66,7 +66,7 @@ final class ExportManagerTest extends KernelTestCase
$this->prophet->checkPredictions();
}
- public function testAggregatorsApplyingOn()
+ public function testAggregatorsApplyingOn(): void
{
$centers = [$center = new Center()];
$user = $this->prepareUser([]);
@@ -127,7 +127,7 @@ final class ExportManagerTest extends KernelTestCase
$this->assertEquals(0, \count($obtained));
}
- public function testFiltersApplyingOn()
+ public function testFiltersApplyingOn(): void
{
$centers = [$center = new Center()];
$user = $this->prepareUser([]);
@@ -174,7 +174,7 @@ final class ExportManagerTest extends KernelTestCase
$this->assertEquals(0, \count($obtained));
}
- public function testFormattersByTypes()
+ public function testFormattersByTypes(): void
{
$exportManager = $this->createExportManager();
@@ -197,7 +197,7 @@ final class ExportManagerTest extends KernelTestCase
/**
* Test the generation of an export.
*/
- public function testGenerate()
+ public function testGenerate(): void
{
$center = $this->prepareCenter(100, 'center');
$user = $this->prepareUser([]);
@@ -364,7 +364,7 @@ final class ExportManagerTest extends KernelTestCase
$this->assertEquals($expected, $response->getContent());
}
- public function testIsGrantedForElementWithExportAndUserIsGranted()
+ public function testIsGrantedForElementWithExportAndUserIsGranted(): void
{
$center = $this->prepareCenter(100, 'center A');
$user = $this->prepareUser([]);
@@ -392,7 +392,7 @@ final class ExportManagerTest extends KernelTestCase
$this->assertTrue($result);
}
- public function testIsGrantedForElementWithExportAndUserIsGrantedNotForAllCenters()
+ public function testIsGrantedForElementWithExportAndUserIsGrantedNotForAllCenters(): void
{
$center = $this->prepareCenter(100, 'center A');
$centerB = $this->prepareCenter(102, 'center B');
@@ -422,7 +422,7 @@ final class ExportManagerTest extends KernelTestCase
$this->assertFalse($result);
}
- public function testIsGrantedForElementWithExportEmptyCenters()
+ public function testIsGrantedForElementWithExportEmptyCenters(): void
{
$user = $this->prepareUser([]);
@@ -443,7 +443,7 @@ final class ExportManagerTest extends KernelTestCase
$this->assertFalse($result);
}
- public function testIsGrantedForElementWithModifierFallbackToExport()
+ public function testIsGrantedForElementWithModifierFallbackToExport(): void
{
$center = $this->prepareCenter(100, 'center A');
$centerB = $this->prepareCenter(102, 'center B');
@@ -481,7 +481,7 @@ final class ExportManagerTest extends KernelTestCase
$this->assertFalse($result);
}
- public function testNonExistingFormatter()
+ public function testNonExistingFormatter(): void
{
$this->expectException(\RuntimeException::class);
@@ -558,7 +558,7 @@ class DummyFilterWithApplying implements FilterInterface
public function alterQuery(QueryBuilder $qb, $data) {}
- public function applyOn()
+ public function applyOn(): string
{
return $this->applyOn;
}
@@ -626,7 +626,7 @@ class DummyExport implements ExportInterface
return $this->role;
}
- public function supportsModifiers()
+ public function supportsModifiers(): array
{
return $this->supportedModifiers;
}
diff --git a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php
index cd820bb1c..518bb8352 100644
--- a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php
@@ -102,7 +102,7 @@ class SortExportElementTest extends KernelTestCase
private function makeTranslator(): TranslatorInterface
{
return new class () implements TranslatorInterface {
- public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null)
+ public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
return $id;
}
@@ -119,7 +119,7 @@ class SortExportElementTest extends KernelTestCase
return new class ($title) implements AggregatorInterface {
public function __construct(private readonly string $title) {}
- public function buildForm(FormBuilderInterface $builder) {}
+ public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{
@@ -136,7 +136,7 @@ class SortExportElementTest extends KernelTestCase
return [];
}
- public function getTitle()
+ public function getTitle(): string
{
return $this->title;
}
@@ -146,7 +146,7 @@ class SortExportElementTest extends KernelTestCase
return null;
}
- public function alterQuery(QueryBuilder $qb, $data) {}
+ public function alterQuery(QueryBuilder $qb, $data): void {}
public function applyOn()
{
@@ -160,12 +160,12 @@ class SortExportElementTest extends KernelTestCase
return new class ($title) implements FilterInterface {
public function __construct(private readonly string $title) {}
- public function getTitle()
+ public function getTitle(): string
{
return $this->title;
}
- public function buildForm(FormBuilderInterface $builder) {}
+ public function buildForm(FormBuilderInterface $builder): void {}
public function getFormDefaultData(): array
{
@@ -182,7 +182,7 @@ class SortExportElementTest extends KernelTestCase
return null;
}
- public function alterQuery(QueryBuilder $qb, $data) {}
+ public function alterQuery(QueryBuilder $qb, $data): void {}
public function applyOn()
{
diff --git a/src/Bundle/ChillMainBundle/Tests/Form/DataTransformer/IdToEntityDataTransformerTest.php b/src/Bundle/ChillMainBundle/Tests/Form/DataTransformer/IdToEntityDataTransformerTest.php
index 37024f947..cf63c92c9 100644
--- a/src/Bundle/ChillMainBundle/Tests/Form/DataTransformer/IdToEntityDataTransformerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Form/DataTransformer/IdToEntityDataTransformerTest.php
@@ -33,7 +33,7 @@ final class IdToEntityDataTransformerTest extends TestCase
{
use ProphecyTrait;
- public function testReverseTransformMulti()
+ public function testReverseTransformMulti(): void
{
$o1 = new \stdClass();
$o2 = new \stdClass();
@@ -56,7 +56,7 @@ final class IdToEntityDataTransformerTest extends TestCase
$this->assertSame($o2, $r[1]);
}
- public function testReverseTransformSingle()
+ public function testReverseTransformSingle(): void
{
$o = new \stdClass();
@@ -75,7 +75,7 @@ final class IdToEntityDataTransformerTest extends TestCase
$this->assertSame($o, $r);
}
- public function testTransformMulti()
+ public function testTransformMulti(): void
{
$o1 = new class () {
public function getId()
@@ -102,7 +102,7 @@ final class IdToEntityDataTransformerTest extends TestCase
);
}
- public function testTransformSingle()
+ public function testTransformSingle(): void
{
$o = new class () {
public function getId()
diff --git a/src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php b/src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php
index 4e0da5f86..b20fa0857 100644
--- a/src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Form/Type/PickCenterTypeTest.php
@@ -116,7 +116,7 @@ final class PickCenterTypeTest extends TypeTestCase
*
* @return CenterType
*/
- private function prepareType(User $user)
+ private function prepareType(User $user): \Chill\MainBundle\Form\CenterType
{
$prophet = new \Prophecy\Prophet();
diff --git a/src/Bundle/ChillMainBundle/Tests/Form/Type/PickRollingDateTypeTest.php b/src/Bundle/ChillMainBundle/Tests/Form/Type/PickRollingDateTypeTest.php
index fca789541..a549606cf 100644
--- a/src/Bundle/ChillMainBundle/Tests/Form/Type/PickRollingDateTypeTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Form/Type/PickRollingDateTypeTest.php
@@ -23,7 +23,7 @@ use Symfony\Component\Form\Test\TypeTestCase;
*/
final class PickRollingDateTypeTest extends TypeTestCase
{
- public function testSubmitValidData()
+ public function testSubmitValidData(): void
{
$formData = [
'roll' => 'year_previous_start',
diff --git a/src/Bundle/ChillMainBundle/Tests/Form/Type/ScopePickerTypeTest.php b/src/Bundle/ChillMainBundle/Tests/Form/Type/ScopePickerTypeTest.php
index 3d3813748..9f5b53668 100644
--- a/src/Bundle/ChillMainBundle/Tests/Form/Type/ScopePickerTypeTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Form/Type/ScopePickerTypeTest.php
@@ -39,7 +39,7 @@ final class ScopePickerTypeTest extends TypeTestCase
{
use ProphecyTrait;
- public function estBuildOneScopeIsSuccessful()
+ public function estBuildOneScopeIsSuccessful(): void
{
$form = $this->factory->create(ScopePickerType::class, null, [
'center' => new Center(),
@@ -51,7 +51,7 @@ final class ScopePickerTypeTest extends TypeTestCase
$this->assertContains('hidden', $view['scope']->vars['block_prefixes']);
}
- public function testBuildThreeScopesIsSuccessful()
+ public function testBuildThreeScopesIsSuccessful(): void
{
$form = $this->factory->create(ScopePickerType::class, null, [
'center' => new Center(),
@@ -63,7 +63,7 @@ final class ScopePickerTypeTest extends TypeTestCase
$this->assertContains('entity', $view['scope']->vars['block_prefixes']);
}
- public function testBuildTwoScopesIsSuccessful()
+ public function testBuildTwoScopesIsSuccessful(): void
{
$form = $this->factory->create(ScopePickerType::class, null, [
'center' => new Center(),
diff --git a/src/Bundle/ChillMainBundle/Tests/Notification/EventListener/PersistNotificationOnTerminateEventSubscriberTest.php b/src/Bundle/ChillMainBundle/Tests/Notification/EventListener/PersistNotificationOnTerminateEventSubscriberTest.php
index fb217eea6..ec9165e5e 100644
--- a/src/Bundle/ChillMainBundle/Tests/Notification/EventListener/PersistNotificationOnTerminateEventSubscriberTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Notification/EventListener/PersistNotificationOnTerminateEventSubscriberTest.php
@@ -32,7 +32,7 @@ final class PersistNotificationOnTerminateEventSubscriberTest extends TestCase
{
use ProphecyTrait;
- public function testNotificationIsPersisted()
+ public function testNotificationIsPersisted(): void
{
$persister = new NotificationPersister();
$em = $this->prophesize(EntityManagerInterface::class);
diff --git a/src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php b/src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php
index 787a5833a..8205f898c 100644
--- a/src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Pagination/PageTest.php
@@ -80,7 +80,7 @@ final class PageTest extends KernelTestCase
$number,
$itemPerPage,
$expectedItemPerPage,
- ) {
+ ): void {
$page = $this->generatePage($number, $itemPerPage);
$this->assertEquals($expectedItemPerPage, $page->getFirstItemNumber());
@@ -97,13 +97,13 @@ final class PageTest extends KernelTestCase
$number,
$itemPerPage,
$expectedItemPerPage,
- ) {
+ ): void {
$page = $this->generatePage($number, $itemPerPage);
$this->assertEquals($expectedItemPerPage, $page->getLastItemNumber());
}
- public function testPageNumber()
+ public function testPageNumber(): void
{
$page = $this->generatePage(1);
@@ -122,7 +122,7 @@ final class PageTest extends KernelTestCase
$route = 'route',
array $routeParameters = [],
mixed $totalItems = 100,
- ) {
+ ): \Chill\MainBundle\Pagination\Page {
$urlGenerator = $this->prophet->prophesize();
$urlGenerator->willImplement(UrlGeneratorInterface::class);
diff --git a/src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php b/src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php
index f32a772eb..89b48a8dc 100644
--- a/src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Pagination/PaginatorTest.php
@@ -101,7 +101,7 @@ final class PaginatorTest extends KernelTestCase
];
}
- public function testGetPage()
+ public function testGetPage(): void
{
$paginator = $this->generatePaginator(105, 10);
@@ -121,7 +121,7 @@ final class PaginatorTest extends KernelTestCase
$itemPerPage,
$currentPage,
$expectedHasNextPage,
- ) {
+ ): void {
$paginator = $this->generatePaginator($totalItems, $itemPerPage, $currentPage);
$this->assertEquals($expectedHasNextPage, $paginator->hasNextPage());
@@ -142,7 +142,7 @@ final class PaginatorTest extends KernelTestCase
$itemPerpage,
$pageNumber,
$expectedHasPage,
- ) {
+ ): void {
$paginator = $this->generatePaginator($totalItems, $itemPerpage);
$this->assertEquals($expectedHasPage, $paginator->hasPage($pageNumber));
@@ -160,7 +160,7 @@ final class PaginatorTest extends KernelTestCase
$itemPerPage,
$currentPage,
mixed $expectedHasNextPage,
- ) {
+ ): void {
$paginator = $this->generatePaginator($totalItems, $itemPerPage, $currentPage);
$this->assertEquals($expectedHasNextPage, $paginator->hasPreviousPage());
@@ -176,7 +176,7 @@ final class PaginatorTest extends KernelTestCase
*
* @dataProvider generatePageNumber
*/
- public function testPageNumber($totalItems, $itemPerPage, $expectedPageNumber)
+ public function testPageNumber($totalItems, $itemPerPage, $expectedPageNumber): void
{
$paginator = $this->generatePaginator($totalItems, $itemPerPage);
@@ -184,7 +184,7 @@ final class PaginatorTest extends KernelTestCase
$this->assertEquals($expectedPageNumber, \count($paginator));
}
- public function testPagesGenerator()
+ public function testPagesGenerator(): void
{
$paginator = $this->generatePaginator(105, 10);
@@ -208,7 +208,7 @@ final class PaginatorTest extends KernelTestCase
);
}
- public function testPagesWithoutResult()
+ public function testPagesWithoutResult(): void
{
$paginator = $this->generatePaginator(0, 10);
@@ -228,7 +228,7 @@ final class PaginatorTest extends KernelTestCase
mixed $currentPageNumber = 1,
$route = '',
array $routeParameters = [],
- ) {
+ ): \Chill\MainBundle\Pagination\Paginator {
$urlGenerator = $this->prophet->prophesize();
$urlGenerator->willImplement(UrlGeneratorInterface::class);
diff --git a/src/Bundle/ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php
index 6f65c612f..e3cd91449 100644
--- a/src/Bundle/ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Phonenumber/PhonenumberHelperTest.php
@@ -55,7 +55,7 @@ final class PhonenumberHelperTest extends KernelTestCase
/**
* @dataProvider formatPhonenumbers
*/
- public function testFormatPhonenumbers(string $defaultCarrierCode, string $phoneNumber, string $expected)
+ public function testFormatPhonenumbers(string $defaultCarrierCode, string $phoneNumber, string $expected): void
{
$util = PhoneNumberUtil::getInstance();
$subject = new PhonenumberHelper(
diff --git a/src/Bundle/ChillMainBundle/Tests/Repository/NewsItemRepositoryTest.php b/src/Bundle/ChillMainBundle/Tests/Repository/NewsItemRepositoryTest.php
index d5e44d17e..3e0a63cea 100644
--- a/src/Bundle/ChillMainBundle/Tests/Repository/NewsItemRepositoryTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Repository/NewsItemRepositoryTest.php
@@ -54,7 +54,7 @@ class NewsItemRepositoryTest extends KernelTestCase
return new NewsItemRepository($this->entityManager, $clock);
}
- public function testFindCurrentNews()
+ public function testFindCurrentNews(): void
{
$clock = new MockClock($now = new \DateTimeImmutable('2023-01-10'));
$repository = $this->getNewsItemsRepository($clock);
diff --git a/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php b/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php
index bcbf609df..2e57515f7 100644
--- a/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Routing/Loader/RouteLoaderTest.php
@@ -33,7 +33,7 @@ final class RouteLoaderTest extends KernelTestCase
/**
* Test that the route loader loads at least homepage.
*/
- public function testRouteFromMainBundleAreLoaded()
+ public function testRouteFromMainBundleAreLoaded(): void
{
$homepage = $this->router->getRouteCollection()->get('chill_main_homepage');
diff --git a/src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php b/src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php
index 07254594a..aadf7f45e 100644
--- a/src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Search/AbstractSearchTest.php
@@ -30,7 +30,7 @@ final class AbstractSearchTest extends TestCase
$this->stub = $this->getMockForAbstractClass(\Chill\MainBundle\Search\AbstractSearch::class);
}
- public function testParseDateRegular()
+ public function testParseDateRegular(): void
{
$date = $this->stub->parseDate('2014-05-01');
diff --git a/src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php b/src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php
index 7f4e4c533..72226f00e 100644
--- a/src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Search/SearchApiQueryTest.php
@@ -21,7 +21,7 @@ use PHPUnit\Framework\TestCase;
*/
final class SearchApiQueryTest extends TestCase
{
- public function testBuildParams()
+ public function testBuildParams(): void
{
$q = new SearchApiQuery();
@@ -36,7 +36,7 @@ final class SearchApiQueryTest extends TestCase
$this->assertEquals(['one', 'two', 'three', 'four', 'six', 'seven'], $q->buildParameters());
}
- public function testMultipleWhereClauses()
+ public function testMultipleWhereClauses(): void
{
$q = new SearchApiQuery();
$q->setSelectJsonbMetadata('boum')
@@ -57,7 +57,7 @@ final class SearchApiQueryTest extends TestCase
$this->assertEquals(['gamma', 'alpha', 'beta'], $q->buildParameters());
}
- public function testWithoutWhereClause()
+ public function testWithoutWhereClause(): void
{
$q = new SearchApiQuery();
$q->setSelectJsonbMetadata('boum')
diff --git a/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php b/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php
index d1602f7e2..75f96f334 100644
--- a/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php
@@ -43,7 +43,7 @@ final class SearchProviderTest extends TestCase
);
}
- public function testAccentued()
+ public function testAccentued(): void
{
// $this->markTestSkipped('accentued characters must be implemented');
@@ -55,7 +55,7 @@ final class SearchProviderTest extends TestCase
], $terms);
}
- public function testAccentuedCapitals()
+ public function testAccentuedCapitals(): void
{
// $this->markTestSkipped('accentued characters must be implemented');
@@ -67,7 +67,7 @@ final class SearchProviderTest extends TestCase
], $terms);
}
- public function testArgumentNameWithTrait()
+ public function testArgumentNameWithTrait(): void
{
$terms = $this->p('date-from:2016-05-04');
@@ -78,7 +78,7 @@ final class SearchProviderTest extends TestCase
], $terms);
}
- public function testCapitalLetters()
+ public function testCapitalLetters(): void
{
$terms = $this->p('Foo:Bar LOL marCi @PERSON');
@@ -89,7 +89,7 @@ final class SearchProviderTest extends TestCase
], $terms);
}
- public function testDoubleParenthesis()
+ public function testDoubleParenthesis(): void
{
$terms = $this->p('@papamobile name:"my beautiful name" residual surname:"i love techno"');
@@ -101,14 +101,14 @@ final class SearchProviderTest extends TestCase
], $terms);
}
- public function testInvalidSearchName()
+ public function testInvalidSearchName(): void
{
$this->expectException(UnknowSearchNameException::class);
$this->search->getByName('invalid name');
}
- public function testMultipleDomainError()
+ public function testMultipleDomainError(): void
{
$this->expectException(ParsingException::class);
@@ -119,7 +119,7 @@ final class SearchProviderTest extends TestCase
* Test the behaviour when no domain is provided in the search pattern :
* the default search should be enabled.
*/
- public function testSearchResultDefault()
+ public function testSearchResultDefault(): void
{
$response = $this->search->getSearchResults('default search');
@@ -130,7 +130,7 @@ final class SearchProviderTest extends TestCase
], $response);
}
- public function testSearchResultDomainSearch()
+ public function testSearchResultDomainSearch(): void
{
// add a search service which will be supported
$this->addSearchService(
@@ -145,14 +145,14 @@ final class SearchProviderTest extends TestCase
], $response);
}
- public function testSearchResultDomainUnknow()
+ public function testSearchResultDomainUnknow(): void
{
$this->expectException(UnknowSearchDomainException::class);
$this->search->getSearchResults('@unknow domain');
}
- public function testSearchWithinSpecificSearchName()
+ public function testSearchWithinSpecificSearchName(): void
{
// add a search service which will be supported
$this->addSearchService(
@@ -165,14 +165,14 @@ final class SearchProviderTest extends TestCase
$this->assertEquals('I am domain foo', $response);
}
- public function testSearchWithinSpecificSearchNameInConflictWithSupport()
+ public function testSearchWithinSpecificSearchNameInConflictWithSupport(): void
{
$this->expectException(ParsingException::class);
$this->search->getResultByName('@foo default search', 'bar');
}
- public function testSimplePattern()
+ public function testSimplePattern(): void
{
$terms = $this->p('@person birthdate:2014-01-02 name:"my name" is not my name');
@@ -184,7 +184,7 @@ final class SearchProviderTest extends TestCase
], $terms);
}
- public function testTrimInDefault()
+ public function testTrimInDefault(): void
{
$terms = $this->p(' foo bar ');
@@ -194,7 +194,7 @@ final class SearchProviderTest extends TestCase
], $terms);
}
- public function testTrimInParenthesis()
+ public function testTrimInParenthesis(): void
{
$terms = $this->p('foo:"bar "');
@@ -205,7 +205,7 @@ final class SearchProviderTest extends TestCase
], $terms);
}
- public function testWithoutDefault()
+ public function testWithoutDefault(): void
{
$terms = $this->p('@person foo:bar');
@@ -216,7 +216,7 @@ final class SearchProviderTest extends TestCase
], $terms);
}
- public function testWithoutDomain()
+ public function testWithoutDomain(): void
{
$terms = $this->p('foo:bar residual');
@@ -234,7 +234,7 @@ final class SearchProviderTest extends TestCase
*
* @param string $name
*/
- private function addSearchService(SearchInterface $search, $name)
+ private function addSearchService(SearchInterface $search, $name): void
{
$this->search
->addSearchService($search, $name);
diff --git a/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractDateFromPatternTest.php b/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractDateFromPatternTest.php
index 00339b100..358b7b253 100644
--- a/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractDateFromPatternTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractDateFromPatternTest.php
@@ -41,7 +41,7 @@ final class ExtractDateFromPatternTest extends TestCase
/**
* @dataProvider provideSubjects
*/
- public function testExtractDate(string $subject, string $filtered, int $count, ...$datesSearched)
+ public function testExtractDate(string $subject, string $filtered, int $count, ...$datesSearched): void
{
$extractor = new ExtractDateFromPattern();
$result = $extractor->extractDates($subject);
diff --git a/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php b/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php
index 96d7d4622..7a8952395 100644
--- a/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Search/Utils/ExtractPhonenumberFromPatternTest.php
@@ -48,7 +48,7 @@ final class ExtractPhonenumberFromPatternTest extends KernelTestCase
/**
* @dataProvider provideData
*/
- public function testExtract(string $defaultCarrierCode, mixed $subject, mixed $expectedCount, mixed $expected, mixed $filteredSubject, mixed $msg)
+ public function testExtract(string $defaultCarrierCode, mixed $subject, mixed $expectedCount, mixed $expected, mixed $filteredSubject, mixed $msg): void
{
$extractor = new ExtractPhonenumberFromPattern(new ParameterBag(['chill_main' => [
'phone_helper' => ['default_carrier_code' => $defaultCarrierCode],
diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php
index 4ce7034ce..a9fb5bcaa 100644
--- a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php
@@ -201,7 +201,7 @@ final class AuthorizationHelperTest extends KernelTestCase
/**
* @group legacy
*/
- public function testGetParentRoles()
+ public function testGetParentRoles(): void
{
$parentRoles = $this->getAuthorizationHelper()
->getParentRoles('CHILL_INHERITED_ROLE_1');
@@ -216,7 +216,7 @@ final class AuthorizationHelperTest extends KernelTestCase
/**
* @dataProvider dataProvider_getReachableCenters
*/
- public function testGetReachableCenters(mixed $test, mixed $result, mixed $msg)
+ public function testGetReachableCenters(mixed $test, mixed $result, mixed $msg): void
{
$this->assertEquals($test, $result, $msg);
}
@@ -234,7 +234,7 @@ final class AuthorizationHelperTest extends KernelTestCase
string $role,
Center $center,
$message,
- ) {
+ ): void {
$reachableScopes = $this->getAuthorizationHelper()
->getReachableScopes($user, $role, $center);
@@ -245,7 +245,7 @@ final class AuthorizationHelperTest extends KernelTestCase
);
}
- public function testtestUserHasAccessUserShouldHaveAccessEntityWithScope()
+ public function testtestUserHasAccessUserShouldHaveAccessEntityWithScope(): void
{
$center = $this->prepareCenter(1, 'center');
$scope = $this->prepareScope(1, 'default');
@@ -271,7 +271,7 @@ final class AuthorizationHelperTest extends KernelTestCase
*
* A user can not reachcenter =>W the function should return false
*/
- public function testUserCanReachCenterUserShouldNotReach()
+ public function testUserCanReachCenterUserShouldNotReach(): void
{
$centerA = $this->prepareCenter(1, 'center');
$centerB = $this->prepareCenter(2, 'centerB');
@@ -293,7 +293,7 @@ final class AuthorizationHelperTest extends KernelTestCase
*
* A user can reach center => the function should return true.
*/
- public function testUserCanReachCenterUserShouldReach()
+ public function testUserCanReachCenterUserShouldReach(): void
{
$center = $this->prepareCenter(1, 'center');
$scope = $this->prepareScope(1, 'default');
@@ -309,7 +309,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$this->assertTrue($helper->userCanReachCenter($user, $center));
}
- public function testUserHasAccessEntityMultiScope()
+ public function testUserHasAccessEntityMultiScope(): void
{
$centerA = $this->prepareCenter(1, 'center');
$centerB = $this->prepareCenter(2, 'centerB');
@@ -332,7 +332,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$this->assertTrue($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE'));
}
- public function testUserHasAccessEntityIsCenter()
+ public function testUserHasAccessEntityIsCenter(): void
{
$centerA = $this->prepareCenter(1, 'center');
$centerB = $this->prepareCenter(2, 'centerB');
@@ -350,7 +350,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$this->assertTrue($helper->userHasAccess($user, $centerA, 'CHILL_ROLE'));
}
- public function testUserHasAccessMultiCenterEntityWithoutScope()
+ public function testUserHasAccessMultiCenterEntityWithoutScope(): void
{
$center = $this->prepareCenter(1, 'center');
$centerB = $this->prepareCenter(1, 'centerB');
@@ -370,7 +370,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$this->assertTrue($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE'));
}
- public function testUserHasAccessShouldHaveAccessEntityWithoutScope()
+ public function testUserHasAccessShouldHaveAccessEntityWithoutScope(): void
{
$center = $this->prepareCenter(1, 'center');
$scope = $this->prepareScope(1, 'default');
@@ -393,7 +393,7 @@ final class AuthorizationHelperTest extends KernelTestCase
));
}
- public function testUserHasAccessShouldHaveAccessWithInheritanceEntityWithoutScope()
+ public function testUserHasAccessShouldHaveAccessWithInheritanceEntityWithoutScope(): void
{
$center = $this->prepareCenter(1, 'center');
$scope = $this->prepareScope(1, 'default');
@@ -417,7 +417,7 @@ final class AuthorizationHelperTest extends KernelTestCase
));
}
- public function testUserHasAccessUserHasNoCenterEntityWithScope()
+ public function testUserHasAccessUserHasNoCenterEntityWithScope(): void
{
$centerA = $this->prepareCenter(1, 'center'); // the user will have this center
$centerB = $this->prepareCenter(2, 'centerB'); // the entity will have another center
@@ -439,7 +439,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$this->assertFalse($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE'));
}
- public function testuserHasAccessUserHasNoRoleEntityWithoutScope()
+ public function testuserHasAccessUserHasNoRoleEntityWithoutScope(): void
{
$center = $this->prepareCenter(1, 'center');
$scope = $this->prepareScope(1, 'default');
@@ -458,7 +458,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$this->assertFalse($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE'));
}
- public function testUserHasAccessUserHasNoRoleEntityWithScope()
+ public function testUserHasAccessUserHasNoRoleEntityWithScope(): void
{
$center = $this->prepareCenter(1, 'center');
$scope = $this->prepareScope(1, 'default');
@@ -483,7 +483,7 @@ final class AuthorizationHelperTest extends KernelTestCase
* test that a user has no access on a entity, but is granted on the same role
* on another center.
*/
- public function testUserHasAccessUserHasNoRoleUserHasRoleOnAnotherCenterEntityWithoutScope()
+ public function testUserHasAccessUserHasNoRoleUserHasRoleOnAnotherCenterEntityWithoutScope(): void
{
$centerA = $this->prepareCenter(1, 'center');
$centerB = $this->prepareCenter(2, 'centerB');
@@ -509,7 +509,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$this->assertFalse($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE'));
}
- public function testUserHasAccessUserHasNoScopeEntityWithScope()
+ public function testUserHasAccessUserHasNoScopeEntityWithScope(): void
{
$center = $this->prepareCenter(1, 'center');
$scopeA = $this->prepareScope(1, 'default'); // the entity will have this scope
@@ -531,7 +531,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$this->assertFalse($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE'));
}
- public function testUserHasNoAccessEntityMultiScope()
+ public function testUserHasNoAccessEntityMultiScope(): void
{
$centerA = $this->prepareCenter(1, 'center');
$centerB = $this->prepareCenter(2, 'centerB');
@@ -555,7 +555,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$this->assertFalse($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE'));
}
- public function testUserHasNoAccessMultiCenterEntityWithoutScope()
+ public function testUserHasNoAccessMultiCenterEntityWithoutScope(): void
{
$center = $this->prepareCenter(1, 'center');
$centerB = $this->prepareCenter(2, 'centerB');
@@ -579,7 +579,7 @@ final class AuthorizationHelperTest extends KernelTestCase
/**
* @return AuthorizationHelper
*/
- private static function getAuthorizationHelper()
+ private static function getAuthorizationHelper(): ?object
{
return self::getContainer()
->get(AuthorizationHelper::class);
diff --git a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php
index 052e61f64..2bfe989b1 100644
--- a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php
@@ -34,9 +34,9 @@ final class TokenManagerTest extends KernelTestCase
$this->tokenManager = new TokenManager('secret', $logger);
}
- public static function setUpBefore() {}
+ public static function setUpBefore(): void {}
- public function testGenerate()
+ public function testGenerate(): void
{
$tokenManager = $this->tokenManager;
$user = (new User())->setUsernameCanonical('test');
@@ -52,7 +52,7 @@ final class TokenManagerTest extends KernelTestCase
$this->assertEquals($user->getUsernameCanonical(), $tokens['u']);
}
- public function testGenerateEmptyUsernameCanonical()
+ public function testGenerateEmptyUsernameCanonical(): void
{
$this->expectException(\UnexpectedValueException::class);
@@ -64,7 +64,7 @@ final class TokenManagerTest extends KernelTestCase
$tokenManager->generate($user, $expiration);
}
- public function testVerify()
+ public function testVerify(): void
{
$tokenManager = $this->tokenManager;
$user = (new User())->setUsernameCanonical('test');
@@ -87,7 +87,7 @@ final class TokenManagerTest extends KernelTestCase
$this->assertFalse($tokenManager->verify($hash, $token, $user, (string) ($timestamp + 1)));
}
- public function testVerifyExpiredFails()
+ public function testVerifyExpiredFails(): void
{
$tokenManager = $this->tokenManager;
$user = (new User())->setUsernameCanonical('test');
diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php
index b7a38247f..dabe3e058 100644
--- a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/CenterResolverDispatcherTest.php
@@ -34,7 +34,7 @@ final class CenterResolverDispatcherTest extends KernelTestCase
/**
* @group legacy
*/
- public function testResolveCenter()
+ public function testResolveCenter(): void
{
$center = new Center();
diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php
index 733e17fec..2b243b010 100644
--- a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php
@@ -31,13 +31,13 @@ final class DefaultScopeResolverTest extends TestCase
$this->scopeResolver = new DefaultScopeResolver();
}
- public function testHasScopeInterface()
+ public function testHasScopeInterface(): void
{
$scope = new Scope();
$entity = new class ($scope) implements HasScopeInterface {
public function __construct(private readonly Scope $scope) {}
- public function getScope()
+ public function getScope(): \Chill\MainBundle\Entity\Scope
{
return $this->scope;
}
@@ -48,7 +48,7 @@ final class DefaultScopeResolverTest extends TestCase
$this->assertSame($scope, $this->scopeResolver->resolveScope($entity));
}
- public function testHasScopesInterface()
+ public function testHasScopesInterface(): void
{
$entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
public function __construct(private readonly Scope $scopeA, private readonly Scope $scopeB) {}
diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php
index 35245174c..175e24a8e 100644
--- a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php
@@ -32,13 +32,13 @@ final class ScopeResolverDispatcherTest extends TestCase
$this->scopeResolverDispatcher = new ScopeResolverDispatcher([new DefaultScopeResolver()]);
}
- public function testHasScopeInterface()
+ public function testHasScopeInterface(): void
{
$scope = new Scope();
$entity = new class ($scope) implements HasScopeInterface {
public function __construct(private readonly Scope $scope) {}
- public function getScope()
+ public function getScope(): \Chill\MainBundle\Entity\Scope
{
return $this->scope;
}
@@ -48,7 +48,7 @@ final class ScopeResolverDispatcherTest extends TestCase
$this->assertSame($scope, $this->scopeResolverDispatcher->resolveScope($entity));
}
- public function testHasScopesInterface()
+ public function testHasScopesInterface(): void
{
$entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface {
/**
diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php
index 74f44d05e..0a7091ac4 100644
--- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php
@@ -66,12 +66,12 @@ final class DateNormalizerTest extends KernelTestCase
/**
* @dataProvider generateDataNormalize
*/
- public function testNormalize(mixed $expected, mixed $date, mixed $format, mixed $locale, mixed $msg)
+ public function testNormalize(mixed $expected, mixed $date, mixed $format, mixed $locale, mixed $msg): void
{
$this->assertEquals($expected, $this->buildDateNormalizer($locale)->normalize($date, $format, []), $msg);
}
- public function testSupports()
+ public function testSupports(): void
{
$this->assertTrue($this->buildDateNormalizer()->supportsNormalization(new \DateTime(), 'json'));
$this->assertTrue($this->buildDateNormalizer()->supportsNormalization(new \DateTimeImmutable(), 'json'));
diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php
index da1adbf89..eec542798 100644
--- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DoctrineExistingEntityNormalizerTest.php
@@ -53,7 +53,7 @@ final class DoctrineExistingEntityNormalizerTest extends KernelTestCase
/**
* @dataProvider dataProviderUserId
*/
- public function testGetMappedClass(mixed $userId)
+ public function testGetMappedClass(mixed $userId): void
{
$data = ['type' => 'user', 'id' => $userId];
$supports = $this->normalizer->supportsDenormalization($data, User::class);
diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php
index b36abdd3f..e830b03b0 100644
--- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php
@@ -40,7 +40,7 @@ final class PhonenumberNormalizerTest extends TestCase
/**
* @dataProvider dataProviderNormalizePhonenumber
*/
- public function testNormalize(?PhoneNumber $phonenumber, mixed $format, mixed $context, mixed $expected)
+ public function testNormalize(?PhoneNumber $phonenumber, mixed $format, mixed $context, mixed $expected): void
{
$parameterBag = $this->prophesize(ParameterBagInterface::class);
$parameterBag->get(Argument::exact('chill_main'))->willReturn(['phone_helper' => ['default_carrier_code' => 'BE']]);
diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserGroupNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserGroupNormalizerTest.php
index eb85c99a7..d6abfa80c 100644
--- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserGroupNormalizerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserGroupNormalizerTest.php
@@ -24,7 +24,7 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
*/
class UserGroupNormalizerTest extends TestCase
{
- public function testNormalize()
+ public function testNormalize(): void
{
$userGroup = new UserGroup();
$userGroup
diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php
index 488495027..cdc01de34 100644
--- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php
@@ -118,7 +118,7 @@ final class UserNormalizerTest extends TestCase
*
* @throws ExceptionInterface
*/
- public function testNormalize(?User $user, mixed $format, mixed $context, mixed $expected)
+ public function testNormalize(?User $user, mixed $format, mixed $context, mixed $expected): void
{
$userRender = $this->prophesize(UserRender::class);
$userRender->renderString(Argument::type(User::class), Argument::type('array'))->willReturn($user ? $user->getLabel() : '');
@@ -127,12 +127,12 @@ final class UserNormalizerTest extends TestCase
$normalizer = new UserNormalizer($userRender->reveal(), $clock);
$normalizer->setNormalizer(new class () implements NormalizerInterface {
- public function normalize($object, ?string $format = null, array $context = [])
+ public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
return ['context' => $context['docgen:expects'] ?? null];
}
- public function supportsNormalization($data, ?string $format = null)
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return true;
}
diff --git a/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php b/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php
index ae63557eb..8e6366bec 100644
--- a/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Services/MenuComposerTest.php
@@ -43,7 +43,7 @@ final class MenuComposerTest extends KernelTestCase
/**
* @covers \Chill\MainBundle\Routing\MenuComposer
*/
- public function testMenuComposer()
+ public function testMenuComposer(): void
{
$collection = new RouteCollection();
diff --git a/src/Bundle/ChillMainBundle/Tests/Services/RollingDate/RollingDateConverterTest.php b/src/Bundle/ChillMainBundle/Tests/Services/RollingDate/RollingDateConverterTest.php
index 5b2dfb954..dbad0105c 100644
--- a/src/Bundle/ChillMainBundle/Tests/Services/RollingDate/RollingDateConverterTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Services/RollingDate/RollingDateConverterTest.php
@@ -60,7 +60,7 @@ final class RollingDateConverterTest extends TestCase
yield [RollingDate::T_YEAR_PREVIOUS_START, '2021-01-01 000000', $format];
}
- public function testConversionFixedDate()
+ public function testConversionFixedDate(): void
{
$rollingDate = new RollingDate(RollingDate::T_FIXED_DATE, new \DateTimeImmutable('2022-01-01'));
@@ -70,7 +70,7 @@ final class RollingDateConverterTest extends TestCase
);
}
- public function testConvertOnDateNow()
+ public function testConvertOnDateNow(): void
{
$rollingDate = new RollingDate(RollingDate::T_YEAR_PREVIOUS_START);
@@ -87,7 +87,7 @@ final class RollingDateConverterTest extends TestCase
/**
* @dataProvider generateDataConversionDate
*/
- public function testConvertOnPivotDate(string $roll, string $expectedDateTime, string $format)
+ public function testConvertOnPivotDate(string $roll, string $expectedDateTime, string $format): void
{
$pivot = \DateTimeImmutable::createFromFormat('Y-m-d His', '2022-11-07 000000');
$rollingDate = new RollingDate($roll, null, $pivot);
diff --git a/src/Bundle/ChillMainBundle/Tests/Templating/ChillMarkdownRenderExtensionTest.php b/src/Bundle/ChillMainBundle/Tests/Templating/ChillMarkdownRenderExtensionTest.php
index d4eb8afa8..c75fad39f 100644
--- a/src/Bundle/ChillMainBundle/Tests/Templating/ChillMarkdownRenderExtensionTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Templating/ChillMarkdownRenderExtensionTest.php
@@ -47,7 +47,7 @@ final class ChillMarkdownRenderExtensionTest extends TestCase
/**
* Test that the markdown input is transformed into html.
*/
- public function testRendering()
+ public function testRendering(): void
{
$extension = new ChillMarkdownRenderExtension();
@@ -60,7 +60,7 @@ final class ChillMarkdownRenderExtensionTest extends TestCase
/**
* Test that the output of the markdown content is sanitized.
*/
- public function testSecurity()
+ public function testSecurity(): void
{
$extension = new ChillMarkdownRenderExtension();
diff --git a/src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php b/src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php
index 9150c8ea1..12eb5e803 100644
--- a/src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php
@@ -23,14 +23,14 @@ use PHPUnit\Framework\TestCase;
*/
final class CountriesInfoTest extends TestCase
{
- public function getGetContinentsCodes()
+ public function getGetContinentsCodes(): void
{
$continents = CountriesInfo::getContinentsCodes();
$this->assertContains('EU', $continents);
}
- public function testGetArrayCountriesData()
+ public function testGetArrayCountriesData(): void
{
$data = CountriesInfo::getArrayCountriesData();
@@ -40,7 +40,7 @@ final class CountriesInfoTest extends TestCase
], $data);
}
- public function testGetCountryCodeByContinents()
+ public function testGetCountryCodeByContinents(): void
{
$countries = CountriesInfo::getCountriesCodeByContinent('EU');
@@ -49,7 +49,7 @@ final class CountriesInfoTest extends TestCase
$this->assertContains('GB', $countries);
}
- public function testGetCountryData()
+ public function testGetCountryData(): void
{
$raw = CountriesInfo::getCountriesData();
diff --git a/src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php b/src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php
index e8d95233c..92d374e0f 100644
--- a/src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Util/DateRangeCoveringTest.php
@@ -21,7 +21,7 @@ use PHPUnit\Framework\TestCase;
*/
final class DateRangeCoveringTest extends TestCase
{
- public function testCoveringWithMinCover1()
+ public function testCoveringWithMinCover1(): void
{
$cover = new DateRangeCovering(1, new \DateTimeZone('Europe/Brussels'));
$cover
@@ -49,7 +49,7 @@ final class DateRangeCoveringTest extends TestCase
$this->assertNotContains(3, $cover->getIntersections()[0][2]);
}
- public function testCoveringWithMinCover1NoCoveringWithNullDates()
+ public function testCoveringWithMinCover1NoCoveringWithNullDates(): void
{
$cover = new DateRangeCovering(1, new \DateTimeZone('Europe/Brussels'));
$cover
@@ -60,7 +60,7 @@ final class DateRangeCoveringTest extends TestCase
$this->assertFalse($cover->hasIntersections());
}
- public function testCoveringWithMinCover1WithTwoIntersections()
+ public function testCoveringWithMinCover1WithTwoIntersections(): void
{
$cover = new DateRangeCovering(1, new \DateTimeZone('Europe/Brussels'));
$cover
@@ -120,7 +120,7 @@ final class DateRangeCoveringTest extends TestCase
$this->assertNotContains(2, $intersections[1][2]);
}
- public function testCoveringWithMinCover2()
+ public function testCoveringWithMinCover2(): void
{
$cover = new DateRangeCovering(2, new \DateTimeZone('Europe/Brussels'));
$cover
@@ -152,7 +152,7 @@ final class DateRangeCoveringTest extends TestCase
$this->assertNotContains(5, $cover->getIntersections()[0][2]);
}
- public function testCoveringWithMinCover2AndThreePeriodsCovering()
+ public function testCoveringWithMinCover2AndThreePeriodsCovering(): void
{
$cover = new DateRangeCovering(2, new \DateTimeZone('Europe/Brussels'));
$cover
@@ -187,7 +187,7 @@ final class DateRangeCoveringTest extends TestCase
$this->assertNotContains(6, $cover->getIntersections()[0][2]);
}
- public function testCoveringWithMinCover2AndThreePeriodsCoveringWithNullMetadata()
+ public function testCoveringWithMinCover2AndThreePeriodsCoveringWithNullMetadata(): void
{
$cover = new DateRangeCovering(2, new \DateTimeZone('Europe/Brussels'));
$cover
@@ -216,7 +216,7 @@ final class DateRangeCoveringTest extends TestCase
$this->assertIsArray($cover->getIntersections()[0][2]);
}
- public function testCoveringWithMinCover3Absent()
+ public function testCoveringWithMinCover3Absent(): void
{
$cover = new DateRangeCovering(3, new \DateTimeZone('Europe/Brussels'));
$cover
diff --git a/src/Bundle/ChillMainBundle/Tests/Workflow/EntityWorkflowManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Workflow/EntityWorkflowManagerTest.php
index 4570d86b8..69f3df489 100644
--- a/src/Bundle/ChillMainBundle/Tests/Workflow/EntityWorkflowManagerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Workflow/EntityWorkflowManagerTest.php
@@ -25,7 +25,7 @@ use Symfony\Component\Workflow\Registry;
*/
class EntityWorkflowManagerTest extends TestCase
{
- public function testGetSuggestedUsers()
+ public function testGetSuggestedUsers(): void
{
$user1 = new User();
$user2 = new User();
diff --git a/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/EntityWorkflowGuardSendExternalIfNoPublicViewTest.php b/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/EntityWorkflowGuardSendExternalIfNoPublicViewTest.php
index 823c47725..a52613810 100644
--- a/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/EntityWorkflowGuardSendExternalIfNoPublicViewTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/EntityWorkflowGuardSendExternalIfNoPublicViewTest.php
@@ -33,7 +33,7 @@ use Symfony\Component\Workflow\Workflow;
*/
class EntityWorkflowGuardSendExternalIfNoPublicViewTest extends TestCase
{
- public function testGuardSendExternalIfNoStoredObjectWithNoStoredObject()
+ public function testGuardSendExternalIfNoStoredObjectWithNoStoredObject(): void
{
$entityWorkflow = new EntityWorkflow();
$entityWorkflow->setWorkflowName('dummy');
@@ -49,7 +49,7 @@ class EntityWorkflowGuardSendExternalIfNoPublicViewTest extends TestCase
self::assertTrue($workflow->can($entityWorkflow, 'to_other'));
}
- public function testGuardSendExternalIfNoStoredObjectWithStoredObject()
+ public function testGuardSendExternalIfNoStoredObjectWithStoredObject(): void
{
$entityWorkflow = new EntityWorkflow();
$entityWorkflow->setWorkflowName('dummy');
diff --git a/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/EntityWorkflowGuardUnsignedTransitionTest.php b/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/EntityWorkflowGuardUnsignedTransitionTest.php
index 6a27e723a..ece943556 100644
--- a/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/EntityWorkflowGuardUnsignedTransitionTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Workflow/EventSubscriber/EntityWorkflowGuardUnsignedTransitionTest.php
@@ -46,7 +46,7 @@ class EntityWorkflowGuardUnsignedTransitionTest extends TestCase
/**
* @dataProvider guardWaitingForSignatureWithoutPermissionToApplyAllTransitionsProvider
*/
- public function testGuardWaitingForSignatureWithoutPermissionToApplyAllTransitions(EntityWorkflow $entityWorkflow, string $transition, array $expectedErrors, array $expectedParameters, string $message)
+ public function testGuardWaitingForSignatureWithoutPermissionToApplyAllTransitions(EntityWorkflow $entityWorkflow, string $transition, array $expectedErrors, array $expectedParameters, string $message): void
{
$chillEntityRender = $this->prophesize(ChillEntityRenderManagerInterface::class);
$chillEntityRender->renderString(Argument::type('object'), Argument::type('array'))->will(fn ($args) => spl_object_hash($args[0]));
@@ -78,7 +78,7 @@ class EntityWorkflowGuardUnsignedTransitionTest extends TestCase
/**
* @dataProvider guardWaitingForSignatureWithPermissionToApplyAllTransitionsProvider
*/
- public function testGuardWaitingForSignatureWithPermissionToApplyAllTransitions(EntityWorkflow $entityWorkflow, string $transition, bool $expectIsGranted, string $message)
+ public function testGuardWaitingForSignatureWithPermissionToApplyAllTransitions(EntityWorkflow $entityWorkflow, string $transition, bool $expectIsGranted, string $message): void
{
$chillEntityRender = $this->prophesize(ChillEntityRenderManagerInterface::class);
$chillEntityRender->renderString(Argument::type('object'), Argument::type('array'))->will(fn ($args) => spl_object_hash($args[0]));
diff --git a/src/Bundle/ChillMainBundle/Tests/Workflow/SignatureStepStateChangerTest.php b/src/Bundle/ChillMainBundle/Tests/Workflow/SignatureStepStateChangerTest.php
index 0950ecba2..2927178a9 100644
--- a/src/Bundle/ChillMainBundle/Tests/Workflow/SignatureStepStateChangerTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Workflow/SignatureStepStateChangerTest.php
@@ -40,7 +40,7 @@ use Symfony\Component\Workflow\WorkflowInterface;
*/
class SignatureStepStateChangerTest extends TestCase
{
- public function testMarkSignatureAsSignedScenarioWhichExpectsTransitionSignatureWithPerson()
+ public function testMarkSignatureAsSignedScenarioWhichExpectsTransitionSignatureWithPerson(): void
{
$entityWorkflow = new EntityWorkflow();
$entityWorkflow->setWorkflowName('dummy');
@@ -92,7 +92,7 @@ class SignatureStepStateChangerTest extends TestCase
self::assertNotNull($signatures[1]->getStateDate());
}
- public function testMarkSignatureAsSignedScenarioWhichExpectsTransitionSignatureWithUser()
+ public function testMarkSignatureAsSignedScenarioWhichExpectsTransitionSignatureWithUser(): void
{
$entityWorkflow = new EntityWorkflow();
$entityWorkflow->setWorkflowName('dummy');
@@ -131,7 +131,7 @@ class SignatureStepStateChangerTest extends TestCase
self::assertNotNull($signatures[0]->getStateDate());
}
- public function testMarkSignatureAsSignedScenarioWithoutRequiredMetadata()
+ public function testMarkSignatureAsSignedScenarioWithoutRequiredMetadata(): void
{
$entityWorkflow = new EntityWorkflow();
$entityWorkflow->setWorkflowName('dummy');
diff --git a/src/Bundle/ChillMainBundle/Tests/Workflow/Validator/TransitionHasSignerIfSignatureValidatorTest.php b/src/Bundle/ChillMainBundle/Tests/Workflow/Validator/TransitionHasSignerIfSignatureValidatorTest.php
index 9b385d4cb..6c2a572a8 100644
--- a/src/Bundle/ChillMainBundle/Tests/Workflow/Validator/TransitionHasSignerIfSignatureValidatorTest.php
+++ b/src/Bundle/ChillMainBundle/Tests/Workflow/Validator/TransitionHasSignerIfSignatureValidatorTest.php
@@ -139,7 +139,7 @@ class TransitionHasSignerIfSignatureValidatorTest extends ConstraintValidatorTes
self::assertNoViolation();
}
- protected function createValidator()
+ protected function createValidator(): \Symfony\Component\Validator\ConstraintValidatorInterface
{
return new TransitionHasSignerIfSignatureValidator($this->buildRegistry());
}
diff --git a/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php b/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php
index 53d8faa16..375640ec2 100644
--- a/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php
+++ b/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php
@@ -47,7 +47,7 @@ class TimelineBuilder
* @param string $context the context of the service
* @param string $id the
*/
- public function addProvider($context, $id, TimelineProviderInterface $provider)
+ public function addProvider($context, $id, TimelineProviderInterface $provider): void
{
$this->providersByContext[$context][] = $id;
$this->providers[$id] = $provider;
@@ -113,7 +113,7 @@ class TimelineBuilder
*
* @return string an HTML representation, must be included using `|raw` filter
*/
- public function getTimelineHTML($context, array $args, $firstItem = 0, $number = 20)
+ public function getTimelineHTML($context, array $args, $firstItem = 0, $number = 20): string
{
[$union, $parameters] = $this->buildUnionQuery($context, $args);
@@ -261,7 +261,7 @@ class TimelineBuilder
*
* @return string the HTML representation of the timeline
*/
- private function render(array $fetched, array $entitiesByType, $context, array $args)
+ private function render(array $fetched, array $entitiesByType, $context, array $args): string
{
// add results to a pretty array
$timelineEntries = [];
diff --git a/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php b/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php
index 584e634ea..abe1ffb3f 100644
--- a/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php
+++ b/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php
@@ -38,7 +38,7 @@ class TimelineSingleQuery
);
}
- public static function fromArray(array $a)
+ public static function fromArray(array $a): \Chill\MainBundle\Timeline\TimelineSingleQuery
{
return new TimelineSingleQuery(
$a['id'] ?? null,
diff --git a/src/Bundle/ChillMainBundle/Util/CountriesInfo.php b/src/Bundle/ChillMainBundle/Util/CountriesInfo.php
index e368913e5..907d6e56c 100644
--- a/src/Bundle/ChillMainBundle/Util/CountriesInfo.php
+++ b/src/Bundle/ChillMainBundle/Util/CountriesInfo.php
@@ -54,7 +54,7 @@ class CountriesInfo
return self::$preparedData;
}
- public static function getContinentsCodes()
+ public static function getContinentsCodes(): array
{
self::prepareCacheCountriesByContinent();
@@ -353,7 +353,7 @@ class CountriesInfo
EOT;
}
- private static function prepareCacheCountriesByContinent()
+ private static function prepareCacheCountriesByContinent(): void
{
if (null === self::$cacheCountriesCodeByContinent) {
$data = self::getArrayCountriesData();
diff --git a/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php b/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php
index b91d7627a..65f848066 100644
--- a/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php
+++ b/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php
@@ -152,7 +152,7 @@ class DateRangeCovering
return \count($this->intersections) > 0;
}
- private function addToSequence($timestamp, ?int $start = null, ?int $end = null)
+ private function addToSequence($timestamp, ?int $start = null, ?int $end = null): void
{
if (!\array_key_exists($timestamp, $this->sequence)) {
$this->sequence[$timestamp] = ['s' => [], 'e' => []];
diff --git a/src/Bundle/ChillMainBundle/Validation/Constraint/PhonenumberConstraint.php b/src/Bundle/ChillMainBundle/Validation/Constraint/PhonenumberConstraint.php
index 2c20de854..0cfee04a5 100644
--- a/src/Bundle/ChillMainBundle/Validation/Constraint/PhonenumberConstraint.php
+++ b/src/Bundle/ChillMainBundle/Validation/Constraint/PhonenumberConstraint.php
@@ -35,7 +35,7 @@ class PhonenumberConstraint extends Constraint
$this->type = $type ?? 'any';
}
- public function validatedBy()
+ public function validatedBy(): string
{
return \Chill\MainBundle\Validation\Validator\ValidPhonenumber::class;
}
diff --git a/src/Bundle/ChillMainBundle/Validation/Constraint/RoleScopeScopePresenceConstraint.php b/src/Bundle/ChillMainBundle/Validation/Constraint/RoleScopeScopePresenceConstraint.php
index 7528908b7..e3a760834 100644
--- a/src/Bundle/ChillMainBundle/Validation/Constraint/RoleScopeScopePresenceConstraint.php
+++ b/src/Bundle/ChillMainBundle/Validation/Constraint/RoleScopeScopePresenceConstraint.php
@@ -23,12 +23,12 @@ class RoleScopeScopePresenceConstraint extends Constraint
public $messagePresenceRequired = 'The role "%role%" require to be associated with '
.'a scope.';
- public function getTargets()
+ public function getTargets(): string|array
{
return self::CLASS_CONSTRAINT;
}
- public function validatedBy()
+ public function validatedBy(): string
{
return 'role_scope_scope_presence';
}
diff --git a/src/Bundle/ChillMainBundle/Validation/Constraint/UserGroupDoNotExclude.php b/src/Bundle/ChillMainBundle/Validation/Constraint/UserGroupDoNotExclude.php
index 5ec688e5b..09c6b34f7 100644
--- a/src/Bundle/ChillMainBundle/Validation/Constraint/UserGroupDoNotExclude.php
+++ b/src/Bundle/ChillMainBundle/Validation/Constraint/UserGroupDoNotExclude.php
@@ -19,12 +19,12 @@ class UserGroupDoNotExclude extends Constraint
public string $message = 'The groups {{ excluded_groups }} do exclude themselves. Please choose one between them';
public string $code = 'e16c8226-0090-11ef-8560-f7239594db09';
- public function getTargets()
+ public function getTargets(): string|array
{
return [self::PROPERTY_CONSTRAINT];
}
- public function validatedBy()
+ public function validatedBy(): string
{
return \Chill\MainBundle\Validation\Validator\UserGroupDoNotExclude::class;
}
diff --git a/src/Bundle/ChillMainBundle/Validation/Constraint/UserUniqueEmailAndUsernameConstraint.php b/src/Bundle/ChillMainBundle/Validation/Constraint/UserUniqueEmailAndUsernameConstraint.php
index 130d75d31..77388a5f7 100644
--- a/src/Bundle/ChillMainBundle/Validation/Constraint/UserUniqueEmailAndUsernameConstraint.php
+++ b/src/Bundle/ChillMainBundle/Validation/Constraint/UserUniqueEmailAndUsernameConstraint.php
@@ -20,12 +20,12 @@ class UserUniqueEmailAndUsernameConstraint extends Constraint
public $messageDuplicateUsername = 'A user with the same or a close username already exists';
- public function getTargets()
+ public function getTargets(): string|array
{
return [self::CLASS_CONSTRAINT];
}
- public function validatedBy()
+ public function validatedBy(): string
{
return UserUniqueEmailAndUsername::class;
}
diff --git a/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php b/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php
index 0bbf1d373..cf3c86856 100644
--- a/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php
+++ b/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php
@@ -23,7 +23,7 @@ class RoleScopeScopePresence extends ConstraintValidator
{
public function __construct(private readonly RoleProvider $roleProvider, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) {}
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (!$value instanceof RoleScope) {
throw new \RuntimeException('The validated object is not an instance of roleScope');
diff --git a/src/Bundle/ChillMainBundle/Validation/Validator/UserGroupDoNotExclude.php b/src/Bundle/ChillMainBundle/Validation/Validator/UserGroupDoNotExclude.php
index 9bd7167c7..81d49698b 100644
--- a/src/Bundle/ChillMainBundle/Validation/Validator/UserGroupDoNotExclude.php
+++ b/src/Bundle/ChillMainBundle/Validation/Validator/UserGroupDoNotExclude.php
@@ -22,7 +22,7 @@ final class UserGroupDoNotExclude extends ConstraintValidator
{
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (!$constraint instanceof \Chill\MainBundle\Validation\Constraint\UserGroupDoNotExclude) {
throw new UnexpectedTypeException($constraint, UserGroupDoNotExclude::class);
diff --git a/src/Bundle/ChillMainBundle/Validation/Validator/UserUniqueEmailAndUsername.php b/src/Bundle/ChillMainBundle/Validation/Validator/UserUniqueEmailAndUsername.php
index a5a16cee0..ae29a573a 100644
--- a/src/Bundle/ChillMainBundle/Validation/Validator/UserUniqueEmailAndUsername.php
+++ b/src/Bundle/ChillMainBundle/Validation/Validator/UserUniqueEmailAndUsername.php
@@ -28,7 +28,7 @@ class UserUniqueEmailAndUsername extends ConstraintValidator
$this->em = $em;
}
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (!$value instanceof User) {
throw new \UnexpectedValueException('This validation should happens only on class '.User::class);
diff --git a/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php b/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php
index 0c02885ad..c010fed8a 100644
--- a/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php
+++ b/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php
@@ -24,7 +24,7 @@ final class ValidPhonenumber extends ConstraintValidator
* @param string $value
* @param \Chill\MainBundle\Validation\Constraint\PhonenumberConstraint $constraint
*/
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (false === $this->phonenumberHelper->isPhonenumberValidationConfigured()) {
$this->logger->debug('[phonenumber] skipping validation due to not configured helper');
diff --git a/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistency.php b/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistency.php
index 3c283a96e..71e2febce 100644
--- a/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistency.php
+++ b/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistency.php
@@ -24,17 +24,17 @@ class UserCircleConsistency extends Constraint
public $role;
- public function getDefaultOption()
+ public function getDefaultOption(): ?string
{
return 'role';
}
- public function getRequiredOptions()
+ public function getRequiredOptions(): array
{
return ['role'];
}
- public function getTargets()
+ public function getTargets(): string|array
{
return self::CLASS_CONSTRAINT;
}
diff --git a/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php b/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php
index a18af30d4..397964d78 100644
--- a/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php
+++ b/src/Bundle/ChillMainBundle/Validator/Constraints/Entity/UserCircleConsistencyValidator.php
@@ -31,7 +31,7 @@ class UserCircleConsistencyValidator extends ConstraintValidator
* @param object $value
* @param UserCircleConsistency $constraint
*/
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
/** @var \Chill\MainBundle\Entity\User $user */
$user = \call_user_func([$value, $constraint->getUserFunction]);
diff --git a/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraint.php b/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraint.php
index 84eed7b93..e996b2c51 100644
--- a/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraint.php
+++ b/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraint.php
@@ -22,17 +22,17 @@ class ExportElementConstraint extends Constraint
{
public $element;
- public function getRequiredOptions()
+ public function getRequiredOptions(): array
{
return ['element'];
}
- public function getTargets()
+ public function getTargets(): string|array
{
return self::PROPERTY_CONSTRAINT;
}
- public function validatedBy()
+ public function validatedBy(): string
{
return ExportElementConstraintValidator::class;
}
diff --git a/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraintValidator.php b/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraintValidator.php
index 7db1f64dc..96e082e6b 100644
--- a/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraintValidator.php
+++ b/src/Bundle/ChillMainBundle/Validator/Constraints/Export/ExportElementConstraintValidator.php
@@ -21,7 +21,7 @@ use Symfony\Component\Validator\ConstraintValidator;
*/
class ExportElementConstraintValidator extends ConstraintValidator
{
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if ($constraint->element instanceof ExportElementValidatedInterface) {
if (true === $value['enabled']) {
diff --git a/src/Bundle/ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php b/src/Bundle/ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php
index 8a6474034..7b551215a 100644
--- a/src/Bundle/ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php
+++ b/src/Bundle/ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php
@@ -57,7 +57,7 @@ final readonly class WorkflowByUserCounter implements NotificationCounterInterfa
return $this->workflowStepRepository->countUnreadByUser($user);
}
- public static function getSubscribedEvents()
+ public static function getSubscribedEvents(): array
{
return [
'workflow.leave' => 'resetWorkflowCache',
diff --git a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/BlockSignatureOnRelatedEntityWithoutAnyStoredObjectGuard.php b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/BlockSignatureOnRelatedEntityWithoutAnyStoredObjectGuard.php
index 44f9b6173..ee007ce44 100644
--- a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/BlockSignatureOnRelatedEntityWithoutAnyStoredObjectGuard.php
+++ b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/BlockSignatureOnRelatedEntityWithoutAnyStoredObjectGuard.php
@@ -21,7 +21,7 @@ final readonly class BlockSignatureOnRelatedEntityWithoutAnyStoredObjectGuard im
{
public function __construct(private EntityWorkflowManager $entityWorkflowManager) {}
- public static function getSubscribedEvents()
+ public static function getSubscribedEvents(): array
{
return [
'workflow.guard' => [
diff --git a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowGuardSendExternalIfNoPublicView.php b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowGuardSendExternalIfNoPublicView.php
index 558d7b0ab..329561375 100644
--- a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowGuardSendExternalIfNoPublicView.php
+++ b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowGuardSendExternalIfNoPublicView.php
@@ -23,14 +23,14 @@ final readonly class EntityWorkflowGuardSendExternalIfNoPublicView implements Ev
{
public function __construct(private Registry $registry, private EntityWorkflowManager $entityWorkflowManager) {}
- public static function getSubscribedEvents()
+ public static function getSubscribedEvents(): array
{
return ['workflow.guard' => [
['guardSendExternalIfNoStoredObject', 0],
]];
}
- public function guardSendExternalIfNoStoredObject(GuardEvent $event)
+ public function guardSendExternalIfNoStoredObject(GuardEvent $event): void
{
$entityWorkflow = $event->getSubject();
if (!$entityWorkflow instanceof EntityWorkflow) {
diff --git a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowGuardTransition.php b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowGuardTransition.php
index 5f9e0bca5..b1904b9fb 100644
--- a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowGuardTransition.php
+++ b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowGuardTransition.php
@@ -47,7 +47,7 @@ class EntityWorkflowGuardTransition implements EventSubscriberInterface
];
}
- public function guardEntityWorkflow(GuardEvent $event)
+ public function guardEntityWorkflow(GuardEvent $event): void
{
if (!$event->getSubject() instanceof EntityWorkflow) {
return;
diff --git a/src/Bundle/ChillMainBundle/Workflow/Validator/EntityWorkflowCreationValidator.php b/src/Bundle/ChillMainBundle/Workflow/Validator/EntityWorkflowCreationValidator.php
index 2020c7b52..4a04c2abf 100644
--- a/src/Bundle/ChillMainBundle/Workflow/Validator/EntityWorkflowCreationValidator.php
+++ b/src/Bundle/ChillMainBundle/Workflow/Validator/EntityWorkflowCreationValidator.php
@@ -26,7 +26,7 @@ class EntityWorkflowCreationValidator extends \Symfony\Component\Validator\Const
/**
* @param EntityWorkflow $value
*/
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (!$value instanceof EntityWorkflow) {
throw new UnexpectedValueException($value, EntityWorkflow::class);
diff --git a/src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValid.php b/src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValid.php
index 89d60fb05..ea57c75b1 100644
--- a/src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValid.php
+++ b/src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValid.php
@@ -19,7 +19,7 @@ class StepDestValid extends Constraint
public string $messageRequireDest = 'workflow.As the step is not final, dest are required';
- public function getTargets()
+ public function getTargets(): string|array
{
return [self::CLASS_CONSTRAINT];
}
diff --git a/src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValidValidator.php b/src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValidValidator.php
index 37543aa6e..94edbf08f 100644
--- a/src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValidValidator.php
+++ b/src/Bundle/ChillMainBundle/Workflow/Validator/StepDestValidValidator.php
@@ -24,7 +24,7 @@ class StepDestValidValidator extends ConstraintValidator
*
* @return void
*/
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (!$constraint instanceof StepDestValid) {
throw new UnexpectedTypeException($constraint, StepDestValid::class);
diff --git a/src/Bundle/ChillMainBundle/Workflow/Validator/TransitionHasDestUserIfRequiredValidator.php b/src/Bundle/ChillMainBundle/Workflow/Validator/TransitionHasDestUserIfRequiredValidator.php
index f9583320e..92d7d10a3 100644
--- a/src/Bundle/ChillMainBundle/Workflow/Validator/TransitionHasDestUserIfRequiredValidator.php
+++ b/src/Bundle/ChillMainBundle/Workflow/Validator/TransitionHasDestUserIfRequiredValidator.php
@@ -22,7 +22,7 @@ final class TransitionHasDestUserIfRequiredValidator extends ConstraintValidator
{
public function __construct(private readonly Registry $registry) {}
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (!$constraint instanceof TransitionHasDestUserIfRequired) {
throw new UnexpectedTypeException($constraint, TransitionHasDestUserIfRequired::class);
diff --git a/src/Bundle/ChillMainBundle/Workflow/Validator/TransitionHasDestineeIfIsSentExternalValidator.php b/src/Bundle/ChillMainBundle/Workflow/Validator/TransitionHasDestineeIfIsSentExternalValidator.php
index 869d71f0d..7483d9309 100644
--- a/src/Bundle/ChillMainBundle/Workflow/Validator/TransitionHasDestineeIfIsSentExternalValidator.php
+++ b/src/Bundle/ChillMainBundle/Workflow/Validator/TransitionHasDestineeIfIsSentExternalValidator.php
@@ -21,7 +21,7 @@ final class TransitionHasDestineeIfIsSentExternalValidator extends ConstraintVal
{
public function __construct(private readonly Registry $registry) {}
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (!$constraint instanceof TransitionHasDestineeIfIsSentExternal) {
throw new UnexpectedTypeException($constraint, TransitionHasDestineeIfIsSentExternal::class);
diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/PersonAddressMoveEventSubscriber.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/PersonAddressMoveEventSubscriber.php
index 64d2b8f12..0da1c969a 100644
--- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/PersonAddressMoveEventSubscriber.php
+++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/PersonAddressMoveEventSubscriber.php
@@ -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()
diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php
index 084fe8ff5..a59fa9925 100644
--- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php
+++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php
@@ -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()) {
diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListener.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListener.php
index 6e6ea5ef8..0a40f5df3 100644
--- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListener.php
+++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListener.php
@@ -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);
}
diff --git a/src/Bundle/ChillPersonBundle/CRUD/Controller/EntityPersonCRUDController.php b/src/Bundle/ChillPersonBundle/CRUD/Controller/EntityPersonCRUDController.php
index 74f2d44fa..6a4bcbb56 100644
--- a/src/Bundle/ChillPersonBundle/CRUD/Controller/EntityPersonCRUDController.php
+++ b/src/Bundle/ChillPersonBundle/CRUD/Controller/EntityPersonCRUDController.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/ChillPersonBundle.php b/src/Bundle/ChillPersonBundle/ChillPersonBundle.php
index 89477a47b..53dfa98d5 100644
--- a/src/Bundle/ChillPersonBundle/ChillPersonBundle.php
+++ b/src/Bundle/ChillPersonBundle/ChillPersonBundle.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php b/src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php
index 19d64c488..d77542d78 100644
--- a/src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php
+++ b/src/Bundle/ChillPersonBundle/Command/ChillPersonMoveCommand.php
@@ -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"';
diff --git a/src/Bundle/ChillPersonBundle/Command/ImportSocialWorkMetadata.php b/src/Bundle/ChillPersonBundle/Command/ImportSocialWorkMetadata.php
index 636330138..249299888 100644
--- a/src/Bundle/ChillPersonBundle/Command/ImportSocialWorkMetadata.php
+++ b/src/Bundle/ChillPersonBundle/Command/ImportSocialWorkMetadata.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/Command/RemoveOldDraftAccompanyingPeriodCommand.php b/src/Bundle/ChillPersonBundle/Command/RemoveOldDraftAccompanyingPeriodCommand.php
index 43a74a5e1..d23dafc7c 100644
--- a/src/Bundle/ChillPersonBundle/Command/RemoveOldDraftAccompanyingPeriodCommand.php
+++ b/src/Bundle/ChillPersonBundle/Command/RemoveOldDraftAccompanyingPeriodCommand.php
@@ -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';
diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php
index ac7c7dec4..531a5cb24 100644
--- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php
index 79b0b8046..bac95dd58 100644
--- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php
@@ -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();
diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
index 523d5a875..91b58f4ad 100644
--- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
@@ -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(),
]);
diff --git a/src/Bundle/ChillPersonBundle/Controller/AdminController.php b/src/Bundle/ChillPersonBundle/Controller/AdminController.php
index 970010e20..8519f9eee 100644
--- a/src/Bundle/ChillPersonBundle/Controller/AdminController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/AdminController.php
@@ -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');
}
diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php
index 05e73ad2a..8a09bed38 100644
--- a/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php
@@ -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
diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php
index d63c5aea9..4c9b76757 100644
--- a/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php
@@ -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
diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php
index fd35ef31b..d80e66cef 100644
--- a/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php
@@ -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');
diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php b/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php
index 13b1fc7ca..fcc00c1e9 100644
--- a/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php
@@ -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)
diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonController.php b/src/Bundle/ChillPersonBundle/Controller/PersonController.php
index 9f35e1b5c..a5cf46bca 100644
--- a/src/Bundle/ChillPersonBundle/Controller/PersonController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/PersonController.php
@@ -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);
}
diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php b/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
index 348a3495d..bcffbdfc1 100644
--- a/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php b/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php
index 8332d468e..9613322fc 100644
--- a/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php
@@ -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();
diff --git a/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php b/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php
index 4e9e5a228..c407d70d7 100644
--- a/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
index 6b341e926..ba563ef66 100644
--- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php b/src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php
index 0cd86eb5b..0db62acfb 100644
--- a/src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php
@@ -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)
diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php
index 5bff01f20..9d39f2ac0 100644
--- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php
+++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php
@@ -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)
diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHousehold.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHousehold.php
index fdefa5dc8..3dd9b952a 100644
--- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHousehold.php
+++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadHousehold.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php
index d5299af14..c75792b32 100644
--- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php
+++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadPeople.php
@@ -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())
diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php
index 40393f79e..f19e24b0f 100644
--- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php
+++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php
@@ -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']);
diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/CompilerPass/AccompanyingPeriodTimelineCompilerPass.php b/src/Bundle/ChillPersonBundle/DependencyInjection/CompilerPass/AccompanyingPeriodTimelineCompilerPass.php
index c010196f8..745ad12bf 100644
--- a/src/Bundle/ChillPersonBundle/DependencyInjection/CompilerPass/AccompanyingPeriodTimelineCompilerPass.php
+++ b/src/Bundle/ChillPersonBundle/DependencyInjection/CompilerPass/AccompanyingPeriodTimelineCompilerPass.php
@@ -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')) {
diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php
index 2ebc1a859..840d87f3b 100644
--- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php
+++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
index d96814e1a..7537fd716 100644
--- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
+++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php
@@ -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);
}
diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php
index 748174e19..77d723169 100644
--- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php
+++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php
@@ -140,7 +140,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
/**
* @return Collection
*/
- public function getDocuments()
+ public function getDocuments(): \Doctrine\Common\Collections\Collection
{
return $this->documents;
}
diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php
index 50cd3a88c..2f2b629ee 100644
--- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php
+++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php
@@ -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;
}
diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php
index 498aa44e4..9da591d49 100644
--- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php
+++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriodParticipation.php
@@ -99,7 +99,7 @@ class AccompanyingPeriodParticipation
return $this;
}
- private function checkSameStartEnd()
+ private function checkSameStartEnd(): void
{
if ($this->endDate === $this->startDate) {
$this->accompanyingPeriod->removeParticipation($this);
diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php
index dc67f6b93..d04fee2d1 100644
--- a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php
+++ b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php
index 5d57f11af..aac4b528e 100644
--- a/src/Bundle/ChillPersonBundle/Entity/Person.php
+++ b/src/Bundle/ChillPersonBundle/Entity/Person.php
@@ -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
*/
- #[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
*/
- #[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
*/
- #[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
*/
- #[ORM\OneToMany(targetEntity: Charge::class, mappedBy: 'person')]
+ #[ORM\OneToMany(mappedBy: 'person', targetEntity: Charge::class)]
private Collection $budgetCharges;
/**
* @var Collection
*/
- #[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
*/
- 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);
}
diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/AbstractPersonResource.php b/src/Bundle/ChillPersonBundle/Entity/Person/AbstractPersonResource.php
index cfdf88555..1d2a769e9 100644
--- a/src/Bundle/ChillPersonBundle/Entity/Person/AbstractPersonResource.php
+++ b/src/Bundle/ChillPersonBundle/Entity/Person/AbstractPersonResource.php
@@ -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)) {
diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php
index 4a4aaae1a..ba2187f1b 100644
--- a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php
+++ b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php
@@ -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;
}
diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php b/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php
index 323752e54..48817c41c 100644
--- a/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php
+++ b/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php
@@ -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;
}
diff --git a/src/Bundle/ChillPersonBundle/EventListener/PersonEventListener.php b/src/Bundle/ChillPersonBundle/EventListener/PersonEventListener.php
index e94c6e923..6d996451a 100644
--- a/src/Bundle/ChillPersonBundle/EventListener/PersonEventListener.php
+++ b/src/Bundle/ChillPersonBundle/EventListener/PersonEventListener.php
@@ -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);
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php
index 522b2ecdd..2cb96a50a 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php
index ab6bb6170..0978b473d 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php
index 259d5fb66..afedb6b34 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php
index 0e3e5f735..a2364aefb 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php
index 94202d958..758234da1 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php
index f5dc99115..87a777f64 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php
@@ -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),
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php
index 0217166d2..f6b65c1df 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php
index a90896ccd..707f8bdf2 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php
index fde825a88..dc345ebb9 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php
@@ -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, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php
index de42039c1..ac6a7e626 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php
index bac34096f..d77eb85e6 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php
@@ -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
{
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php
index d0d121c2a..3882afae2 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php
index 070122f2e..be07c554c 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php
index 3859eded5..c437f1d84 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php
index 2df724517..dc72e21d0 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php
@@ -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, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php
index 30ac95027..181400147 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php
@@ -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, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php
index ec168ceaf..3a663e315 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php
index 06dbc906d..f245bf51b 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php
index dd33603b4..2f10bb91b 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php
@@ -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
{
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php
index 7abad2602..428a3eb14 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php
index 8c0cbfbd5..8bfd0920d 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php
index a9439a63f..83c357c23 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php
@@ -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, []);
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php
index 903d3c9f4..c55790ffa 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php
@@ -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, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php
index 321801e28..95e6dae3c 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php
@@ -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(
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php
index 6b6a5ce4a..74698a124 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php
@@ -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)
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php
index fbd80c7a5..59926c6b6 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php
index b3be83da2..7d3801713 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php
@@ -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)
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php
index 07c182421..30778a913 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php
@@ -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,
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php
index 9193dc5a9..a2d444f5e 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php
@@ -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,
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php
index e797d5ae7..f6f512d58 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php
@@ -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,
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php
index 9ff2ad50a..3a61659c5 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php
index 4dfddab81..a6e2c6ead 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php
index e013c2f0f..18a1ffc18 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php
@@ -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, []);
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php
index 3dc3a1398..1b188d111 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php
@@ -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, []);
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php
index 8bdc74f7f..187fd7617 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php
@@ -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
{
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php
index 2ca286b57..6a324e48d 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php
@@ -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')
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php
index af1018f6e..c7ff96afb 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php
@@ -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',
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php
index cd48a3f51..ddfd6cff3 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php
@@ -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';
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php
index b8d204dc5..4232e30a0 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php
@@ -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')
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php
index 359e48cf3..34a94064e 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php
@@ -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
{
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php
index f7ae26dca..8e5b0f01d 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php
@@ -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
{
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php
index 8ce51a3ab..26790ec7f 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php
@@ -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, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php
index eb1e52d9b..f1763c325 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php
@@ -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')
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php
index 1555a5a12..45be89eb0 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php
index 9daca5b34..e29b5ec47 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php
@@ -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')
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php
index a8ec614d4..1007a2e44 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php
index 9abf5c1e7..687aad141 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php
index 46cc85de6..514ac6118 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php
index c1b7c248b..bcc62f05d 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php
index b38096079..8e00ea050 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php
index ce1e381f2..06e7fbc9e 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php
index e1549f315..358a84e3f 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php
index f58246a25..732386e1c 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php
@@ -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;
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php
index 282a36db4..fbd8a7846 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php
@@ -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
{
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php
index 7543da857..3155af9f9 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php
@@ -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',
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php
index 63a037f21..3faeb0302 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php
index 0bedaf267..328be839f 100644
--- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php
+++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php
@@ -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
{
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php
index a65dcb217..52a2ee8da 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php
@@ -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, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php
index a1e855b0e..73de0fd4d 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php
@@ -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
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php
index ef000603a..f3622c92b 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php
@@ -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.
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php
index 7d0e52169..56f196dc8 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php
@@ -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);
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php
index 8f63b1584..b35f95160 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php
@@ -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, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php
index fe200ca02..f4e4d9963 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php
@@ -93,7 +93,7 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnWork implements
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('calc_date', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php
index 71d9924be..0c62be179 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php
@@ -83,7 +83,7 @@ final readonly class ListEvaluation implements ListInterface, GroupedExportInter
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('calc_date', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php
index b69330002..1bc548ede 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php
@@ -57,7 +57,7 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('calc_date', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php
index 2b8bfad20..2ccba7187 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php
@@ -46,7 +46,7 @@ class ListPerson implements ListInterface, GroupedExportInterface
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
// add a date field for addresses
$builder->add('address_date', ChillDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php
index 69d00a612..a3cb2b114 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php
@@ -58,7 +58,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
'://'.$routeParameters['host'];
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('precision', NumberType::class, [
'label' => 'Precision',
@@ -151,7 +151,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
];
}
- protected function getResult($data = [])
+ protected function getResult($data = []): array
{
$precision = $data['precision'] ?? self::PRECISION_DEFAULT_VALUE;
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php
index 4a44f2dc5..32bb07130 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php
@@ -48,7 +48,7 @@ final readonly class ListPersonHavingAccompanyingPeriod implements ListInterface
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('address_date_rolling', PickRollingDateType::class, [
'label' => 'Data valid at this date',
@@ -76,12 +76,12 @@ final readonly class ListPersonHavingAccompanyingPeriod implements ListInterface
return 'Exports of persons';
}
- public function getLabels($key, array $values, $data)
+ public function getLabels($key, array $values, $data): callable
{
return $this->listPersonHelper->getLabels($key, $values, $data);
}
- public function getQueryKeys($data)
+ public function getQueryKeys($data): array
{
return $this->listPersonHelper->getAllKeys();
}
diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php
index 42a2205a1..b1411d711 100644
--- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php
+++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php
@@ -43,7 +43,7 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte
private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper,
) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('address_date', PickRollingDateType::class, [
'label' => 'Data valid at this date',
@@ -80,7 +80,7 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte
return $this->listAccompanyingPeriodHelper->getLabels($key, $values, $data);
}
- public function getQueryKeys($data)
+ public function getQueryKeys($data): array
{
return array_merge(
$this->listPersonHelper->getAllKeys(),
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php
index 6bcb4f8b8..3b5e3b4cf 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php
@@ -29,7 +29,7 @@ class ActiveOnDateFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -59,7 +59,7 @@ class ActiveOnDateFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('on_date', PickRollingDateType::class, []);
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php
index 3b7c4fe25..b2a9cb7a9 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php
@@ -28,7 +28,7 @@ class ActiveOneDayBetweenDatesFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = "OVERLAPSI (acp.openingDate, acp.closingDate), (:datefrom, :dateto) = 'TRUE'";
@@ -48,7 +48,7 @@ class ActiveOneDayBetweenDatesFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_from', PickRollingDateType::class, [])
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php
index 915a2c9e6..7ca4aabab 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php
@@ -27,7 +27,7 @@ class AdministrativeLocationFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->in('acp.administrativeLocation', ':locations');
$qb
@@ -40,7 +40,7 @@ class AdministrativeLocationFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_locations', PickUserLocationType::class, [
'label' => 'Accepted locations',
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php
index 7fb032050..66a276c60 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php
@@ -29,7 +29,7 @@ class ClosingMotiveFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->in('acp.closingMotive', ':closingmotive');
@@ -49,7 +49,7 @@ class ClosingMotiveFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_closingmotives', EntityType::class, [
'class' => ClosingMotive::class,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php
index 4c8baf147..d30369540 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php
@@ -35,7 +35,7 @@ class ConfidentialFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->eq('acp.confidential', ':confidential');
@@ -55,7 +55,7 @@ class ConfidentialFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_confidentials', ChoiceType::class, [
'choices' => self::CHOICES,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php
index 4fa2c2d1d..9691b381a 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php
@@ -26,7 +26,7 @@ class CreatorFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('acp_creator', $qb->getAllAliases(), true)) {
$qb->join('acp.createdBy', 'acp_creator');
@@ -42,7 +42,7 @@ class CreatorFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('accepted_creators', PickUserDynamicType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php
index dd1264bd2..69e6dc725 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php
@@ -36,7 +36,7 @@ class CreatorJobFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -83,7 +83,7 @@ class CreatorJobFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('creator_job', EntityType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php
index 671b87407..97ef23d39 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php
@@ -35,7 +35,7 @@ class EmergencyFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->eq('acp.emergency', ':emergency');
@@ -55,7 +55,7 @@ class EmergencyFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_emergency', ChoiceType::class, [
'choices' => self::CHOICES,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php
index bec01c249..a3ee6a470 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php
@@ -29,7 +29,7 @@ class EvaluationFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('acpw', $qb->getAllAliases(), true)) {
$qb->join('acp.works', 'acpw');
@@ -53,7 +53,7 @@ class EvaluationFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_evaluations', EntityType::class, [
'class' => Evaluation::class,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php
index 7d6d90e64..1a8552e6c 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php
@@ -45,7 +45,7 @@ class GeographicalUnitStatFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$subQueryDql =
'SELECT
@@ -86,7 +86,7 @@ class GeographicalUnitStatFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_calc', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php
index 8a9f734aa..e4ac536b6 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php
@@ -33,7 +33,7 @@ final readonly class HandlingThirdPartyFilter implements FilterInterface
return 'export.filter.work.by_handling3party.title';
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('handling_3parties', PickThirdpartyDynamicType::class, [
'label' => 'export.filter.work.by_handling3party.pick_3parties',
@@ -67,7 +67,7 @@ final readonly class HandlingThirdPartyFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php
index 72bcce39e..7eb99064a 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php
@@ -29,7 +29,7 @@ class HasNoReferrerFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->andWhere('
@@ -54,7 +54,7 @@ class HasNoReferrerFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('calc_date', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php
index 778e4181a..48abe5284 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php
@@ -29,7 +29,7 @@ class HasTemporaryLocationFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->join('acp.locationHistories', 'acp_having_temporarily_location')
@@ -52,7 +52,7 @@ class HasTemporaryLocationFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('having_temporarily', ChoiceType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php
index 3eb8bbb24..5e28c41de 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php
@@ -35,7 +35,7 @@ class IntensityFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->eq('acp.intensity', ':intensity');
@@ -55,7 +55,7 @@ class IntensityFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_intensities', ChoiceType::class, [
'choices' => self::CHOICES,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php
index 60486371e..d33d74827 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php
@@ -33,7 +33,7 @@ final readonly class NotAssociatedWithAReferenceAddressFilter implements FilterI
return 'export.filter.course.not_having_address_reference.title';
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('date_calc', PickRollingDateType::class, [
'label' => 'export.filter.course.not_having_address_reference.adress_at',
@@ -62,7 +62,7 @@ final readonly class NotAssociatedWithAReferenceAddressFilter implements FilterI
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$k = 'acp_not_associated_ref_filter';
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php
index 1b85f6cd7..de392d4de 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php
@@ -29,7 +29,7 @@ class OpenBetweenDatesFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$clause = $qb->expr()->andX(
$qb->expr()->gte('acp.openingDate', ':datefrom'),
@@ -46,7 +46,7 @@ class OpenBetweenDatesFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_from', PickRollingDateType::class, [])
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php
index 617577cde..af73ba436 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php
@@ -29,7 +29,7 @@ class OriginFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->in('acp.origin', ':origin');
@@ -49,7 +49,7 @@ class OriginFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_origins', EntityType::class, [
'class' => Origin::class,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php
index 30f67f664..615a19c73 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php
@@ -35,7 +35,7 @@ class ReferrerFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->join('acp.userHistories', self::A)
@@ -63,7 +63,7 @@ class ReferrerFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('accepted_referrers', PickUserDynamicType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php
index 6116e968b..4b4febe64 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php
@@ -49,7 +49,7 @@ final readonly class ReferrerFilterBetweenDates implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$history = self::A;
$start = self::P;
@@ -74,7 +74,7 @@ final readonly class ReferrerFilterBetweenDates implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('accepted_referrers', PickUserDynamicType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php
index 0b7ce6994..07465d661 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php
@@ -38,7 +38,7 @@ final readonly class RequestorFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -107,7 +107,7 @@ final readonly class RequestorFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_choices', ChoiceType::class, [
'choices' => self::REQUESTOR_CHOICES,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php
index 545c35f5e..dbdbc749b 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php
@@ -38,7 +38,7 @@ final readonly class SocialActionFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -81,7 +81,7 @@ final readonly class SocialActionFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('accepted_socialactions', PickSocialActionType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php
index afcdd15bc..9f6e28d18 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php
@@ -40,7 +40,7 @@ class SocialIssueFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('acpsocialissue', $qb->getAllAliases(), true)) {
$qb->join('acp.socialIssues', 'acpsocialissue');
@@ -62,7 +62,7 @@ class SocialIssueFilter implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('accepted_socialissues', PickSocialIssueType::class, [
'multiple' => true,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php
index dfd627eda..d121f7a13 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php
@@ -46,7 +46,7 @@ class StepFilterBetweenDates implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$alias = 'acp_filter_by_step_between_dat_alias';
$steps = 'acp_filter_by_step_between_dat_steps';
@@ -71,7 +71,7 @@ class StepFilterBetweenDates implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('accepted_steps_multi', ChoiceType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php
index 8b36b1b5b..7c8055d98 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php
@@ -50,7 +50,7 @@ class StepFilterOnDate implements FilterInterface
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);
@@ -78,7 +78,7 @@ class StepFilterOnDate implements FilterInterface
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('accepted_steps_multi', ChoiceType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php
index c328e9b21..7068df3b1 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php
@@ -42,7 +42,7 @@ final readonly class UserJobFilter implements FilterInterface, DataTransformerIn
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -79,7 +79,7 @@ final readonly class UserJobFilter implements FilterInterface, DataTransformerIn
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('jobs', EntityType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php
index 3489b8cb3..d4b0197dd 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php
@@ -78,7 +78,7 @@ final readonly class UserScopeFilter implements FilterInterface, DataTransformer
return Declarations::ACP_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('scopes', EntityType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php
index 84a5814b3..c839ec44d 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php
@@ -40,7 +40,7 @@ final readonly class ByDateFilter implements FilterInterface
return 'export.filter.step_history.by_date.title';
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('start_date', PickRollingDateType::class, [
@@ -75,7 +75,7 @@ final readonly class ByDateFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$startDate = 'acp_step_history_by_date_start_filter';
$endDate = 'acp_step_history_by_date_end_filter';
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php
index 337c30a89..4e8bc334f 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php
@@ -30,7 +30,7 @@ final readonly class ByStepFilter implements FilterInterface
return 'export.filter.step_history.by_step.title';
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$steps = [
AccompanyingPeriod::STEP_CONFIRMED,
@@ -72,7 +72,7 @@ final readonly class ByStepFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb
->andWhere('acpstephistory.step IN (:acpstephistory_by_step_filter_steps)')
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php
index 20472420c..3b0c18e26 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php
@@ -29,7 +29,7 @@ final readonly class EvaluationTypeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$qb->andWhere(
$qb->expr()->in('workeval.evaluation', ':evaluationtype')
@@ -42,7 +42,7 @@ final readonly class EvaluationTypeFilter implements FilterInterface
return Declarations::EVAL_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$evaluations = $this->evaluationRepository->findAllActive();
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php
index 6094d56ee..542129a43 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php
@@ -32,7 +32,7 @@ class MaxDateFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (true === $data['maxdate']) {
$clause = $qb->expr()->isNotNull('workeval.maxDate');
@@ -48,7 +48,7 @@ class MaxDateFilter implements FilterInterface
return Declarations::EVAL_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('maxdate', ChoiceType::class, [
'choices' => self::MAXDATE_CHOICES,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php
index 8cd675abe..8376ab41b 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php
@@ -30,7 +30,7 @@ class AddressRefStatusFilter implements \Chill\MainBundle\Export\FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$subQuery =
'SELECT 1
@@ -62,7 +62,7 @@ class AddressRefStatusFilter implements \Chill\MainBundle\Export\FilterInterface
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_calc', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php
index aa97ad54c..ee2dd1936 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php
@@ -32,7 +32,7 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -70,7 +70,7 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('min_age', IntegerType::class, [
'label' => 'Minimum age',
@@ -109,7 +109,7 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface
return 'Filter by person\'s age';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
$min = $data['min_age'];
$max = $data['max_age'];
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php
index dd14c71ef..806d8577c 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php
@@ -31,7 +31,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->between(
@@ -62,7 +62,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('date_from', PickRollingDateType::class, [
'label' => 'Born after this date',
@@ -92,7 +92,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
return 'Filter by person\'s birthdate';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
$date_from = $data['date_from'];
$date_to = $data['date_to'];
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php
index e873a6598..f0457d0c4 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php
@@ -36,7 +36,7 @@ class ByHouseholdCompositionFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = 'person_by_household_compo_filter';
@@ -60,7 +60,7 @@ class ByHouseholdCompositionFilter implements FilterInterface
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('compositions', EntityType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php
index 82cda25ed..07a719c03 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php
@@ -30,7 +30,7 @@ class DeadOrAliveFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
@@ -83,7 +83,7 @@ class DeadOrAliveFilter implements FilterInterface
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('person_state', ChoiceType::class, [
'choices' => [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php
index 1bc32d9bb..0a8d74488 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php
@@ -31,7 +31,7 @@ class DeathdateFilter implements ExportElementValidatedInterface, FilterInterfac
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->between(
@@ -62,7 +62,7 @@ class DeathdateFilter implements ExportElementValidatedInterface, FilterInterfac
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('date_from', PickRollingDateType::class, [
'label' => 'Death after this date',
@@ -92,7 +92,7 @@ class DeathdateFilter implements ExportElementValidatedInterface, FilterInterfac
return 'Filter by person\'s deathdate';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
$date_from = $data['date_from'];
$date_to = $data['date_to'];
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php
index fc09e385a..081edd607 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php
@@ -41,7 +41,7 @@ class GenderFilter implements
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$isIn = $qb->expr()->in('person.gender', ':person_gender');
@@ -64,7 +64,7 @@ class GenderFilter implements
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$genderChoices = $this->genderRepository->findByActiveOrdered();
$choices = ['None' => null];
@@ -135,7 +135,7 @@ class GenderFilter implements
return 'Filter by person gender';
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
if (!\is_iterable($data['accepted_genders_entity']) || 0 === \count($data['accepted_genders_entity'])) {
$context->buildViolation('You should select an option')
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php
index e2041c3fa..c04c097ca 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php
@@ -34,7 +34,7 @@ class GeographicalUnitFilter implements \Chill\MainBundle\Export\FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$subQuery =
'SELECT 1
@@ -68,7 +68,7 @@ class GeographicalUnitFilter implements \Chill\MainBundle\Export\FilterInterface
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('date_calc', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php
index 6c4cdf802..17f66b563 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php
@@ -26,7 +26,7 @@ class MaritalStatusFilter implements FilterInterface
return null;
}
- public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data)
+ public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data): void
{
$qb->andWhere(
$qb->expr()->in('person.maritalStatus', ':maritalStatus')
@@ -39,7 +39,7 @@ class MaritalStatusFilter implements FilterInterface
return Declarations::PERSON_TYPE;
}
- public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder)
+ public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder): void
{
$builder->add('maritalStatus', EntityType::class, [
'class' => MaritalStatus::class,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php
index 4c83fafe3..6823cc921 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php
@@ -33,7 +33,7 @@ class NationalityFilter implements
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->in('person.nationality', ':person_nationality');
@@ -53,7 +53,7 @@ class NationalityFilter implements
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('nationalities', Select2CountryType::class, [
'placeholder' => 'Choose countries',
@@ -82,7 +82,7 @@ class NationalityFilter implements
return "Filter by person's nationality";
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
if (null === $data['nationalities']) {
$context->buildViolation('A nationality must be selected')
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php
index ea8e01baf..c040802c9 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php
@@ -33,7 +33,7 @@ class ResidentialAddressAtThirdpartyFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('resaddr', $qb->getAllAliases(), true)) {
$qb->join(ResidentialAddress::class, 'resaddr', Expr\Join::WITH, 'resaddr.person = person');
@@ -84,7 +84,7 @@ class ResidentialAddressAtThirdpartyFilter implements FilterInterface
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('thirdparty_cat', EntityType::class, [
'class' => ThirdPartyCategory::class,
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php
index 3c2d7a3a6..8af18a544 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php
@@ -30,7 +30,7 @@ class ResidentialAddressAtUserFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (!\in_array('resaddr', $qb->getAllAliases(), true)) {
$qb->join(ResidentialAddress::class, 'resaddr', Expr\Join::WITH, 'resaddr.person = person');
@@ -71,7 +71,7 @@ class ResidentialAddressAtUserFilter implements FilterInterface
return Declarations::PERSON_TYPE;
}
- public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder)
+ public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder): void
{
$builder->add('date_calc', PickRollingDateType::class, [
'label' => 'Date during which residential address was valid',
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php
index 289af5f07..46d28fe1f 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php
@@ -32,7 +32,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = 'with_participation_between_dates_filter';
@@ -54,7 +54,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('date_after', PickRollingDateType::class, [
'label' => 'export.filter.person.with_participation_between_dates.date_after',
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php
index c34c7eb40..b5b17689b 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php
@@ -31,7 +31,7 @@ class WithoutHouseholdComposition implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = 'person_by_household_no_compo_filter';
@@ -55,7 +55,7 @@ class WithoutHouseholdComposition implements FilterInterface
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('calc_date', PickRollingDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php
index d1e3e9b2f..72e7cdb4c 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php
@@ -32,7 +32,7 @@ final readonly class WithoutParticipationBetweenDatesFilter implements FilterInt
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = 'without_participation_between_dates_filter';
@@ -56,7 +56,7 @@ final readonly class WithoutParticipationBetweenDatesFilter implements FilterInt
return Declarations::PERSON_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder->add('date_after', PickRollingDateType::class, [
'label' => 'export.filter.person.without_participation_between_dates.date_after',
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php
index c990e658e..35d600f32 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php
@@ -28,7 +28,7 @@ class CreatorFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -43,7 +43,7 @@ class CreatorFilter implements FilterInterface
return Declarations::SOCIAL_WORK_ACTION_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('creators', PickUserDynamicType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php
index 3087d156e..76b95346f 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php
@@ -36,7 +36,7 @@ class CreatorJobFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ class CreatorJobFilter implements FilterInterface
return Declarations::SOCIAL_WORK_ACTION_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('jobs', EntityType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php
index 414740c7a..afc12ad4a 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php
@@ -36,7 +36,7 @@ class CreatorScopeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -65,7 +65,7 @@ class CreatorScopeFilter implements FilterInterface
return Declarations::SOCIAL_WORK_ACTION_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('scopes', EntityType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php
index 25e762a9c..249021d78 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php
@@ -38,7 +38,7 @@ class JobFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -57,7 +57,7 @@ class JobFilter implements FilterInterface
return Declarations::SOCIAL_WORK_ACTION_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('job', EntityType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php
index 4d456fdb2..81cfae168 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php
@@ -31,7 +31,7 @@ final readonly class ReferrerFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -53,7 +53,7 @@ final readonly class ReferrerFilter implements FilterInterface
return Declarations::SOCIAL_WORK_ACTION_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('accepted_agents', PickUserDynamicType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php
index 9f2041aaa..33f6d2fb7 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php
@@ -38,7 +38,7 @@ class ScopeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
$p = self::PREFIX;
@@ -56,7 +56,7 @@ class ScopeFilter implements FilterInterface
return Declarations::SOCIAL_WORK_ACTION_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('scope', EntityType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php
index c84ed7f40..7a6fc4c7a 100644
--- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php
+++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php
@@ -33,7 +33,7 @@ class SocialWorkTypeFilter implements FilterInterface
return null;
}
- public function alterQuery(QueryBuilder $qb, $data)
+ public function alterQuery(QueryBuilder $qb, $data): void
{
if (\count($data['actionType']) > 0) {
$qb
@@ -73,7 +73,7 @@ class SocialWorkTypeFilter implements FilterInterface
return Declarations::SOCIAL_WORK_ACTION_TYPE;
}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('actionType', HiddenType::class)
diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php
index f66a8b039..a1bf97f93 100644
--- a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php
+++ b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php
@@ -90,7 +90,7 @@ final readonly class ListAccompanyingPeriodHelper
private CenterRepository $centerRepository,
) {}
- public function getQueryKeys($data)
+ public function getQueryKeys($data): array
{
return array_merge(
ListAccompanyingPeriodHelper::FIELDS,
diff --git a/src/Bundle/ChillPersonBundle/Form/AccompanyingCourseCommentType.php b/src/Bundle/ChillPersonBundle/Form/AccompanyingCourseCommentType.php
index 897fa36c0..ac7f5342e 100644
--- a/src/Bundle/ChillPersonBundle/Form/AccompanyingCourseCommentType.php
+++ b/src/Bundle/ChillPersonBundle/Form/AccompanyingCourseCommentType.php
@@ -22,7 +22,7 @@ class AccompanyingCourseCommentType extends AbstractType
/**
* @return void
*/
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('content', ChillTextareaType::class, [
'required' => false,
@@ -33,7 +33,7 @@ class AccompanyingCourseCommentType extends AbstractType
/**
* @return void
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefault('class', Comment::class);
}
diff --git a/src/Bundle/ChillPersonBundle/Form/AccompanyingCourseType.php b/src/Bundle/ChillPersonBundle/Form/AccompanyingCourseType.php
index 450f8a15b..6c55fe6b1 100644
--- a/src/Bundle/ChillPersonBundle/Form/AccompanyingCourseType.php
+++ b/src/Bundle/ChillPersonBundle/Form/AccompanyingCourseType.php
@@ -18,7 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class AccompanyingCourseType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add(
'closingDate',
diff --git a/src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php b/src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php
index 77c27c86d..e2764ad6f 100644
--- a/src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php
+++ b/src/Bundle/ChillPersonBundle/Form/AccompanyingPeriodType.php
@@ -46,7 +46,7 @@ class AccompanyingPeriodType extends AbstractType
$this->config = $config;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
// if the period_action is close, date opening should not be seen
if ('close' !== $options['period_action']) {
@@ -89,12 +89,12 @@ class AccompanyingPeriodType extends AbstractType
]);
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['action'] = $options['period_action'];
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\PersonBundle\Entity\AccompanyingPeriod::class,
@@ -111,7 +111,7 @@ class AccompanyingPeriodType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_personbundle_accompanyingperiod';
}
diff --git a/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php b/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
index 5b294e2f5..7f7d20a31 100644
--- a/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
+++ b/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php
@@ -50,7 +50,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface
*
* @return array
*/
- public function loadChoicesForValues(array $values, $value = null)
+ public function loadChoicesForValues(array $values, $value = null): array
{
$choices = [];
@@ -79,7 +79,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface
*
* @return array|string[]
*/
- public function loadValuesForChoices(array $choices, $value = null)
+ public function loadValuesForChoices(array $choices, $value = null): array
{
$values = [];
diff --git a/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php b/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php
index fd7ef3ecb..89c34bcbc 100644
--- a/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php
+++ b/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php
@@ -28,7 +28,7 @@ class ClosingMotiveType extends AbstractType
{
public function __construct(private readonly TranslatorInterface $translator) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class, [
@@ -57,7 +57,7 @@ class ClosingMotiveType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', ClosingMotive::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/CreationPersonType.php b/src/Bundle/ChillPersonBundle/Form/CreationPersonType.php
index bb40c6c35..a8b3046f6 100644
--- a/src/Bundle/ChillPersonBundle/Form/CreationPersonType.php
+++ b/src/Bundle/ChillPersonBundle/Form/CreationPersonType.php
@@ -50,7 +50,7 @@ final class CreationPersonType extends AbstractType
$this->askCenters = $parameterBag->get('chill_main')['acl']['form_show_centers'];
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('firstName')
@@ -109,7 +109,7 @@ final class CreationPersonType extends AbstractType
);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Person::class,
@@ -122,7 +122,7 @@ final class CreationPersonType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return self::NAME;
}
diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php
index b0b7fbef5..14b937ab5 100644
--- a/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php
+++ b/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php
@@ -33,7 +33,7 @@ class HouseholdCompositionType extends AbstractType
$this->household_fields_visibility = $parameterBag->get('chill_person.household_fields');
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$types = $this->householdCompositionTypeRepository->findAllActive();
diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionTypeType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionTypeType.php
index f05216379..efe724f70 100644
--- a/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionTypeType.php
+++ b/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionTypeType.php
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class HouseholdCompositionTypeType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('label', TranslatableStringFormType::class)
@@ -30,7 +30,7 @@ class HouseholdCompositionTypeType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', HouseholdCompositionType::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php
index 158bc90f2..36c74dd48 100644
--- a/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php
+++ b/src/Bundle/ChillPersonBundle/Form/HouseholdMemberType.php
@@ -18,7 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class HouseholdMemberType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('startDate', ChillDateType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdPositionType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdPositionType.php
index 67257e2eb..76a27e393 100644
--- a/src/Bundle/ChillPersonBundle/Form/HouseholdPositionType.php
+++ b/src/Bundle/ChillPersonBundle/Form/HouseholdPositionType.php
@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class HouseholdPositionType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('label', TranslatableStringFormType::class)
@@ -39,7 +39,7 @@ class HouseholdPositionType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Position::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdType.php
index ae9bcb45f..64a1dc816 100644
--- a/src/Bundle/ChillPersonBundle/Form/HouseholdType.php
+++ b/src/Bundle/ChillPersonBundle/Form/HouseholdType.php
@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class HouseholdType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('commentMembers', CommentType::class, [
@@ -39,7 +39,7 @@ class HouseholdType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Household::class,
diff --git a/src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php b/src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php
index 6d71158d0..abc77c70a 100644
--- a/src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php
+++ b/src/Bundle/ChillPersonBundle/Form/MaritalStatusType.php
@@ -22,7 +22,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
class MaritalStatusType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class, [
@@ -30,7 +30,7 @@ class MaritalStatusType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', MaritalStatus::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/OriginType.php b/src/Bundle/ChillPersonBundle/Form/OriginType.php
index bd28b80e5..fe8b106c0 100644
--- a/src/Bundle/ChillPersonBundle/Form/OriginType.php
+++ b/src/Bundle/ChillPersonBundle/Form/OriginType.php
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class OriginType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('label', TranslatableStringFormType::class)
@@ -31,7 +31,7 @@ class OriginType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Origin::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php b/src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php
index 6c65c3371..da714a9d8 100644
--- a/src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php
+++ b/src/Bundle/ChillPersonBundle/Form/PersonConfimDuplicateType.php
@@ -17,7 +17,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class PersonConfimDuplicateType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('confirm', CheckboxType::class, [
@@ -29,7 +29,7 @@ class PersonConfimDuplicateType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_personbundle_person_confirm_duplicate';
}
diff --git a/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php b/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php
index 1d7697332..d29e903f3 100644
--- a/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php
+++ b/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php
@@ -18,7 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class PersonFindManuallyDuplicateType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('person', PickPersonDynamicType::class, [
@@ -33,7 +33,7 @@ class PersonFindManuallyDuplicateType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_personbundle_person_find_manually_duplicate';
}
diff --git a/src/Bundle/ChillPersonBundle/Form/PersonResourceKindType.php b/src/Bundle/ChillPersonBundle/Form/PersonResourceKindType.php
index b0f933a42..cb277b364 100644
--- a/src/Bundle/ChillPersonBundle/Form/PersonResourceKindType.php
+++ b/src/Bundle/ChillPersonBundle/Form/PersonResourceKindType.php
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class PersonResourceKindType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TranslatableStringFormType::class)
@@ -32,7 +32,7 @@ class PersonResourceKindType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', PersonResourceKind::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php
index 2063b0e21..464ca1e38 100644
--- a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php
+++ b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php
@@ -31,7 +31,7 @@ final class PersonResourceType extends AbstractType
{
public function __construct(private readonly ResourceKindRender $resourceKindRender, private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatorInterface $translator) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('kind', EntityType::class, [
diff --git a/src/Bundle/ChillPersonBundle/Form/PersonType.php b/src/Bundle/ChillPersonBundle/Form/PersonType.php
index 21d56dde7..71862de03 100644
--- a/src/Bundle/ChillPersonBundle/Form/PersonType.php
+++ b/src/Bundle/ChillPersonBundle/Form/PersonType.php
@@ -69,7 +69,7 @@ class PersonType extends AbstractType
$this->configAltNamesHelper = $configAltNamesHelper;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('firstName')
@@ -235,7 +235,7 @@ class PersonType extends AbstractType
/**
* @param OptionsResolverInterface $resolver
*/
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Person::class,
@@ -254,7 +254,7 @@ class PersonType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_personbundle_person';
}
diff --git a/src/Bundle/ChillPersonBundle/Form/RelationType.php b/src/Bundle/ChillPersonBundle/Form/RelationType.php
index e77199c95..2eec08dbc 100644
--- a/src/Bundle/ChillPersonBundle/Form/RelationType.php
+++ b/src/Bundle/ChillPersonBundle/Form/RelationType.php
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class RelationType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TranslatableStringFormType::class, [
@@ -34,7 +34,7 @@ class RelationType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Relation::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/ResidentialAddressType.php b/src/Bundle/ChillPersonBundle/Form/ResidentialAddressType.php
index 38b2bdeca..b252b39bd 100644
--- a/src/Bundle/ChillPersonBundle/Form/ResidentialAddressType.php
+++ b/src/Bundle/ChillPersonBundle/Form/ResidentialAddressType.php
@@ -23,7 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
final class ResidentialAddressType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('startDate', DateType::class, [
@@ -65,7 +65,7 @@ final class ResidentialAddressType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => ResidentialAddress::class,
diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php
index 668a00276..e414849ac 100644
--- a/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php
+++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php
@@ -36,7 +36,7 @@ class EvaluationType extends AbstractType
$this->translatableStringHelper = $translatableStringHelper;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TranslatableStringFormType::class, [
@@ -64,7 +64,7 @@ class EvaluationType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Evaluation::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php
index a6f55e917..e16361e4f 100644
--- a/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php
+++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php
@@ -36,7 +36,7 @@ class GoalType extends AbstractType
$this->translatableStringHelper = $translatableStringHelper;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TranslatableStringFormType::class, [
@@ -55,7 +55,7 @@ class GoalType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Goal::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php
index 22a08c3a7..316ab49b8 100644
--- a/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php
+++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php
@@ -34,7 +34,7 @@ class ResultType extends AbstractType
$this->translatableStringHelper = $translatableStringHelper;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TranslatableStringFormType::class, [
@@ -47,7 +47,7 @@ class ResultType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', Result::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php
index 0b6cbe73d..b37add521 100644
--- a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php
+++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php
@@ -41,7 +41,7 @@ class SocialActionType extends AbstractType
$this->translatableStringHelper = $translatableStringHelper;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TranslatableStringFormType::class, [
@@ -95,7 +95,7 @@ class SocialActionType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', SocialIssue::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php
index 0d7a3bb4b..2e85c0897 100644
--- a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php
+++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php
@@ -25,7 +25,7 @@ class SocialIssueType extends AbstractType
{
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('title', TranslatableStringFormType::class, [
@@ -53,7 +53,7 @@ class SocialIssueType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefault('class', SocialIssue::class);
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/ClosingMotivePickerType.php b/src/Bundle/ChillPersonBundle/Form/Type/ClosingMotivePickerType.php
index f1c01eb34..0c6a969a0 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/ClosingMotivePickerType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/ClosingMotivePickerType.php
@@ -54,7 +54,7 @@ class ClosingMotivePickerType extends AbstractType
$this->repository = $closingMotiveRepository;
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'class' => ClosingMotive::class,
@@ -73,7 +73,7 @@ class ClosingMotivePickerType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'closing_motive';
}
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php b/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php
index 6d983be37..f22357baf 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php
@@ -23,7 +23,7 @@ class PersonAltNameType extends AbstractType
{
public function __construct(private readonly ConfigPersonAltNamesHelper $configHelper, private readonly TranslatableStringHelper $translatableStringHelper) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
foreach ($this->getKeyChoices() as $label => $key) {
$builder->add(
@@ -39,7 +39,7 @@ class PersonAltNameType extends AbstractType
$builder->setDataMapper(new \Chill\PersonBundle\Form\DataMapper\PersonAltNameDataMapper());
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', \Chill\PersonBundle\Entity\PersonAltName::class)
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php b/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php
index 0e84bfc83..a5f888f5f 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php
@@ -26,7 +26,7 @@ class PersonPhoneType extends AbstractType
{
public function __construct(private readonly PhonenumberHelper $phonenumberHelper, private readonly EntityManagerInterface $em) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('phonenumber', ChillPhoneNumberType::class, [
'label' => 'Other phonenumber',
@@ -52,7 +52,7 @@ class PersonPhoneType extends AbstractType
});
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickAdministrativeStatusType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickAdministrativeStatusType.php
index 126c260f5..91d44542e 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/PickAdministrativeStatusType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/PickAdministrativeStatusType.php
@@ -25,7 +25,7 @@ class PickAdministrativeStatusType extends AbstractType
private readonly TranslatableStringHelperInterface $translatableStringHelper,
) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('label', 'Administrative Status')
@@ -43,7 +43,7 @@ class PickAdministrativeStatusType extends AbstractType
->setDefault('class', AdministrativeStatus::class);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickEmploymentStatusType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickEmploymentStatusType.php
index 4dabcdaf6..234e51926 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/PickEmploymentStatusType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/PickEmploymentStatusType.php
@@ -25,7 +25,7 @@ class PickEmploymentStatusType extends AbstractType
private readonly TranslatableStringHelperInterface $translatableStringHelper,
) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('label', 'Employment status')
@@ -43,7 +43,7 @@ class PickEmploymentStatusType extends AbstractType
->setDefault('class', EmploymentStatus::class);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickGenderType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickGenderType.php
index 1e0c004d5..153339620 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/PickGenderType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/PickGenderType.php
@@ -26,7 +26,7 @@ class PickGenderType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('label', 'Gender')
@@ -44,7 +44,7 @@ class PickGenderType extends AbstractType
->setDefault('class', Gender::class);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php
index 01e3b3585..daed3619a 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php
@@ -28,12 +28,12 @@ class PickPersonDynamicType extends AbstractType
{
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->addViewTransformer(new EntityToJsonTransformer($this->denormalizer, $this->serializer, $options['multiple'], 'person'));
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['multiple'] = $options['multiple'];
$view->vars['types'] = ['person'];
@@ -47,7 +47,7 @@ class PickPersonDynamicType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('multiple', false)
@@ -60,7 +60,7 @@ class PickPersonDynamicType extends AbstractType
->setAllowedTypes('submit_on_adding_new_entity', ['bool']);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'pick_entity_dynamic';
}
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
index 9ddee9c7e..048a2b713 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonType.php
@@ -51,7 +51,7 @@ final class PickPersonType extends AbstractType
private readonly TranslatorInterface $translator,
) {}
- public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options)
+ public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options): void
{
$view->vars['attr']['data-person-picker'] = true;
$view->vars['attr']['data-select-interactive-loading'] = true;
@@ -63,7 +63,7 @@ final class PickPersonType extends AbstractType
$view->vars['attr']['data-searching-label'] = $this->translator->trans('select2.searching');
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
parent::configureOptions($resolver);
@@ -92,7 +92,7 @@ final class PickPersonType extends AbstractType
]);
}
- public function getParent()
+ public function getParent(): ?string
{
return EntityType::class;
}
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php
index 19258f23d..3e860071a 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php
@@ -22,7 +22,7 @@ class PickSocialActionType extends AbstractType
{
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialIssueType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialIssueType.php
index b61343423..c3491f0dd 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialIssueType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialIssueType.php
@@ -22,7 +22,7 @@ class PickSocialIssueType extends AbstractType
{
public function __construct(private readonly SocialIssueRender $issueRender, private readonly SocialIssueRepository $issueRepository) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
diff --git a/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php b/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php
index 2016fb80a..2b20c6d86 100644
--- a/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php
+++ b/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php
@@ -27,13 +27,13 @@ class Select2MaritalStatusType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly EntityManagerInterface $em) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$transformer = new ObjectToIdTransformer($this->em, MaritalStatus::class);
$builder->addModelTransformer($transformer);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$maritalStatuses = $this->em->getRepository(MaritalStatus::class)->findAll();
$choices = [];
@@ -50,12 +50,12 @@ class Select2MaritalStatusType extends AbstractType
]);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'select2_chill_marital_status';
}
- public function getParent()
+ public function getParent(): ?string
{
return Select2ChoiceType::class;
}
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php
index 42c5dd4c2..79776455e 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminAccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php
index 0cbc48330..6f75ea3b4 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminHouseholdMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php
index a361b107d..202c50463 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php
@@ -33,7 +33,7 @@ class AdminPersonMenuBuilder implements LocalMenuBuilderInterface
$this->fields_visibility = $parameterBag->get('chill_person.person_fields');
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php
index 2b98c98a6..e5458f458 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminSocialWorkMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillPersonBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/PersonMenuBuilder.php
index f9973a4cf..9c1de8754 100644
--- a/src/Bundle/ChillPersonBundle/Menu/PersonMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/PersonMenuBuilder.php
@@ -54,7 +54,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
*
* @return void
*/
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
$menu->addChild($this->translator->trans('Person details'), [
'route' => 'chill_person_view',
diff --git a/src/Bundle/ChillPersonBundle/Menu/PersonQuickMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/PersonQuickMenuBuilder.php
index f6b857b90..edd308758 100644
--- a/src/Bundle/ChillPersonBundle/Menu/PersonQuickMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/PersonQuickMenuBuilder.php
@@ -25,7 +25,7 @@ final readonly class PersonQuickMenuBuilder implements LocalMenuBuilderInterface
return ['person_quick_menu'];
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
/** @var \Chill\PersonBundle\Entity\Person $person */
$person = $parameters['person'];
diff --git a/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php
index c82038b40..146dc0d73 100644
--- a/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php
@@ -30,7 +30,7 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
*/
public function __construct(protected ParameterBagInterface $parameterBag, private readonly Security $security, protected TranslatorInterface $translator) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if ($this->security->isGranted(PersonVoter::CREATE) && $this->parameterBag->get('chill_person.create_person_allowed')) {
$menu->addChild($this->translator->trans('Add a person'), [
diff --git a/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php
index 7f7d2fe5a..7e08d4951 100644
--- a/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/UserMenuBuilder.php
@@ -34,7 +34,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if ($this->authorizationChecker->isGranted('ROLE_USER')) {
$menu->addChild('My accompanying periods', [
diff --git a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php
index df57a08fd..18038f337 100644
--- a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php
+++ b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php
@@ -60,7 +60,7 @@ class PrivacyEvent extends \Symfony\Contracts\EventDispatcher\Event
/**
* @return array
*/
- public function getArgs()
+ public function getArgs(): array
{
return $this->args;
}
@@ -68,7 +68,7 @@ class PrivacyEvent extends \Symfony\Contracts\EventDispatcher\Event
/**
* @return Person
*/
- public function getPerson()
+ public function getPerson(): \Chill\PersonBundle\Entity\Person
{
return $this->person;
}
@@ -76,7 +76,7 @@ class PrivacyEvent extends \Symfony\Contracts\EventDispatcher\Event
/**
* @return array $persons
*/
- public function getPersons()
+ public function getPersons(): array
{
return $this->persons;
}
diff --git a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php
index 7dfa9cb4b..626d3da4a 100644
--- a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php
+++ b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEventSubscriber.php
@@ -47,7 +47,7 @@ final readonly class PrivacyEventSubscriber implements EventSubscriberInterface
private TokenStorageInterface $token,
) {}
- public static function getSubscribedEvents()
+ public static function getSubscribedEvents(): array
{
return [
PrivacyEvent::PERSON_PRIVACY_EVENT => [
@@ -59,7 +59,7 @@ final readonly class PrivacyEventSubscriber implements EventSubscriberInterface
];
}
- public function onAccompanyingPeriodPrivacyEvent(AccompanyingPeriodPrivacyEvent $event)
+ public function onAccompanyingPeriodPrivacyEvent(AccompanyingPeriodPrivacyEvent $event): void
{
$involved = $this->getInvolved();
$involved['period_id'] = $event->getPeriod()->getId();
@@ -73,7 +73,7 @@ final readonly class PrivacyEventSubscriber implements EventSubscriberInterface
);
}
- public function onPrivacyEvent(PrivacyEvent $event)
+ public function onPrivacyEvent(PrivacyEvent $event): void
{
$persons = [];
@@ -111,7 +111,7 @@ final readonly class PrivacyEventSubscriber implements EventSubscriberInterface
}
return [
- 'by_user' => $user->getUsername(),
+ 'by_user' => $user->getUserIdentifier(),
'by_user_id' => $user->getUserIdentifier(),
];
}
diff --git a/src/Bundle/ChillPersonBundle/Search/PersonSearch.php b/src/Bundle/ChillPersonBundle/Search/PersonSearch.php
index c5c15e125..79ea3f5eb 100644
--- a/src/Bundle/ChillPersonBundle/Search/PersonSearch.php
+++ b/src/Bundle/ChillPersonBundle/Search/PersonSearch.php
@@ -46,7 +46,7 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
private readonly GenderRepository $genderRepository,
) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$builder
->add('_default', TextType::class, [
@@ -184,7 +184,7 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
return true;
}
- public function renderResult(array $terms, $start = 0, $limit = 50, array $options = [], $format = 'html')
+ public function renderResult(array $terms, $start = 0, $limit = 50, array $options = [], $format = 'html'): string|array
{
$terms = $this->findAdditionnalInDefault($terms);
$total = $this->count($terms);
@@ -280,7 +280,7 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
/**
* @return Person[]
*/
- protected function search(array $terms, int $start, int $limit, array $options = [])
+ protected function search(array $terms, int $start, int $limit, array $options = []): array
{
[
'_default' => $default,
diff --git a/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php b/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php
index 8444a41ec..a7c9d9b27 100644
--- a/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php
+++ b/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php
@@ -24,7 +24,7 @@ class SearchPersonApiProvider implements SearchApiInterface
{
public function __construct(private readonly PersonRepository $personRepository, private readonly PersonACLAwareRepositoryInterface $personACLAwareRepository, private readonly Security $security, private readonly AuthorizationHelperInterface $authorizationHelper, private readonly ExtractDateFromPattern $extractDateFromPattern, private readonly ExtractPhonenumberFromPattern $extractPhonenumberFromPattern) {}
- public function getResult(string $key, array $metadata, float $pertinence)
+ public function getResult(string $key, array $metadata, float $pertinence): ?\Chill\PersonBundle\Entity\Person
{
return $this->personRepository->find($metadata['id']);
}
diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodCommentVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodCommentVoter.php
index 3bba4f5c5..f17827daa 100644
--- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodCommentVoter.php
+++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodCommentVoter.php
@@ -24,12 +24,12 @@ class AccompanyingPeriodCommentVoter extends Voter
public function __construct(private readonly Security $security) {}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
return $subject instanceof Comment;
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
{
return match ($attribute) {
self::EDIT => $this->security->isGranted(AccompanyingPeriodVoter::EDIT, $subject->getAccompanyingPeriod()),
diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodResourceVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodResourceVoter.php
index 5750a7b58..577ec38bb 100644
--- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodResourceVoter.php
+++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodResourceVoter.php
@@ -22,12 +22,12 @@ class AccompanyingPeriodResourceVoter extends Voter
public function __construct(private readonly AccessDecisionManagerInterface $accessDecisionManager) {}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
return $subject instanceof Resource && self::EDIT === $attribute;
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
{
return match ($attribute) {
self::EDIT => $this->accessDecisionManager->decide(
diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php
index 4e609a620..3185c0a2d 100644
--- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php
+++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php
@@ -147,7 +147,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
return [];
}
- protected function supports($attribute, $subject)
+ protected function supports(string $attribute, mixed $subject): bool
{
return $this->voterHelper->supports($attribute, $subject);
}
diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationVoter.php
index bea63018c..64189a22f 100644
--- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationVoter.php
+++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationVoter.php
@@ -33,7 +33,7 @@ class AccompanyingPeriodWorkEvaluationVoter extends Voter implements ChillVoterI
public function __construct(private readonly Security $security) {}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
return $subject instanceof AccompanyingPeriodWorkEvaluation
&& \in_array($attribute, self::ALL, true);
diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php
index 415154457..6983821bd 100644
--- a/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php
+++ b/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php
@@ -66,7 +66,7 @@ class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface, Chi
return $this->getRoles();
}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
return ($subject instanceof Household
&& \in_array($attribute, self::ALL, true))
diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/PersonVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/PersonVoter.php
index 5f41ba09b..08604d7e2 100644
--- a/src/Bundle/ChillPersonBundle/Security/Authorization/PersonVoter.php
+++ b/src/Bundle/ChillPersonBundle/Security/Authorization/PersonVoter.php
@@ -61,12 +61,12 @@ class PersonVoter extends AbstractChillVoter implements ProvideRoleHierarchyInte
return $this->getAttributes();
}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
return $this->voter->supports($attribute, $subject);
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
{
return $this->voter->voteOnAttribute($attribute, $subject, $token);
}
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php
index cc1053f1f..f9c0eac5e 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php
@@ -33,7 +33,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Contracts\Translation\TranslatorInterface;
-class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class AccompanyingPeriodDocGenNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
@@ -78,7 +78,7 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
* @param AccompanyingPeriod|null $period
* @param string|null $format
*/
- public function normalize($period, $format = null, array $context = [])
+ public function normalize($period, $format = null, array $context = []): array
{
if ($period instanceof AccompanyingPeriod) {
$scopes = $this->scopeResolverDispatcher->isConcerned($period) ? $this->scopeResolverDispatcher->resolveScope($period) : [];
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php
index 2b1b767c0..2fde6b42b 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodOriginNormalizer.php
@@ -23,7 +23,7 @@ final class AccompanyingPeriodOriginNormalizer implements NormalizerInterface
* @param Origin $origin
* @param string|null $format
*/
- public function normalize($origin, $format = null, array $context = [])
+ public function normalize($origin, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
return [
'type' => 'origin',
@@ -33,8 +33,19 @@ final class AccompanyingPeriodOriginNormalizer implements NormalizerInterface
];
}
- public function supportsNormalization($data, $format = null): bool
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
return $data instanceof Origin && 'json' === $format;
}
+
+ public function getSupportedTypes(?string $format): array
+ {
+ if ('json' !== $format) {
+ return [];
+ }
+
+ return [
+ Origin::class => true,
+ ];
+ }
}
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php
index ce0a4707d..b6f92bdb7 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodParticipationNormalizer.php
@@ -23,7 +23,7 @@ class AccompanyingPeriodParticipationNormalizer implements NormalizerAwareInterf
* @param AccompanyingPeriodParticipation $participation
* @param string|null $format
*/
- public function normalize($participation, $format = null, array $context = [])
+ public function normalize($participation, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
return [
'id' => $participation->getId(),
@@ -33,12 +33,12 @@ class AccompanyingPeriodParticipationNormalizer implements NormalizerAwareInterf
];
}
- public function setNormalizer(NormalizerInterface $normalizer)
+ public function setNormalizer(NormalizerInterface $normalizer): void
{
$this->normalizer = $normalizer;
}
- public function supportsNormalization($data, $format = null): bool
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
// @TODO Fix this.
return false;
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php
index 2e26e96c4..58e2de1ea 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php
@@ -30,7 +30,7 @@ class AccompanyingPeriodResourceNormalizer implements DenormalizerAwareInterface
public function __construct(private readonly ResourceRepository $repository) {}
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
$resource = $this->extractObjectToPopulate($type, $context);
@@ -91,7 +91,7 @@ class AccompanyingPeriodResourceNormalizer implements DenormalizerAwareInterface
];
}
- public function supportsDenormalization($data, $type, $format = null)
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return Resource::class === $type;
}
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php
index e5cd50f09..81b4489a6 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php
@@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Normalizer\ObjectToPopulateTrait;
* This denormalizer rely on AbstractNormalizer for most of the job, and
* add some logic for synchronizing collection.
*/
-class AccompanyingPeriodWorkDenormalizer implements ContextAwareDenormalizerInterface, DenormalizerAwareInterface
+class AccompanyingPeriodWorkDenormalizer implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface, DenormalizerAwareInterface
{
use DenormalizerAwareTrait;
@@ -37,7 +37,7 @@ class AccompanyingPeriodWorkDenormalizer implements ContextAwareDenormalizerInte
public function __construct(private readonly AccompanyingPeriodWorkRepository $workRepository, private readonly EntityManagerInterface $em) {}
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
$work = $this->denormalizer->denormalize($data, $type, $format, \array_merge(
$context,
@@ -60,7 +60,7 @@ class AccompanyingPeriodWorkDenormalizer implements ContextAwareDenormalizerInte
&& 'accompanying_period_work' === $data['type'];
}
- private function handleEvaluationCollection(array $data, AccompanyingPeriodWork $work, string $format, array $context)
+ private function handleEvaluationCollection(array $data, AccompanyingPeriodWork $work, string $format, array $context): void
{
$dataById = [];
$dataWithoutId = [];
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDenormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDenormalizer.php
index a5dcfb840..8cc559c49 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDenormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDenormalizer.php
@@ -23,13 +23,13 @@ use Symfony\Component\Serializer\Normalizer\ObjectToPopulateTrait;
* This denormalizer rely on AbstractNormalizer for most of the job, and
* add some logic for synchronizing collection.
*/
-class AccompanyingPeriodWorkEvaluationDenormalizer implements ContextAwareDenormalizerInterface, DenormalizerAwareInterface
+class AccompanyingPeriodWorkEvaluationDenormalizer implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface, DenormalizerAwareInterface
{
use DenormalizerAwareTrait;
use ObjectToPopulateTrait;
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
$evaluation = $this->denormalizer->denormalize($data, $type, $format, \array_merge(
$context,
@@ -50,7 +50,7 @@ class AccompanyingPeriodWorkEvaluationDenormalizer implements ContextAwareDenorm
&& 'accompanying_period_work_evaluation' === $data['type'];
}
- private function handleDocumentCollection(array $data, AccompanyingPeriodWorkEvaluation $evaluation, string $format, array $context)
+ private function handleDocumentCollection(array $data, AccompanyingPeriodWorkEvaluation $evaluation, string $format, array $context): void
{
$dataById = [];
$dataWithoutId = [];
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php
index 1e42dac06..17d33fadb 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php
@@ -19,7 +19,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Workflow\Registry;
-class AccompanyingPeriodWorkEvaluationDocumentNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class AccompanyingPeriodWorkEvaluationDocumentNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
@@ -47,7 +47,7 @@ class AccompanyingPeriodWorkEvaluationDocumentNormalizer implements ContextAware
return $initial;
}
- public function supportsNormalization($data, ?string $format = null, array $context = [])
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof AccompanyingPeriodWorkEvaluationDocument
&& 'json' === $format
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php
index efab6babf..4a3a6af48 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php
@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Workflow\Registry;
-class AccompanyingPeriodWorkEvaluationNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class AccompanyingPeriodWorkEvaluationNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php
index 57848584a..41586aa0f 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php
@@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Workflow\Registry;
-class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class AccompanyingPeriodWorkNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/GenderDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/GenderDocGenNormalizer.php
index 5af99be5a..74527fa62 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/GenderDocGenNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/GenderDocGenNormalizer.php
@@ -17,18 +17,18 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
-class GenderDocGenNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class GenderDocGenNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
- public function supportsNormalization($data, ?string $format = null, array $context = [])
+ public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return $data instanceof Gender;
}
- public function normalize($gender, ?string $format = null, array $context = [])
+ public function normalize($gender, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
return [
'id' => $gender->getId(),
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php
index 956bdf03c..850730565 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php
@@ -29,7 +29,7 @@ class MembersEditorNormalizer implements DenormalizerAwareInterface, Denormalize
public function __construct(private readonly MembersEditorFactory $factory) {}
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
// some test about schema first...
$this->performChecks($data);
@@ -44,7 +44,7 @@ class MembersEditorNormalizer implements DenormalizerAwareInterface, Denormalize
return $this->denormalizeMove($data, $type, $format, $context);
}
- public function supportsDenormalization($data, $type, $format = null)
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return MembersEditor::class === $type;
}
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php
index 29c22280c..9fb3b35e2 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php
@@ -33,7 +33,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
class PersonDocGenNormalizer implements
- ContextAwareNormalizerInterface,
+ \Symfony\Component\Serializer\Normalizer\NormalizerInterface,
NormalizerAwareInterface
{
use NormalizerAwareTrait;
@@ -42,7 +42,7 @@ class PersonDocGenNormalizer implements
public function __construct(private readonly PersonRenderInterface $personRender, private readonly RelationshipRepository $relationshipRepository, private readonly TranslatableStringHelper $translatableStringHelper, private readonly SummaryBudgetInterface $summaryBudget) {}
- public function normalize($person, $format = null, array $context = [])
+ public function normalize($person, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
try {
$context = $this->addCircularToContext($person, $context);
@@ -150,7 +150,7 @@ class PersonDocGenNormalizer implements
return $data;
}
- public function supportsNormalization($data, $format = null, array $context = [])
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
if ('docgen' !== $format) {
return false;
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
index 88c38cfbb..8a2a5c46b 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php
@@ -51,7 +51,7 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
private readonly PhoneNumberHelperInterface $phoneNumberHelper,
) {}
- public function denormalize($data, $type, $format = null, array $context = [])
+ public function denormalize($data, $type, $format = null, array $context = []): mixed
{
$person = $this->extractObjectToPopulate($type, $context);
@@ -178,7 +178,7 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
* @param Person $person
* @param string|null $format
*/
- public function normalize($person, $format = null, array $context = [])
+ public function normalize($person, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
$groups = $context[AbstractNormalizer::GROUPS] ?? [];
@@ -215,12 +215,12 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
null];
}
- public function supportsDenormalization($data, $type, $format = null)
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return Person::class === $type && 'person' === ($data['type'] ?? null);
}
- public function supportsNormalization($data, $format = null): bool
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
return $data instanceof Person && 'json' === $format;
}
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php
index 402f5ff03..3f1859856 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php
@@ -18,7 +18,7 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
-class RelationshipDocGenNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class RelationshipDocGenNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
@@ -28,7 +28,7 @@ class RelationshipDocGenNormalizer implements ContextAwareNormalizerInterface, N
* @param Relationship $relation
* @param string|null $format
*/
- public function normalize($relation, $format = null, array $context = [])
+ public function normalize($relation, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
$counterpart = $context['docgen:relationship:counterpart'] ?? null;
$contextPerson = array_merge($context, [
@@ -74,7 +74,7 @@ class RelationshipDocGenNormalizer implements ContextAwareNormalizerInterface, N
];
}
- public function supportsNormalization($data, $format = null, array $context = [])
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
if ('docgen' !== $format) {
return false;
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php
index 19b36f05b..11cd05760 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php
@@ -23,7 +23,7 @@ class SocialActionNormalizer implements NormalizerAwareInterface, NormalizerInte
public function __construct(private readonly SocialActionRender $render) {}
- public function normalize($socialAction, $format = null, array $context = [])
+ public function normalize($socialAction, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
switch ($format) {
case 'json':
@@ -57,7 +57,7 @@ class SocialActionNormalizer implements NormalizerAwareInterface, NormalizerInte
}
}
- public function supportsNormalization($data, $format = null, array $context = [])
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
if ($data instanceof SocialAction && 'json' === $format) {
return true;
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php
index 778336d2b..650cb3ea4 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php
@@ -17,13 +17,13 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
-class SocialIssueNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class SocialIssueNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
public function __construct(private readonly SocialIssueRender $render) {}
- public function normalize($socialIssue, $format = null, array $context = [])
+ public function normalize($socialIssue, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
/* @var SocialIssue $socialIssue */
switch ($format) {
@@ -51,7 +51,7 @@ class SocialIssueNormalizer implements ContextAwareNormalizerInterface, Normaliz
}
}
- public function supportsNormalization($data, $format = null, array $context = [])
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
if ($data instanceof SocialIssue && 'json' === $format) {
return true;
diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php
index b7257fc87..b2f43c83a 100644
--- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php
+++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php
@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Workflow\Registry;
-class WorkflowNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
+class WorkflowNormalizer implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
diff --git a/src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php b/src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php
index 90b2ddb60..0ac95a19a 100644
--- a/src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php
+++ b/src/Bundle/ChillPersonBundle/Test/PreparePersonTrait.php
@@ -28,7 +28,7 @@ trait PreparePersonTrait
*
* @return Person
*/
- protected function preparePerson(Center $center)
+ protected function preparePerson(Center $center): \Chill\PersonBundle\Entity\Person
{
return (new Person())
->setCenter($center)
diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php
index 83d8518c0..b72429211 100644
--- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php
@@ -37,7 +37,7 @@ final class PersonMoveEventSubscriberTest extends KernelTestCase
{
use ProphecyTrait;
- public function testEventChangeHouseholdNoNotificationForPeriodWithoutUser()
+ public function testEventChangeHouseholdNoNotificationForPeriodWithoutUser(): void
{
$person = new Person();
$period = new AccompanyingPeriod();
@@ -78,7 +78,7 @@ final class PersonMoveEventSubscriberTest extends KernelTestCase
$eventSubscriber->resetPeriodLocation($event);
}
- public function testEventChangeHouseholdNotification()
+ public function testEventChangeHouseholdNotification(): void
{
$person = new Person();
$period = new AccompanyingPeriod();
@@ -123,7 +123,7 @@ final class PersonMoveEventSubscriberTest extends KernelTestCase
$this->assertNull($period->getPersonLocation());
}
- public function testEventChangeHouseholdNotificationForPeriodChangeLocationOfPersonAnteriorToCurrentLocationHistory()
+ public function testEventChangeHouseholdNotificationForPeriodChangeLocationOfPersonAnteriorToCurrentLocationHistory(): void
{
$person = new Person();
$period = new AccompanyingPeriod();
@@ -168,7 +168,7 @@ final class PersonMoveEventSubscriberTest extends KernelTestCase
$this->assertNull($period->getPersonLocation());
}
- public function testEventLeaveNotification()
+ public function testEventLeaveNotification(): void
{
$person = new Person();
$period = new AccompanyingPeriod();
@@ -203,7 +203,7 @@ final class PersonMoveEventSubscriberTest extends KernelTestCase
$this->assertNull($period->getPersonLocation());
}
- public function testEventPersonChangeAddressInThePast()
+ public function testEventPersonChangeAddressInThePast(): void
{
$person = new Person();
$period = new AccompanyingPeriod();
diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php
index 75e3877bc..e09516410 100644
--- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php
@@ -32,7 +32,7 @@ final class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends T
{
use ProphecyTrait;
- public function testPrePersist()
+ public function testPrePersist(): void
{
$socialIssues = new ArrayCollection([
$parent = new SocialIssue(),
@@ -54,7 +54,7 @@ final class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends T
$this->assertContains($grandGrandChild, $entity->getSocialIssues());
}
- public function testPrePersistAccompanyingPeriod()
+ public function testPrePersistAccompanyingPeriod(): void
{
$arraySocialIssues = [
$parent = new SocialIssue(),
@@ -75,7 +75,7 @@ final class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends T
$this->assertSame($grandGrandChild, $period->getSocialIssues()->first());
}
- public function testPreUpdate()
+ public function testPreUpdate(): void
{
$socialIssues = new ArrayCollection([
$parent = new SocialIssue(),
@@ -97,7 +97,7 @@ final class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends T
$this->assertContains($grandGrandChild, $entity->getSocialIssues());
}
- public function testPreUpdateAccompanyingPeriod()
+ public function testPreUpdateAccompanyingPeriod(): void
{
$arraySocialIssues = [
$parent = new SocialIssue(),
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php
index 301d90056..a0828e806 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseApiControllerTest.php
@@ -296,7 +296,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateRandomAccompanyingCourse
*/
- public function testAccompanyingCourseAddParticipation(int $personId, int $periodId)
+ public function testAccompanyingCourseAddParticipation(int $personId, int $periodId): void
{
$this->markTestIncomplete('fix test with validation');
$this->client->request(
@@ -368,7 +368,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateRandomAccompanyingCourseWithSocialIssue
*/
- public function testAccompanyingCourseAddRemoveSocialIssue(AccompanyingPeriod $period, SocialIssue $si)
+ public function testAccompanyingCourseAddRemoveSocialIssue(AccompanyingPeriod $period, SocialIssue $si): void
{
$this->markTestIncomplete('fix test with validation');
$this->client->request(
@@ -406,7 +406,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateRandomAccompanyingCourse
*/
- public function testAccompanyingCourseShow(int $personId, int $periodId)
+ public function testAccompanyingCourseShow(int $personId, int $periodId): void
{
$client = $this->getClientAuthenticated();
$client->request(Request::METHOD_GET, sprintf('/api/1.0/person/accompanying-course/%d.json', $periodId));
@@ -430,7 +430,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateRandomAccompanyingCourse
*/
- public function testAccompanyingPeriodPatch(int $personId, int $periodId)
+ public function testAccompanyingPeriodPatch(int $personId, int $periodId): void
{
$this->markTestIncomplete('fix test with validation');
$period = self::getContainer()->get(AccompanyingPeriodRepository::class)
@@ -466,7 +466,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateRandomRequestorValidData
*/
- public function testCommentWithValidData(AccompanyingPeriod $period, mixed $personId, mixed $thirdPartyId)
+ public function testCommentWithValidData(AccompanyingPeriod $period, mixed $personId, mixed $thirdPartyId): void
{
$this->markTestIncomplete('fix test with validation');
$em = self::getContainer()->get(EntityManagerInterface::class);
@@ -507,7 +507,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateNewAccompanyingCourse
*/
- public function testConfirm(AccompanyingPeriod $period)
+ public function testConfirm(AccompanyingPeriod $period): void
{
$this->markTestIncomplete('fix test with validation');
$this->client->request(
@@ -528,7 +528,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateRandomAccompanyingCourse
*/
- public function testReferralAvailable(int $personId, int $periodId)
+ public function testReferralAvailable(int $personId, int $periodId): void
{
$client = $this->getClientAuthenticated();
$client->request(
@@ -542,7 +542,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateRandomRequestorValidData
*/
- public function testRequestorWithValidData(AccompanyingPeriod $period, mixed $personId, mixed $thirdPartyId)
+ public function testRequestorWithValidData(AccompanyingPeriod $period, mixed $personId, mixed $thirdPartyId): void
{
$this->markTestIncomplete('fix test with validation');
$em = self::getContainer()->get(EntityManagerInterface::class);
@@ -623,7 +623,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateRandomRequestorValidData
*/
- public function testResourceWithValidData(AccompanyingPeriod $period, mixed $personId, mixed $thirdPartyId)
+ public function testResourceWithValidData(AccompanyingPeriod $period, mixed $personId, mixed $thirdPartyId): void
{
$this->markTestIncomplete('fix test with validation');
$em = self::getContainer()->get(EntityManagerInterface::class);
@@ -713,7 +713,7 @@ final class AccompanyingCourseApiControllerTest extends WebTestCase
$this->assertTrue(\in_array($response->getStatusCode(), [200, 422], true));
}
- public function testShow404()
+ public function testShow404(): void
{
$client = $this->getClientAuthenticated();
$client->request(Request::METHOD_GET, sprintf('/api/1.0/person/accompanying-course/%d.json', 99999));
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php
index 240c3ab98..24939d960 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingCourseControllerTest.php
@@ -67,7 +67,7 @@ final class AccompanyingCourseControllerTest extends WebTestCase
self::ensureKernelShutdown();
}
- public function testNewWithoutUsers()
+ public function testNewWithoutUsers(): void
{
$this->client->request('GET', '/fr/person/parcours/new');
@@ -80,7 +80,7 @@ final class AccompanyingCourseControllerTest extends WebTestCase
/**
* @dataProvider dataGenerateRandomUsers
*/
- public function testWithNewUsers(mixed $personId0, mixed $personId1)
+ public function testWithNewUsers(mixed $personId0, mixed $personId1): void
{
$this->client->request('GET', '/fr/person/parcours/new', [
'person_id' => [
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php
index 9d8fa2321..868d1f95f 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/AccompanyingPeriodControllerTest.php
@@ -103,7 +103,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
* with : the last closing motive in list
* Then the response should redirect to period view
*/
- public function testAddNewPeriodBeforeActual()
+ public function testAddNewPeriodBeforeActual(): void
{
$crawler = $this->client->request('GET', '/fr/person/'
.$this->person->getId().'/accompanying-period/create');
@@ -144,7 +144,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
*
* @todo
*/
- public function testClosingCurrentPeriod()
+ public function testClosingCurrentPeriod(): void
{
$crawler = $this->client->request('GET', '/fr/person/'
.$this->person->getId().'/accompanying-period/close');
@@ -184,7 +184,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
*
* @todo
*/
- public function testClosingCurrentPeriodWithDateClosingBeforeOpeningFails()
+ public function testClosingCurrentPeriodWithDateClosingBeforeOpeningFails(): void
{
$crawler = $this->client->request('GET', '/fr/person/'
.$this->person->getId().'/accompanying-period/close');
@@ -223,7 +223,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
* Then the response should not redirect
* and a error element is shown on the response page
*/
- public function testCreatePeriodAfterOpeningFails()
+ public function testCreatePeriodAfterOpeningFails(): void
{
$this->generatePeriods([
[
@@ -307,7 +307,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
* with : the last closing motive in list
* Then the response should redirect to period view
*/
- public function testCreatePeriodWithClosingBeforeOpeningFails()
+ public function testCreatePeriodWithClosingBeforeOpeningFails(): void
{
$crawler = $this->client->request('GET', '/fr/person/'
.$this->person->getId().'/accompanying-period/create');
@@ -345,7 +345,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
* Then the response should not redirect
* and a error element is shown on the response page
*/
- public function testCreatePeriodWithDateEndBetweenAnotherPeriodFails()
+ public function testCreatePeriodWithDateEndBetweenAnotherPeriodFails(): void
{
$this->generatePeriods([
[
@@ -391,7 +391,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
* Then the response should not redirect
* and a error element is shown on the response page
*/
- public function testCreatePeriodWithDateOpeningBetweenAnotherPeriodFails()
+ public function testCreatePeriodWithDateOpeningBetweenAnotherPeriodFails(): void
{
$this->generatePeriods([
[
@@ -541,7 +541,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
* Given an array of periods (key openingDate, closingDate (optioal),
* closingMotive) generate the periods in the db.
*/
- protected function generatePeriods(array $periods)
+ protected function generatePeriods(array $periods): void
{
foreach ($periods as $periodDef) {
$period = new AccompanyingPeriod(new \DateTime($periodDef['openingDate']));
@@ -570,7 +570,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
* @return Chill\PersonBundle\Entity\AccompanyingPeriod The last value of closing
* motive
*/
- protected function getLastValueOnClosingMotive(\Symfony\Component\DomCrawler\Form $form)
+ protected function getLastValueOnClosingMotive(\Symfony\Component\DomCrawler\Form $form): mixed
{
$values = $form->get(self::CLOSING_MOTIVE_INPUT)
->availableOptionValues();
@@ -583,7 +583,7 @@ final class AccompanyingPeriodControllerTest extends WebTestCase
*
* @return Chill\PersonBundle\Entity\AccompanyingPeriod The last closing motive
*/
- protected function getRandomClosingMotive()
+ protected function getRandomClosingMotive(): mixed
{
$motives = self::$em
->getRepository('ChillPersonBundle:AccompanyingPeriod\ClosingMotive')
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php
index 2b5c13a09..52fb5a314 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdApiControllerTest.php
@@ -143,7 +143,7 @@ final class HouseholdApiControllerTest extends WebTestCase
/**
* @dataProvider generateHouseholdAssociatedWithAddressReference
*/
- public function testFindHouseholdByAddressReference(int $addressReferenceId, int $expectedHouseholdId)
+ public function testFindHouseholdByAddressReference(int $addressReferenceId, int $expectedHouseholdId): void
{
$client = $this->getClientAuthenticated();
@@ -165,7 +165,7 @@ final class HouseholdApiControllerTest extends WebTestCase
/**
* @dataProvider generateHouseholdId
*/
- public function testSuggestAddressByHousehold(int $householdId)
+ public function testSuggestAddressByHousehold(int $householdId): void
{
$client = $this->getClientAuthenticated();
@@ -180,7 +180,7 @@ final class HouseholdApiControllerTest extends WebTestCase
/**
* @dataProvider generatePersonId
*/
- public function testSuggestByAccompanyingPeriodParticipation(int $personId)
+ public function testSuggestByAccompanyingPeriodParticipation(int $personId): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php
index 1012480b2..300ffff9f 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdControllerTest.php
@@ -69,7 +69,7 @@ final class HouseholdControllerTest extends WebTestCase
/**
* @dataProvider generateValidHouseholdIds
*/
- public function testAddresses(mixed $householdId)
+ public function testAddresses(mixed $householdId): void
{
$this->client->request(
Request::METHOD_GET,
@@ -82,7 +82,7 @@ final class HouseholdControllerTest extends WebTestCase
/**
* @dataProvider generateValidHouseholdIds
*/
- public function testAddressMove(mixed $householdId)
+ public function testAddressMove(mixed $householdId): void
{
$this->client->request(
Request::METHOD_GET,
@@ -97,7 +97,7 @@ final class HouseholdControllerTest extends WebTestCase
/**
* @dataProvider generateValidHouseholdIds
*/
- public function testEditMetadata(mixed $householdId)
+ public function testEditMetadata(mixed $householdId): void
{
$crawler = $this->client->request(
Request::METHOD_GET,
@@ -127,7 +127,7 @@ final class HouseholdControllerTest extends WebTestCase
/**
* @dataProvider generateValidHouseholdIds
*/
- public function testSummary(mixed $householdId)
+ public function testSummary(mixed $householdId): void
{
$this->client->request(
Request::METHOD_GET,
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php
index 66b754eb3..6f6f18364 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/HouseholdMemberControllerTest.php
@@ -105,7 +105,7 @@ final class HouseholdMemberControllerTest extends WebTestCase
/**
* @dataProvider provideValidDataEditMember
*/
- public function testEditMember(int $memberId)
+ public function testEditMember(int $memberId): void
{
$client = $this->getClientAuthenticated();
@@ -127,7 +127,7 @@ final class HouseholdMemberControllerTest extends WebTestCase
/**
* @dataProvider provideValidDataMove
*/
- public function testLeaveWithoutHousehold(mixed $personId, mixed $householdId, mixed $positionId, \DateTimeInterface $date)
+ public function testLeaveWithoutHousehold(mixed $personId, mixed $householdId, mixed $positionId, \DateTimeInterface $date): void
{
$client = $this->getClientAuthenticated();
@@ -175,7 +175,7 @@ final class HouseholdMemberControllerTest extends WebTestCase
/**
* @dataProvider provideValidDataMove
*/
- public function testMoveMember(mixed $personId, mixed $householdId, mixed $positionId, \DateTimeInterface $date)
+ public function testMoveMember(mixed $personId, mixed $householdId, mixed $positionId, \DateTimeInterface $date): void
{
$client = $this->getClientAuthenticated();
@@ -222,7 +222,7 @@ final class HouseholdMemberControllerTest extends WebTestCase
/**
* @dataProvider provideValidDataMove
*/
- public function testMoveMemberToNewHousehold(mixed $personId, mixed $householdId, mixed $positionId, \DateTimeInterface $date)
+ public function testMoveMemberToNewHousehold(mixed $personId, mixed $householdId, mixed $positionId, \DateTimeInterface $date): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php
index b62c06489..8976675c1 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php
@@ -80,7 +80,7 @@ final class PersonAddressControllerTest extends WebTestCase
]);
}
- public static function tearDownAfter()
+ public static function tearDownAfter(): void
{
$this->refreshPerson();
$this->em->remove(self::$person);
@@ -90,7 +90,7 @@ final class PersonAddressControllerTest extends WebTestCase
/**
* @depends testEmptyList
*/
- public function testCreateAddress()
+ public function testCreateAddress(): void
{
$crawler = $this->client->request('GET', '/fr/person/'.
self::$person->getId().'/address/new');
@@ -133,7 +133,7 @@ final class PersonAddressControllerTest extends WebTestCase
);
}
- public function testEmptyList()
+ public function testEmptyList(): void
{
$crawler = $this->client->request('GET', '/fr/person/'.
self::$person->getId().'/address/list');
@@ -151,7 +151,7 @@ final class PersonAddressControllerTest extends WebTestCase
/**
* @depends testCreateAddress
*/
- public function testUpdateAddress()
+ public function testUpdateAddress(): void
{
$this->refreshPerson();
$address = self::$person->getLastAddress();
@@ -194,7 +194,7 @@ final class PersonAddressControllerTest extends WebTestCase
/**
* Reload the person from the db.
*/
- protected function refreshPerson()
+ protected function refreshPerson(): void
{
self::$person = $this->em->getRepository(Person::class)
->find(self::$person->getId());
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php
index 8582aa712..41e7735a2 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php
@@ -171,7 +171,7 @@ final class PersonControllerCreateTest extends WebTestCase
*
* @return string The id of the created person
*/
- public function testValidForm()
+ public function testValidForm(): void
{
$client = $this->getClientAuthenticated();
$crawler = $client->request('GET', '/fr/person/new');
@@ -187,7 +187,7 @@ final class PersonControllerCreateTest extends WebTestCase
* test adding a person with a user with multi center
* is valid.
*/
- public function testValidFormWithMultiCenterUser()
+ public function testValidFormWithMultiCenterUser(): void
{
$client = $this->getClientAuthenticated('multi_center');
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php
index 1b8f5ef43..590d9d16b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php
@@ -79,7 +79,7 @@ final class PersonControllerUpdateTest extends WebTestCase
*
* @dataProvider providePerson
*/
- public function testEditPageDeniedForUnauthorizedInsideCenter(int $personId)
+ public function testEditPageDeniedForUnauthorizedInsideCenter(int $personId): void
{
$client = $this->getClientAuthenticated('center a_administrative');
@@ -94,7 +94,7 @@ final class PersonControllerUpdateTest extends WebTestCase
*
* @dataProvider providePerson
*/
- public function testEditPageDeniedForUnauthorizedOutsideCenter(int $personId)
+ public function testEditPageDeniedForUnauthorizedOutsideCenter(int $personId): void
{
$client = $this->getClientAuthenticated('center b_social');
@@ -111,7 +111,7 @@ final class PersonControllerUpdateTest extends WebTestCase
*
* @dataProvider providePerson
*/
- public function testEditPageIsSuccessful(int $personId)
+ public function testEditPageIsSuccessful(int $personId): void
{
$client = $this->getClientAuthenticated();
@@ -135,7 +135,7 @@ final class PersonControllerUpdateTest extends WebTestCase
/**
* @dataProvider providePerson
*/
- public function testEditPageWithErrorIsNotProcessable(int $personId)
+ public function testEditPageWithErrorIsNotProcessable(int $personId): void
{
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php
index a290e56e8..23e12ebaa 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php
@@ -87,7 +87,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
/**
* Test the edit page are accessible.
*/
- public function testEditPageIsSuccessful()
+ public function testEditPageIsSuccessful(): void
{
$this->client->request('GET', $this->editUrl);
$this->assertTrue(
@@ -109,7 +109,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
* @param string $field
* @param string $value
*/
- public function testEditTextField($field, $value, \Closure $callback)
+ public function testEditTextField($field, $value, \Closure $callback): void
{
$crawler = $this->client->request('GET', $this->editUrl);
@@ -169,7 +169,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
*
* @group configurable_fields
*/
- public function testHiddenFielsAreAbsent()
+ public function testHiddenFielsAreAbsent(): void
{
$crawler = $this->client->request('GET', $this->editUrl);
@@ -203,7 +203,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
/**
* Reload the person from the db.
*/
- protected function refreshPerson()
+ protected function refreshPerson(): void
{
$this->person = $this->em->getRepository(Person::class)
->find($this->person->getId());
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php
index 6463c246b..bfdaff7d7 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php
@@ -96,7 +96,7 @@ final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase
/**
* Reload the person from the db.
*/
- protected function refreshPerson()
+ protected function refreshPerson(): void
{
$this->person = $this->em->getRepository(Person::class)
->find($this->person->getId());
diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php
index 206314939..631157fa7 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php
@@ -101,7 +101,7 @@ final class RelationshipApiControllerTest extends WebTestCase
/**
* @dataProvider personProvider
*/
- public function testGetRelationshipByPerson(int $personId)
+ public function testGetRelationshipByPerson(int $personId): void
{
self::ensureKernelShutdown();
$client = $this->getClientAuthenticated();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriod/ResourceTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriod/ResourceTest.php
index 336b81511..d82803bfb 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriod/ResourceTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriod/ResourceTest.php
@@ -23,7 +23,7 @@ use PHPUnit\Framework\TestCase;
*/
final class ResourceTest extends TestCase
{
- public function testSetResource()
+ public function testSetResource(): void
{
$person = new Person();
$thirdParty = new ThirdParty();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php
index 9e383b789..26722f41a 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php
@@ -26,7 +26,7 @@ use Chill\ThirdPartyBundle\Entity\ThirdParty;
*/
final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
{
- public function testChangeStepKeepHistory()
+ public function testChangeStepKeepHistory(): void
{
$period = new AccompanyingPeriod();
@@ -58,7 +58,7 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
$this->assertEquals($tenDaysAgo, $period->getStepHistories()->first()->getStartDate(), 'when changing the opening date to a later one and no history after, start date should change');
}
- public function testClosingEqualOpening()
+ public function testClosingEqualOpening(): void
{
$datetime = new \DateTime('now');
@@ -68,7 +68,7 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
$this->assertTrue($period->isClosingAfterOpening());
}
- public function testClosingIsAfterOpeningConsistency()
+ public function testClosingIsAfterOpeningConsistency(): void
{
$datetime1 = new \DateTime('now');
$datetime2 = new \DateTime('tomorrow');
@@ -81,7 +81,7 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
$this->assertTrue($r);
}
- public function testClosingIsBeforeOpeningConsistency()
+ public function testClosingIsBeforeOpeningConsistency(): void
{
$datetime1 = new \DateTime('tomorrow');
$datetime2 = new \DateTime('now');
@@ -92,7 +92,7 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
$this->assertFalse($period->isClosingAfterOpening());
}
- public function testHasChangedUser()
+ public function testHasChangedUser(): void
{
$period = new AccompanyingPeriod();
@@ -115,7 +115,7 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
$this->assertSame($user1, $period->getPreviousUser());
}
- public function testHistoryLocation()
+ public function testHistoryLocation(): void
{
$period = new AccompanyingPeriod();
$person = new Person();
@@ -171,7 +171,7 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
} while ($iterator->valid());
}
- public function testHistoryLocationNotHavingBothAtStart()
+ public function testHistoryLocationNotHavingBothAtStart(): void
{
$period = new AccompanyingPeriod();
$person = new Person();
@@ -191,7 +191,7 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
self::assertEquals('person', $period->getLocationStatus());
}
- public function testIsClosed()
+ public function testIsClosed(): void
{
$period = new AccompanyingPeriod(new \DateTime());
$period->setClosingDate(new \DateTime('tomorrow'));
@@ -199,14 +199,14 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
$this->assertFalse($period->isOpen());
}
- public function testIsOpen()
+ public function testIsOpen(): void
{
$period = new AccompanyingPeriod(new \DateTime());
$this->assertTrue($period->isOpen());
}
- public function testPersonPeriod()
+ public function testPersonPeriod(): void
{
$person = new Person();
$person2 = new Person();
@@ -254,7 +254,7 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
$this->assertEquals(1, $period->getParticipationsContainsPerson($person4)->count());
}
- public function testPinnedComment()
+ public function testPinnedComment(): void
{
$period = new AccompanyingPeriod(new \DateTime());
$comment = new Comment();
@@ -287,7 +287,7 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase
$this->assertContains($replacingComment, $period->getComments());
}
- public function testRequestor()
+ public function testRequestor(): void
{
$period = new AccompanyingPeriod(new \DateTime());
$person = new Person();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdMemberTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdMemberTest.php
index c5c6a38d1..94e5e279f 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdMemberTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdMemberTest.php
@@ -22,7 +22,7 @@ use PHPUnit\Framework\TestCase;
*/
final class HouseholdMemberTest extends TestCase
{
- public function testPositionDoNotSharehousehold()
+ public function testPositionDoNotSharehousehold(): void
{
$position = (new Position())
->setShareHousehold(false);
@@ -32,7 +32,7 @@ final class HouseholdMemberTest extends TestCase
$this->assertFalse($membership->getShareHousehold());
}
- public function testPositionSharehousehold()
+ public function testPositionSharehousehold(): void
{
$position = (new Position())
->setShareHousehold(true);
diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdTest.php
index beb5ac073..4b722dbf0 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Entity/Household/HouseholdTest.php
@@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase;
*/
final class HouseholdTest extends TestCase
{
- public function testGetMembersOnRange()
+ public function testGetMembersOnRange(): void
{
$household = new Household();
@@ -68,7 +68,7 @@ final class HouseholdTest extends TestCase
$this->assertContains($householdMemberC, $members);
}
- public function testHouseholdAddressConsistent()
+ public function testHouseholdAddressConsistent(): void
{
$household = new Household();
@@ -112,7 +112,7 @@ final class HouseholdTest extends TestCase
$this->assertNull($futureAddress->getValidTo());
}
- public function testHouseholdComposition()
+ public function testHouseholdComposition(): void
{
$household = new Household();
@@ -135,7 +135,7 @@ final class HouseholdTest extends TestCase
$this->assertEquals(new \DateTimeImmutable('2021-12-31'), $inside->getEndDate());
}
- public function testHouseholdGetPersonsDuringMembership()
+ public function testHouseholdGetPersonsDuringMembership(): void
{
$household = new Household();
$person1 = new Person();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/PersonTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/PersonTest.php
index e30f2658c..ff8661436 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Entity/PersonTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Entity/PersonTest.php
@@ -31,7 +31,7 @@ final class PersonTest extends \PHPUnit\Framework\TestCase
* Test if the getAccompanyingPeriodsOrdered function, for periods
* starting at the same time order regarding to the closing date.
*/
- public function testAccompanyingPeriodOrderSameDateOpening()
+ public function testAccompanyingPeriodOrderSameDateOpening(): void
{
$d = new \DateTime('2013/2/1');
$p = new Person();
@@ -59,7 +59,7 @@ final class PersonTest extends \PHPUnit\Framework\TestCase
* Test if the getAccompanyingPeriodsOrdered function return a list of
* periods ordered ascendency.
*/
- public function testAccompanyingPeriodOrderWithUnorderedAccompanyingPeriod()
+ public function testAccompanyingPeriodOrderWithUnorderedAccompanyingPeriod(): void
{
$d = new \DateTime('2013/2/1');
$p = new Person();
@@ -88,7 +88,7 @@ final class PersonTest extends \PHPUnit\Framework\TestCase
* the good constant when two periods are collapsing : a period
* is covering another one : start_1 < start_2 & end_2 < end_1.
*/
- public function testDateCoveringWithCoveringAccompanyingPeriod()
+ public function testDateCoveringWithCoveringAccompanyingPeriod(): void
{
$d = new \DateTime('2013/2/1');
$p = new Person();
@@ -115,7 +115,7 @@ final class PersonTest extends \PHPUnit\Framework\TestCase
* the current accompaniying period via the getCurrentAccompanyingPeriod
* function.
*/
- public function testGetCurrentAccompanyingPeriod()
+ public function testGetCurrentAccompanyingPeriod(): void
{
$d = new \DateTime('yesterday');
$p = new Person();
@@ -134,7 +134,7 @@ final class PersonTest extends \PHPUnit\Framework\TestCase
$this->assertNull($shouldBeNull);
}
- public function testIsSharingHousehold()
+ public function testIsSharingHousehold(): void
{
$person = new Person();
$household = new Household();
@@ -174,7 +174,7 @@ final class PersonTest extends \PHPUnit\Framework\TestCase
* the good constant when two periods are collapsing : a period is open
* before an existing period.
*/
- public function testNotOpenAFileReOpenedLater()
+ public function testNotOpenAFileReOpenedLater(): void
{
$d = new \DateTime('2013/2/1');
$p = new Person();
@@ -192,7 +192,7 @@ final class PersonTest extends \PHPUnit\Framework\TestCase
$this->assertEquals($r['result'], Person::ERROR_ADDIND_PERIOD_AFTER_AN_OPEN_PERIOD);
}
- public function testSetCenter()
+ public function testSetCenter(): void
{
$person = new Person();
$centerA = new Center();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialActionTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialActionTest.php
index 3684e6d68..6a7885db3 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialActionTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialActionTest.php
@@ -21,7 +21,7 @@ use PHPUnit\Framework\TestCase;
*/
final class SocialActionTest extends TestCase
{
- public function testGetDescendantsWithThisForActions()
+ public function testGetDescendantsWithThisForActions(): void
{
$parentA = new SocialAction();
$childA = (new SocialAction())->setParent($parentA);
diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialIssueTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialIssueTest.php
index 6660bd9c1..cbddd8226 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialIssueTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Entity/SocialWork/SocialIssueTest.php
@@ -22,7 +22,7 @@ use PHPUnit\Framework\TestCase;
*/
final class SocialIssueTest extends TestCase
{
- public function testFindSocialIssuesAncestors()
+ public function testFindSocialIssuesAncestors(): void
{
$socialIssues = new ArrayCollection([
$parent = new SocialIssue(),
@@ -40,7 +40,7 @@ final class SocialIssueTest extends TestCase
$this->assertContains($grandChild, $ancestors);
}
- public function testGetAncestors()
+ public function testGetAncestors(): void
{
$parent = new SocialIssue();
$child = (new SocialIssue())->setParent($parent);
@@ -56,7 +56,7 @@ final class SocialIssueTest extends TestCase
$this->assertCount(0, $unrelated->getAncestors(false));
}
- public function testGetDescendantsWithThisForIssues()
+ public function testGetDescendantsWithThisForIssues(): void
{
$parentA = new SocialIssue();
$childA = (new SocialIssue())->setParent($parentA);
@@ -85,7 +85,7 @@ final class SocialIssueTest extends TestCase
$this->assertNotContains($unrelatedB, $actual);
}
- public function testIsDescendantOf()
+ public function testIsDescendantOf(): void
{
$parent = new SocialIssue();
$child = (new SocialIssue())->setParent($parent);
diff --git a/src/Bundle/ChillPersonBundle/Tests/Event/Person/PersonAddressMoveEventTest.php b/src/Bundle/ChillPersonBundle/Tests/Event/Person/PersonAddressMoveEventTest.php
index 0a64099b6..392b99b3d 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Event/Person/PersonAddressMoveEventTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Event/Person/PersonAddressMoveEventTest.php
@@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase;
*/
final class PersonAddressMoveEventTest extends TestCase
{
- public function testPersonChangeAddress()
+ public function testPersonChangeAddress(): void
{
$person = new Person();
@@ -53,7 +53,7 @@ final class PersonAddressMoveEventTest extends TestCase
$this->assertEquals((new \DateTime('1 month ago'))->format('Y-m-d'), $event->getMoveDate()->format('Y-m-d'));
}
- public function testPersonChangeHousehold()
+ public function testPersonChangeHousehold(): void
{
$person = new Person();
@@ -89,7 +89,7 @@ final class PersonAddressMoveEventTest extends TestCase
$this->assertEquals(new \DateTimeImmutable('tomorrow'), $event->getMoveDate());
}
- public function testPersonLeaveHousehold()
+ public function testPersonLeaveHousehold(): void
{
$person = new Person();
diff --git a/src/Bundle/ChillPersonBundle/Tests/EventListener/PersonCreateEventTest.php b/src/Bundle/ChillPersonBundle/Tests/EventListener/PersonCreateEventTest.php
index 417cc6d01..fe2da6e92 100644
--- a/src/Bundle/ChillPersonBundle/Tests/EventListener/PersonCreateEventTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/EventListener/PersonCreateEventTest.php
@@ -48,7 +48,7 @@ final class PersonCreateEventTest extends TestCase
/**
* @dataProvider generateAltNames
*/
- public function testAltNamesOnPrePersist(mixed $altname, mixed $altnameExpected)
+ public function testAltNamesOnPrePersist(mixed $altname, mixed $altnameExpected): void
{
$listener = new PersonEventListener();
@@ -64,7 +64,7 @@ final class PersonCreateEventTest extends TestCase
/**
* @dataProvider generateNames
*/
- public function testOnPrePersist(mixed $firstname, mixed $firstnameExpected, mixed $lastname, mixed $lastnameExpected)
+ public function testOnPrePersist(mixed $firstname, mixed $firstnameExpected, mixed $lastname, mixed $lastnameExpected): void
{
$listener = new PersonEventListener();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php
index 94284efb6..a564abf6c 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregatorTest.php
@@ -32,7 +32,7 @@ final class AdministrativeLocationAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_administrative_location');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\AdministrativeLocationAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php
index ed459fbfd..a72a5bfce 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregatorTest.php
@@ -36,7 +36,7 @@ class ClosingDateAggregatorTest extends AbstractAggregatorTest
self::$entityManager = self::getContainer()->get(EntityManagerInterface::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ClosingDateAggregator
{
return self::$closingDateAggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php
index 4b4978d3c..7e553dcf1 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregatorTest.php
@@ -32,7 +32,7 @@ final class ClosingMotiveAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_closingmotive');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ClosingMotiveAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php
index 752b6ba0b..210845d06 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregatorTest.php
@@ -32,7 +32,7 @@ final class ConfidentialAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_confidential');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ConfidentialAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php
index 8cb9031c6..bd8d661c0 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregatorTest.php
@@ -32,7 +32,7 @@ final class DurationAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_duration');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\DurationAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php
index e63564664..29282f67f 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregatorTest.php
@@ -32,7 +32,7 @@ final class EmergencyAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_emergency');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EmergencyAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php
index 1a322a998..62de9e298 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregatorTest.php
@@ -32,7 +32,7 @@ final class EvaluationAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluation');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\EvaluationAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php
index 85a61ac14..54bc1583c 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregatorTest.php
@@ -34,7 +34,7 @@ final class GeographicalUnitStatAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_geographicalunitstat');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\GeographicalUnitStatAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php
index 483f9a330..f19648a92 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregatorTest.php
@@ -32,7 +32,7 @@ final class IntensityAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_intensity');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\IntensityAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php
index 48e937106..034d5f253 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregatorTest.php
@@ -36,7 +36,7 @@ class OpeningDateAggregatorTest extends AbstractAggregatorTest
self::$entityManager = self::getContainer()->get(EntityManagerInterface::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\OpeningDateAggregator
{
return self::$openingDateAggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php
index ab8e4b4bb..68bb286e0 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregatorTest.php
@@ -32,7 +32,7 @@ final class OriginAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_origin');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\OriginAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php
index 813575749..aa69739ba 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php
@@ -32,7 +32,7 @@ final class PersonParticipatingAggregatorTest extends AbstractAggregatorTest
$this->labelPersonHelper = self::getContainer()->get(LabelPersonHelper::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\PersonParticipatingAggregator
{
return new PersonParticipatingAggregator($this->labelPersonHelper);
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php
index 738769b7b..15c01ae45 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregatorTest.php
@@ -33,7 +33,7 @@ final class ReferrerScopeAggregatorTest extends AbstractAggregatorTest
{
use ProphecyTrait;
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ReferrerScopeAggregator
{
$translatableStringHelper = $this->prophesize(TranslatableStringHelperInterface::class);
$translatableStringHelper->localize(Argument::type('array'))->willReturn('localized');
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php
index 785809c38..ccf00d3c2 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregatorTest.php
@@ -32,7 +32,7 @@ final class RequestorAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_requestor');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\RequestorAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php
index 939966c78..0af909963 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregatorTest.php
@@ -32,7 +32,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_referrer_scope');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ScopeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php
index f76452fd8..70f24e389 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregatorTest.php
@@ -32,7 +32,7 @@ final class SocialActionAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialaction');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialActionAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php
index bad9cec20..6abed858b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregatorTest.php
@@ -32,7 +32,7 @@ final class SocialIssueAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_socialissue');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialIssueAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php
index f4a34e271..10cf35e5b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/StepAggregatorTest.php
@@ -33,7 +33,7 @@ final class StepAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_step');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\StepAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php
index c816799b8..a1d349b16 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php
@@ -36,7 +36,7 @@ class ByClosingMotiveAggregatorTest extends AbstractAggregatorTest
$this->closingMotiveRepository = self::getContainer()->get(ClosingMotiveRepositoryInterface::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingPeriodStepHistoryAggregators\ByClosingMotiveAggregator
{
return new ByClosingMotiveAggregator(
$this->closingMotiveRepository,
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php
index 1fee0d997..aa4569dba 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php
@@ -24,7 +24,7 @@ use Chill\PersonBundle\Export\Aggregator\AccompanyingPeriodStepHistoryAggregator
*/
class ByDateAggregatorTest extends AbstractAggregatorTest
{
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingPeriodStepHistoryAggregators\ByDateAggregator
{
return new ByDateAggregator();
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php
index 58e3e5f61..12a8b24b7 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php
@@ -24,10 +24,10 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class ByStepAggregatorTest extends AbstractAggregatorTest
{
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\AccompanyingPeriodStepHistoryAggregators\ByStepAggregator
{
$translator = new class () implements TranslatorInterface {
- public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null)
+ public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
return $id;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php
index b275be336..d591aed0a 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregatorTest.php
@@ -32,7 +32,7 @@ final class EvaluationTypeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_evaluationtype');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\EvaluationAggregators\EvaluationTypeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php
index 50b3f5b1f..82b120776 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregatorTest.php
@@ -33,7 +33,7 @@ final class ChildrenNumberAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_childrennumber');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\ChildrenNumberAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php
index 2bfbb83a6..4482551a9 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/HouseholdAggregators/CompositionAggregatorTest.php
@@ -33,7 +33,7 @@ final class CompositionAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_composition');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\HouseholdAggregators\CompositionAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php
index 39240dc83..df15d8245 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/AgeAggregatorTest.php
@@ -33,7 +33,7 @@ final class AgeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_age');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\PersonAggregators\AgeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php
index 499484587..0813d5b80 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/CountryOfBirthAggregatorTest.php
@@ -32,7 +32,7 @@ final class CountryOfBirthAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_country_of_birth');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\PersonAggregators\CountryOfBirthAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php
index 7b6978279..ca9855fe6 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/GenderAggregatorTest.php
@@ -32,7 +32,7 @@ final class GenderAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_gender');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\PersonAggregators\GenderAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php
index 951932126..076453704 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/HouseholdPositionAggregatorTest.php
@@ -35,7 +35,7 @@ final class HouseholdPositionAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_household_position');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\PersonAggregators\HouseholdPositionAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php
index 6c19379d2..03360b1e2 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/MaritalStatusAggregatorTest.php
@@ -32,7 +32,7 @@ final class MaritalStatusAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_marital_status');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\PersonAggregators\MaritalStatusAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php
index 73a060f9c..05b03e369 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/NationalityAggregatorTest.php
@@ -32,7 +32,7 @@ final class NationalityAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_nationality');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\PersonAggregators\NationalityAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php
index 98e7f1ba7..dd310d2f9 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/PersonAggregators/PostalCodeAggregatorTest.php
@@ -33,7 +33,7 @@ class PostalCodeAggregatorTest extends AbstractAggregatorTest
$this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\PersonAggregators\PostalCodeAggregator
{
return new PostalCodeAggregator($this->rollingDateConverter);
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php
index c3841fd1e..64a153419 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregatorTest.php
@@ -32,7 +32,7 @@ final class ActionTypeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_action_type');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ActionTypeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php
index 7238000df..670a5242e 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorAggregatorTest.php
@@ -32,7 +32,7 @@ class CreatorAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(CreatorAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\CreatorAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php
index 3bff92a58..0fa8bc923 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregatorTest.php
@@ -32,7 +32,7 @@ class CreatorJobAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(CreatorJobAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\CreatorJobAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php
index 26b1298c5..91ba02de9 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregatorTest.php
@@ -32,7 +32,7 @@ class CreatorScopeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(CreatorScopeAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\CreatorScopeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php
index df3307b86..4effa6d29 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalAggregatorTest.php
@@ -32,7 +32,7 @@ final class GoalAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goal');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php
index 0098d9b9c..18ecc9aab 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/GoalResultAggregatorTest.php
@@ -32,7 +32,7 @@ final class GoalResultAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_goalresult');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalResultAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php
index eef2f8840..c442dc55b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregatorTest.php
@@ -32,7 +32,7 @@ class HandlingThirdPartyAggregatorTest extends AbstractAggregatorTest
self::$handlingThirdPartyAggregator = self::getContainer()->get(HandlingThirdPartyAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\HandlingThirdPartyAggregator
{
return self::$handlingThirdPartyAggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php
index 8b4ae0dc7..e7a3e729f 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/JobAggregatorTest.php
@@ -32,7 +32,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_job');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\JobAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php
index fd1f0ffc5..63a1077e4 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ReferrerAggregatorTest.php
@@ -33,7 +33,7 @@ final class ReferrerAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get(ReferrerAggregator::class);
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ReferrerAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php
index 28f970dd0..c82102760 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ResultAggregatorTest.php
@@ -32,7 +32,7 @@ final class ResultAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_result');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ResultAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php
index 26aeb6690..7f6418709 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/SocialWorkAggregators/ScopeAggregatorTest.php
@@ -32,7 +32,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
$this->aggregator = self::getContainer()->get('chill.person.export.aggregator_treatingagent_scope');
}
- public function getAggregator()
+ public function getAggregator(): \Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ScopeAggregator
{
return $this->aggregator;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php
index 09be30f1f..e8e085107 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilterTest.php
@@ -33,7 +33,7 @@ final class ActiveOnDateFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_activeondate');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOnDateFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php
index 8fd75acd6..991a125b4 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilterTest.php
@@ -33,7 +33,7 @@ final class ActiveOneDayBetweenDatesFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_activeonedaybetweendates');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ActiveOneDayBetweenDatesFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php
index a9c5e6f50..b9868f444 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilterTest.php
@@ -32,7 +32,7 @@ final class AdministrativeLocationFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_administrative_location');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\AdministrativeLocationFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php
index 7b333df00..4e76dae59 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilterTest.php
@@ -33,7 +33,7 @@ final class ClosingMotiveFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_closingmotive');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ClosingMotiveFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php
index e2f20df2c..7bbd28f7b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ConfidentialFilterTest.php
@@ -31,7 +31,7 @@ final class ConfidentialFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_confidential');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ConfidentialFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php
index ecc98d4fc..3a67d4b42 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EmergencyFilterTest.php
@@ -31,7 +31,7 @@ final class EmergencyFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_emergency');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\EmergencyFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php
index 8a9fb3c51..dcfa1cdd7 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/EvaluationFilterTest.php
@@ -32,7 +32,7 @@ final class EvaluationFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_evaluation');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\EvaluationFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php
index 1f5323b82..dda1d1cf2 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilterTest.php
@@ -34,7 +34,7 @@ final class GeographicalUnitStatFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_geographicalunitstat');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\GeographicalUnitStatFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilterTest.php
index 0e5be0f64..17a6cb8b9 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilterTest.php
@@ -33,7 +33,7 @@ class HasTemporaryLocationFilterTest extends AbstractFilterTest
$this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\HasTemporaryLocationFilter
{
return new HasTemporaryLocationFilter($this->rollingDateConverter);
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php
index 8759b6881..8b0ff75a4 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/IntensityFilterTest.php
@@ -32,7 +32,7 @@ final class IntensityFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_intensity');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\IntensityFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilterTest.php
index 4b4b17609..a2218600f 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilterTest.php
@@ -28,7 +28,7 @@ class NotAssociatedWithAReferenceAddressFilterTest extends AbstractFilterTest
{
use ProphecyTrait;
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\NotAssociatedWithAReferenceAddressFilter
{
$dateConverter = new class () implements RollingDateConverterInterface {
public function convert(?RollingDate $rollingDate): ?\DateTimeImmutable
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php
index 17515628a..4fcae7ed0 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilterTest.php
@@ -33,7 +33,7 @@ final class OpenBetweenDatesFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_openbetweendates');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OpenBetweenDatesFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php
index 1e22d0a57..a83720119 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/OriginFilterTest.php
@@ -33,7 +33,7 @@ final class OriginFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_origin');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OriginFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php
index 8415e2017..dd0943ff4 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php
@@ -38,7 +38,7 @@ class ReferrerFilterBetweenDatesTest extends AbstractFilterTest
$this->userRender = self::getContainer()->get(UserRender::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ReferrerFilterBetweenDates
{
return new ReferrerFilterBetweenDates($this->rollingDateConverter, $this->userRender);
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php
index 45bb6df46..7ef1d805b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php
@@ -34,7 +34,7 @@ final class ReferrerFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(ReferrerFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ReferrerFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php
index 459ff303f..b160ba6e6 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/RequestorFilterTest.php
@@ -32,7 +32,7 @@ final class RequestorFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_requestor');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\RequestorFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php
index c90369d2d..7be5381a3 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialActionFilterTest.php
@@ -34,7 +34,7 @@ final class SocialActionFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_socialaction');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\SocialActionFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php
index 8fba85161..4e8a4431b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/SocialIssueFilterTest.php
@@ -34,7 +34,7 @@ final class SocialIssueFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_socialissue');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\SocialIssueFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php
index c0c2ec249..deb7fa0e6 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/StepFilterTest.php
@@ -33,7 +33,7 @@ final class StepFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(StepFilterOnDate::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\StepFilterOnDate
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php
index b1010ffe0..8ccda77ac 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserJobFilterTest.php
@@ -35,7 +35,7 @@ final class UserJobFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(UserJobFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\UserJobFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserScopeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserScopeFilterTest.php
index ac0e5c843..2a73a2ce6 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserScopeFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/UserScopeFilterTest.php
@@ -35,7 +35,7 @@ final class UserScopeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(UserScopeFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\UserScopeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilterTest.php
index a98d0c78e..73f02ac1f 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilterTest.php
@@ -35,7 +35,7 @@ class ByDateFilterTest extends AbstractFilterTest
$this->rollingDateConverter = self::getContainer()->get(RollingDateConverterInterface::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingPeriodStepHistoryFilters\ByDateFilter
{
return new ByDateFilter($this->rollingDateConverter);
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php
index 03bfa8435..30bb908fc 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php
@@ -25,10 +25,10 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class ByStepFilterTest extends AbstractFilterTest
{
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingPeriodStepHistoryFilters\ByStepFilter
{
$translator = new class () implements TranslatorInterface {
- public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null)
+ public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
{
return $id;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php
index 415d2219e..610fd4e3b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/EvaluationTypeFilterTest.php
@@ -33,7 +33,7 @@ final class EvaluationTypeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_evaluationtype');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\EvaluationFilters\EvaluationTypeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php
index 42adf71c0..b081ef91a 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/EvaluationFilters/MaxDateFilterTest.php
@@ -32,7 +32,7 @@ final class MaxDateFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_maxdate');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\EvaluationFilters\MaxDateFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php
index e7c12bd1b..799aa57a3 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/AgeFilterTest.php
@@ -33,7 +33,7 @@ final class AgeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_age');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\AgeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php
index 51d40c9c3..6e678f53d 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/BirthdateFilterTest.php
@@ -33,7 +33,7 @@ final class BirthdateFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_birthdate');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\BirthdateFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php
index 044524ff0..ac6df894d 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeadOrAliveFilterTest.php
@@ -33,7 +33,7 @@ final class DeadOrAliveFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_dead_or_alive');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\DeadOrAliveFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php
index 419f8d6bd..28c8dba73 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/DeathdateFilterTest.php
@@ -33,7 +33,7 @@ final class DeathdateFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_deathdate');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\DeathdateFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php
index 7273e9abc..4b51ce6be 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/GenderFilterTest.php
@@ -32,7 +32,7 @@ final class GenderFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_gender');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\GenderFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php
index 6c51b08d3..fd8ed7d07 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/MaritalStatusFilterTest.php
@@ -33,7 +33,7 @@ final class MaritalStatusFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_marital_status');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\MaritalStatusFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php
index b8d71a62d..08a19af91 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/NationalityFilterTest.php
@@ -33,7 +33,7 @@ final class NationalityFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_nationality');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\NationalityFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php
index ed5138511..dd769cb7e 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilterTest.php
@@ -36,7 +36,7 @@ final class ResidentialAddressAtThirdpartyFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_residential_address_at_thirdparty');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\ResidentialAddressAtThirdpartyFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php
index bbb31febe..48e3c9817 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/ResidentialAddressAtUserFilterTest.php
@@ -34,7 +34,7 @@ final class ResidentialAddressAtUserFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_residential_address_at_user');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\ResidentialAddressAtUserFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php
index d9b86c81b..7d351bbd4 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php
@@ -33,7 +33,7 @@ final class WithParticipationBetweenDatesFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(WithParticipationBetweenDatesFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\WithParticipationBetweenDatesFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilterTest.php
index 09d809bf8..abaf4b65e 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilterTest.php
@@ -33,7 +33,7 @@ final class WithoutParticipationBetweenDatesFilterTest extends AbstractFilterTes
$this->filter = self::getContainer()->get(WithoutParticipationBetweenDatesFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\PersonFilters\WithoutParticipationBetweenDatesFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorFilterTest.php
index e7c4ee8e6..09dbddd67 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorFilterTest.php
@@ -33,7 +33,7 @@ class CreatorFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(CreatorFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\SocialWorkFilters\CreatorFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorJobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorJobFilterTest.php
index 19d6631e8..69c80b15d 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorJobFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorJobFilterTest.php
@@ -34,7 +34,7 @@ class CreatorJobFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(CreatorJobFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\SocialWorkFilters\CreatorJobFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorScopeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorScopeFilterTest.php
index 3e1f98d3e..3ded3f3b8 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorScopeFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/CreatorScopeFilterTest.php
@@ -33,7 +33,7 @@ class CreatorScopeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(CreatorScopeFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\SocialWorkFilters\CreatorScopeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/HandlingThirdPartyFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/HandlingThirdPartyFilterTest.php
index 46a1a95e1..1cf96a79b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/HandlingThirdPartyFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/HandlingThirdPartyFilterTest.php
@@ -34,7 +34,7 @@ class HandlingThirdPartyFilterTest extends AbstractFilterTest
$this->thirdPartyRender = self::getContainer()->get(ThirdPartyRender::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\HandlingThirdPartyFilter
{
return new HandlingThirdPartyFilter($this->thirdPartyRender);
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php
index fbe232941..f9cbdc4a8 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/JobFilterTest.php
@@ -34,7 +34,7 @@ final class JobFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_job');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\SocialWorkFilters\JobFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php
index d185ac499..ee67b61be 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ReferrerFilterTest.php
@@ -34,7 +34,7 @@ final class ReferrerFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_treatingagent');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\SocialWorkFilters\ReferrerFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php
index cc47a598f..48ce583ac 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/ScopeFilterTest.php
@@ -33,7 +33,7 @@ final class ScopeFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get('chill.person.export.filter_scope');
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\SocialWorkFilters\ScopeFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/WithEvaluationBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/WithEvaluationBetweenDatesFilterTest.php
index b2dc7c217..6e1465b68 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/WithEvaluationBetweenDatesFilterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/SocialWorkFilters/WithEvaluationBetweenDatesFilterTest.php
@@ -33,7 +33,7 @@ final class WithEvaluationBetweenDatesFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\PersonBundle\Export\Filter\SocialWorkFilters\AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php
index 4b879149c..35e823041 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Form/Type/PickPersonTypeTest.php
@@ -66,7 +66,7 @@ final class PickPersonTypeTest extends KernelTestCase
* Test the form with an option 'centers' with an unique center
* entity (not in an array).
*/
- public function testWithOptionCenter()
+ public function testWithOptionCenter(): void
{
$this->markTestSkipped('need to inject locale into url generator without request');
$center = self::getContainer()->get('doctrine.orm.entity_manager')
@@ -99,7 +99,7 @@ final class PickPersonTypeTest extends KernelTestCase
/**
* Test the form with multiple centers.
*/
- public function testWithOptionCenters()
+ public function testWithOptionCenters(): void
{
$this->markTestSkipped('need to inject locale into url generator without request');
$centers = self::getContainer()->get('doctrine.orm.entity_manager')
@@ -142,7 +142,7 @@ final class PickPersonTypeTest extends KernelTestCase
$this->assertEquals(0, \count($view->vars['choices']));
}
- public function testWithoutOption()
+ public function testWithoutOption(): void
{
$this->markTestSkipped('need to inject locale into url generator without request');
diff --git a/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php b/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php
index 4e7f0dd9c..f15ab06d4 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php
@@ -39,7 +39,7 @@ final class MembersEditorTest extends TestCase
$this->factory = $this->buildMembersEditorFactory();
}
- public function testAddingParticipationNotSharingHouseholdCloseTheOldOnes()
+ public function testAddingParticipationNotSharingHouseholdCloseTheOldOnes(): void
{
$person = new Person();
$position = (new Position())->setShareHousehold(false);
@@ -76,7 +76,7 @@ final class MembersEditorTest extends TestCase
/**
* We test that a leave move is possible when member startdate is same as current date.
*/
- public function testLeaveMovementInSameHouseholdFromShareHouseholdToNotShareHouseholdOnSameDate()
+ public function testLeaveMovementInSameHouseholdFromShareHouseholdToNotShareHouseholdOnSameDate(): void
{
$person = new Person();
$household = new Household();
@@ -129,7 +129,7 @@ final class MembersEditorTest extends TestCase
*
* The person should stays in the two households
*/
- public function testMoveFromSharingHouseholdToNotSharingHousehouldInDifferentHousehold()
+ public function testMoveFromSharingHouseholdToNotSharingHousehouldInDifferentHousehold(): void
{
$person = new Person();
$household = new Household();
@@ -174,7 +174,7 @@ final class MembersEditorTest extends TestCase
* * which was in a position "sharing household"
* * which move to the same household, in a position "not sharing household"
*/
- public function testMoveFromSharingHouseholdToNotSharingHousehouldInSamehouseholdOnDifferentDate()
+ public function testMoveFromSharingHouseholdToNotSharingHousehouldInSamehouseholdOnDifferentDate(): void
{
$person = new Person();
$household = new Household();
@@ -219,7 +219,7 @@ final class MembersEditorTest extends TestCase
* * which was in a position "not sharing household"
* * which move to the same household, in a position "sharing household"
*/
- public function testMoveFromNotSharingHouseholdToSharingHousehouldInSamehousehold()
+ public function testMoveFromNotSharingHouseholdToSharingHousehouldInSamehousehold(): void
{
$person = new Person();
$household = new Household();
@@ -258,7 +258,7 @@ final class MembersEditorTest extends TestCase
* * which was in a position "not sharing household"
* * which move to the same household, in a position "sharing household"
*/
- public function testMoveFromNotSharingHouseholdToSharingHousehouldInSamehouseholdOnSameDate()
+ public function testMoveFromNotSharingHouseholdToSharingHousehouldInSamehouseholdOnSameDate(): void
{
$person = new Person();
$household = new Household();
@@ -291,7 +291,7 @@ final class MembersEditorTest extends TestCase
$this->assertNotContains($person, $notSharing->map($getPerson));
}
- public function testMovePersonWithoutSharedHousehold()
+ public function testMovePersonWithoutSharedHousehold(): void
{
$person = new Person();
$position = (new Position())
@@ -334,7 +334,7 @@ final class MembersEditorTest extends TestCase
);
}
- public function testMovePersonWithSharedHousehold()
+ public function testMovePersonWithSharedHousehold(): void
{
$person = new Person();
$position = (new Position())
@@ -378,7 +378,7 @@ final class MembersEditorTest extends TestCase
$this->assertEquals($date, $membership1->getEndDate());
}
- public function testPostMoveToAPositionNotSharingHouseholdOnSameDay()
+ public function testPostMoveToAPositionNotSharingHouseholdOnSameDay(): void
{
$person = new Person();
$positionNotSharing = (new Position())
@@ -429,7 +429,7 @@ final class MembersEditorTest extends TestCase
);
}
- public function testPostMoveToAPositionNotSharingHouseholdOnDifferentDays()
+ public function testPostMoveToAPositionNotSharingHouseholdOnDifferentDays(): void
{
$person = new Person();
$positionNotSharing = (new Position())
@@ -480,7 +480,7 @@ final class MembersEditorTest extends TestCase
);
}
- public function testPostMoveToAPositionSharingHouseholdAndSameHousehold()
+ public function testPostMoveToAPositionSharingHouseholdAndSameHousehold(): void
{
$person = new Person();
$position = (new Position())
@@ -510,7 +510,7 @@ final class MembersEditorTest extends TestCase
$editor->postMove();
}
- public function testPostMoveToAPositionSharingHouseholdFromDifferentHousehold()
+ public function testPostMoveToAPositionSharingHouseholdFromDifferentHousehold(): void
{
$person = new Person();
$position = (new Position())
@@ -539,7 +539,7 @@ final class MembersEditorTest extends TestCase
$editor->postMove();
}
- public function testPostMoveToAPositionSharingHouseholdFromNoHousehold()
+ public function testPostMoveToAPositionSharingHouseholdFromNoHousehold(): void
{
$person = new Person();
$position = (new Position())
@@ -563,7 +563,7 @@ final class MembersEditorTest extends TestCase
private function buildMembersEditorFactory(
?EventDispatcherInterface $eventDispatcher = null,
?ValidatorInterface $validator = null,
- ) {
+ ): \Chill\PersonBundle\Household\MembersEditorFactory {
if (null === $eventDispatcher) {
$double = $this->getProphet()->prophesize();
$double->willImplement(EventDispatcherInterface::class);
diff --git a/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php b/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php
index 94df35d88..0c51fc9eb 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Repository/PersonACLAwareRepositoryTest.php
@@ -48,7 +48,7 @@ final class PersonACLAwareRepositoryTest extends KernelTestCase
$this->centerRepository = self::getContainer()->get(CenterRepositoryInterface::class);
}
- public function testCountByCriteria()
+ public function testCountByCriteria(): void
{
$user = new User();
@@ -71,7 +71,7 @@ final class PersonACLAwareRepositoryTest extends KernelTestCase
$this->assertGreaterThan(0, $number);
}
- public function testFindByCriteria()
+ public function testFindByCriteria(): void
{
$user = new User();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php b/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php
index 1577ef2fe..9445f6f32 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Search/PersonSearchTest.php
@@ -50,7 +50,7 @@ final class PersonSearchTest extends WebTestCase
$this->assertMatchesRegularExpression('/Étienne/', $crawlerNoSpecial->filter('.list-with-period')->text());
}
- public function testExpected()
+ public function testExpected(): void
{
$client = $this->getAuthenticatedClient();
@@ -61,7 +61,7 @@ final class PersonSearchTest extends WebTestCase
$this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text());
}
- public function testExpectedNamed()
+ public function testExpectedNamed(): void
{
$client = $this->getAuthenticatedClient();
@@ -72,7 +72,7 @@ final class PersonSearchTest extends WebTestCase
$this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text());
}
- public function testLastNameAccentued()
+ public function testLastNameAccentued(): void
{
$crawlerSpecial = $this->generateCrawlerForSearch('@person lastname:manço');
@@ -85,7 +85,7 @@ final class PersonSearchTest extends WebTestCase
$this->assertMatchesRegularExpression('/MANÇO/', $crawlerNoSpecial->filter('.list-with-period')->text());
}
- public function testSearchBirthdate()
+ public function testSearchBirthdate(): void
{
$crawler = $this->generateCrawlerForSearch('@person birthdate:1948-12-27');
@@ -93,14 +93,14 @@ final class PersonSearchTest extends WebTestCase
$this->assertMatchesRegularExpression('/Bart/', $crawler->filter('.list-with-period')->text());
}
- public function testSearchByFirstName()
+ public function testSearchByFirstName(): void
{
$crawler = $this->generateCrawlerForSearch('@person firstname:Jean');
$this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text());
}
- public function testSearchByFirstNameAccented()
+ public function testSearchByFirstNameAccented(): void
{
$crawlerSpecial = $this->generateCrawlerForSearch('@person firstname:Gérard');
@@ -113,35 +113,35 @@ final class PersonSearchTest extends WebTestCase
$this->assertMatchesRegularExpression('/Gérard/', $crawlerNoSpecial->filter('.list-with-period')->text());
}
- public function testSearchByFirstNameLower()
+ public function testSearchByFirstNameLower(): void
{
$crawler = $this->generateCrawlerForSearch('@person firstname:Gérard');
$this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text());
}
- public function testSearchByFirstNameLower2()
+ public function testSearchByFirstNameLower2(): void
{
$crawler = $this->generateCrawlerForSearch('@person firstname:jean');
$this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text());
}
- public function testSearchByFirstNamePartim()
+ public function testSearchByFirstNamePartim(): void
{
$crawler = $this->generateCrawlerForSearch('@person firstname:Ger');
$this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text());
}
- public function testSearchByFirstNamePartim2()
+ public function testSearchByFirstNamePartim2(): void
{
$crawler = $this->generateCrawlerForSearch('@person firstname:ean');
$this->assertMatchesRegularExpression('/DEPARDIEU/', $crawler->filter('.list-with-period')->text());
}
- public function testSearchByLastName()
+ public function testSearchByLastName(): void
{
$crawler = $this->generateCrawlerForSearch('@person lastname:Depardieu');
@@ -207,7 +207,7 @@ final class PersonSearchTest extends WebTestCase
/**
* test that person which a user cannot see are not displayed in results.
*/
- public function testSearchWithAuthorization()
+ public function testSearchWithAuthorization(): void
{
$crawlerCanSee = $this->generateCrawlerForSearch('Gérard', 'center a_social');
@@ -242,7 +242,7 @@ final class PersonSearchTest extends WebTestCase
/**
* @return \Symfony\Component\BrowserKit\AbstractBrowser
*/
- private function getAuthenticatedClient(mixed $username = 'center a_social')
+ private function getAuthenticatedClient(mixed $username = 'center a_social'): \Symfony\Bundle\FrameworkBundle\KernelBrowser
{
return $this->getClientAuthenticated($username);
}
diff --git a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php
index da46b8eb7..154a80cea 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php
@@ -53,7 +53,7 @@ final class PersonVoterTest extends KernelTestCase
$this->prophet = new \Prophecy\Prophet();
}
- public function testNullUser()
+ public function testNullUser(): void
{
$token = $this->prepareToken();
$center = $this->prepareCenter(1, 'center');
@@ -69,7 +69,7 @@ final class PersonVoterTest extends KernelTestCase
/**
* test a user with sufficient right may see the person.
*/
- public function testUserAllowed()
+ public function testUserAllowed(): void
{
$center = $this->prepareCenter(1, 'center');
$scope = $this->prepareScope(1, 'default');
@@ -93,7 +93,7 @@ final class PersonVoterTest extends KernelTestCase
* test a user with sufficient right may see the person.
* hierarchy between role is required.
*/
- public function testUserAllowedWithInheritance()
+ public function testUserAllowedWithInheritance(): void
{
$center = $this->prepareCenter(1, 'center');
$scope = $this->prepareScope(1, 'default');
@@ -112,7 +112,7 @@ final class PersonVoterTest extends KernelTestCase
);
}
- public function testUserCanNotReachCenter()
+ public function testUserCanNotReachCenter(): void
{
$centerA = $this->prepareCenter(1, 'centera');
$centerB = $this->prepareCenter(2, 'centerb');
@@ -140,7 +140,7 @@ final class PersonVoterTest extends KernelTestCase
*
* @return Person
*/
- protected function preparePerson(Center $center)
+ protected function preparePerson(Center $center): \Chill\PersonBundle\Entity\Person
{
return (new Person())
->setCenter($center);
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizerTest.php
index 99cf07488..0cf60ba2d 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizerTest.php
@@ -33,7 +33,7 @@ final class AccompanyingPeriodDocGenNormalizerTest extends KernelTestCase
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
}
- public function testNormalizationNullOrNotNullHaveSameKeys()
+ public function testNormalizationNullOrNotNullHaveSameKeys(): void
{
$period = new AccompanyingPeriod();
$notNullData = $this->normalizer->normalize($period, 'docgen', ['docgen:expects' => AccompanyingPeriod::class]);
@@ -46,7 +46,7 @@ final class AccompanyingPeriodDocGenNormalizerTest extends KernelTestCase
);
}
- public function testNormalize()
+ public function testNormalize(): void
{
$period = new AccompanyingPeriod();
$period->setConfidential(true);
@@ -121,14 +121,14 @@ final class AccompanyingPeriodDocGenNormalizerTest extends KernelTestCase
$this->assertCount(2, $data['participations']);
}
- public function testNormalizeNull()
+ public function testNormalizeNull(): void
{
$data = $this->normalizer->normalize(null, 'docgen', ['docgen:expects' => AccompanyingPeriod::class]);
$this->assertIsArray($data);
}
- public function testNormalizeParticipations()
+ public function testNormalizeParticipations(): void
{
$period = new AccompanyingPeriod();
$period->addPerson($person = new Person());
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php
index 5e775a53f..b18222d3f 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodOriginNormalizerTest.php
@@ -30,7 +30,7 @@ final class AccompanyingPeriodOriginNormalizerTest extends KernelTestCase
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
}
- public function testNormalization()
+ public function testNormalization(): void
{
$o = new Origin();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodResourceNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodResourceNormalizerTest.php
index 35fbecbf2..31a638f16 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodResourceNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodResourceNormalizerTest.php
@@ -32,7 +32,7 @@ final class AccompanyingPeriodResourceNormalizerTest extends KernelTestCase
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
}
- public function testNormalizeNullHasSameValueAsNotNull()
+ public function testNormalizeNullHasSameValueAsNotNull(): void
{
$nullResource = $this->normalizer->normalize(null, 'docgen', ['groups' => 'docgen:read', 'docgen:expects' => Resource::class]);
$notNull = $this->normalizer->normalize(new Resource(), 'docgen', ['groups' => 'docgen:read', 'docgen:expects' => Resource::class]);
@@ -40,7 +40,7 @@ final class AccompanyingPeriodResourceNormalizerTest extends KernelTestCase
$this->assertEqualsCanonicalizing(array_keys($notNull), array_keys($nullResource));
}
- public function testNormalizeResource()
+ public function testNormalizeResource(): void
{
$resource = new Resource();
$resource
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php
index 961a016f8..7879c7d79 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/AccompanyingPeriodWorkDocGenNormalizerTest.php
@@ -65,7 +65,7 @@ final class AccompanyingPeriodWorkDocGenNormalizerTest extends DocGenNormalizerT
return $this->normalizer;
}
- public function testNormalize()
+ public function testNormalize(): void
{
$work = new AccompanyingPeriodWork();
$work
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php
index fb2e54fe9..5ac0298f2 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php
@@ -105,7 +105,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
/**
* @dataProvider dataGeneratorNormalizationNullOrNotNullHaveSameKeys
*/
- public function testNormalizationNullOrNotNullHaveSameKeys(mixed $context)
+ public function testNormalizationNullOrNotNullHaveSameKeys(mixed $context): void
{
$period = new Person();
$notNullData = $this->buildPersonNormalizer()->normalize($period, 'docgen', $context);
@@ -121,7 +121,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
/**
* @dataProvider generateData
*/
- public function testNormalize(?Person $person, mixed $expected, mixed $msg)
+ public function testNormalize(?Person $person, mixed $expected, mixed $msg): void
{
$normalized = $this->normalizer->normalize($person, 'docgen', [
'docgen:expects' => Person::class,
@@ -140,7 +140,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
$this->assertEqualsCanonicalizing(array_keys($expected), array_keys($normalized), $msg);
}
- public function testNormalizePersonWithHousehold()
+ public function testNormalizePersonWithHousehold(): void
{
$household = new Household();
$person = new Person();
@@ -180,7 +180,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
$this->assertCount(2, $actual['household']['members']);
}
- public function testNormalizePersonWithRelationships()
+ public function testNormalizePersonWithRelationships(): void
{
$person = (new Person())->setFirstName('Renaud')->setLastName('megane');
$father = (new Person())->setFirstName('Clément')->setLastName('megane');
@@ -221,7 +221,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
*
* @dataProvider generateData
*/
- public function testNormalizeUsingNormalizer(?Person $person, mixed $expected, mixed $msg)
+ public function testNormalizeUsingNormalizer(?Person $person, mixed $expected, mixed $msg): void
{
$normalizer = $this->buildNormalizer();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php
index af78e2475..3463e3840 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonJsonNormalizerTest.php
@@ -54,7 +54,7 @@ final class PersonJsonNormalizerTest extends KernelTestCase
);
}
- public function testNormalization()
+ public function testNormalization(): void
{
$person = new Person();
$result = $this->normalizer->normalize($person, 'json', [AbstractNormalizer::GROUPS => ['read']]);
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/RelationshipDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/RelationshipDocGenNormalizerTest.php
index ead8b7284..85bc0ea74 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/RelationshipDocGenNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/RelationshipDocGenNormalizerTest.php
@@ -30,7 +30,7 @@ final class RelationshipDocGenNormalizerTest extends TestCase
{
use ProphecyTrait;
- public function testNormalizeRelationshipNull()
+ public function testNormalizeRelationshipNull(): void
{
$relationship = null;
@@ -54,7 +54,7 @@ final class RelationshipDocGenNormalizerTest extends TestCase
);
}
- public function testNormalizeRelationshipWithCounterPart()
+ public function testNormalizeRelationshipWithCounterPart(): void
{
$relationship = new Relationship();
$relationship
@@ -85,7 +85,7 @@ final class RelationshipDocGenNormalizerTest extends TestCase
$this->assertEquals(spl_object_hash($person2), $actual['opposite']['hash']);
}
- public function testNormalizeRelationshipWithoutCounterPart()
+ public function testNormalizeRelationshipWithoutCounterPart(): void
{
$relationship = new Relationship();
$relationship
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php
index c2776b4dc..ce23f1ce1 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/ResourceJsonNormalizerTest.php
@@ -31,7 +31,7 @@ final class ResourceJsonNormalizerTest extends KernelTestCase
$this->denormalizer = self::getContainer()->get(DenormalizerInterface::class);
}
- public function testDenormalize()
+ public function testDenormalize(): void
{
$resource = new Resource();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php
index 2d8bf9474..85801a49c 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialActionNormalizerTest.php
@@ -30,7 +30,7 @@ final class SocialActionNormalizerTest extends KernelTestCase
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
}
- public function testNormalization()
+ public function testNormalization(): void
{
$sa = new SocialAction();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php
index 6a7a63341..fe4b7eb8c 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/SocialIssueNormalizerTest.php
@@ -30,7 +30,7 @@ final class SocialIssueNormalizerTest extends KernelTestCase
$this->normalizer = self::getContainer()->get(NormalizerInterface::class);
}
- public function testNormalization()
+ public function testNormalization(): void
{
$si = new SocialIssue();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriod/ProvideThirdPartiesAssociatedTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriod/ProvideThirdPartiesAssociatedTest.php
index ccc2a902e..22a57b2a5 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriod/ProvideThirdPartiesAssociatedTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriod/ProvideThirdPartiesAssociatedTest.php
@@ -24,7 +24,7 @@ use PHPUnit\Framework\TestCase;
*/
class ProvideThirdPartiesAssociatedTest extends TestCase
{
- public function testGetThirdPartiesAssociated()
+ public function testGetThirdPartiesAssociated(): void
{
$period = new AccompanyingPeriod();
$period->setRequestor($tp1 = new ThirdParty());
diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriodWork/ProvideThirdPartiesAssociatedTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriodWork/ProvideThirdPartiesAssociatedTest.php
index 5ce7b953e..229b2ac07 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriodWork/ProvideThirdPartiesAssociatedTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriodWork/ProvideThirdPartiesAssociatedTest.php
@@ -24,7 +24,7 @@ use PHPUnit\Framework\TestCase;
*/
class ProvideThirdPartiesAssociatedTest extends TestCase
{
- public function testGetThirdPartiesAssociated()
+ public function testGetThirdPartiesAssociated(): void
{
$period = new AccompanyingPeriod();
$period->setRequestor($tp1 = new ThirdParty());
diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriodWorkEvaluationDocument/AccompanyingPeriodWorkEvaluationDocumentDuplicatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriodWorkEvaluationDocument/AccompanyingPeriodWorkEvaluationDocumentDuplicatorTest.php
index e24caef63..62844cf5b 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriodWorkEvaluationDocument/AccompanyingPeriodWorkEvaluationDocumentDuplicatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Service/AccompanyingPeriodWorkEvaluationDocument/AccompanyingPeriodWorkEvaluationDocumentDuplicatorTest.php
@@ -27,7 +27,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class AccompanyingPeriodWorkEvaluationDocumentDuplicatorTest extends TestCase
{
- public function testDuplicate()
+ public function testDuplicate(): void
{
$storedObject = new StoredObject();
$evaluation = new AccompanyingPeriodWorkEvaluation();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php
index 8d46105f5..d341f94d1 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php
@@ -193,7 +193,7 @@ final class PersonContextTest extends KernelTestCase
/**
* Test that the build person context works in the case when 'form_show_scope' is false.
*/
- public function testScopeDoNotShowScopeInForms()
+ public function testScopeDoNotShowScopeInForms(): void
{
$person = new Person();
$docGen = (new DocGeneratorTemplate())
@@ -235,7 +235,7 @@ final class PersonContextTest extends KernelTestCase
);
}
- public function testScopeScopeMustBeShownInFormsAndUserAccessMultipleScope()
+ public function testScopeScopeMustBeShownInFormsAndUserAccessMultipleScope(): void
{
$person = new Person();
$docGen = (new DocGeneratorTemplate())
@@ -279,7 +279,7 @@ final class PersonContextTest extends KernelTestCase
);
}
- public function testScopeScopeMustBeShownInFormsAndUserAccessOneScope()
+ public function testScopeScopeMustBeShownInFormsAndUserAccessOneScope(): void
{
$person = new Person();
$docGen = (new DocGeneratorTemplate())
diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextWithThirdPartyTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextWithThirdPartyTest.php
index 60d958a88..5eeaa3d74 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextWithThirdPartyTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextWithThirdPartyTest.php
@@ -31,7 +31,7 @@ final class PersonContextWithThirdPartyTest extends KernelTestCase
{
use ProphecyTrait;
- public function testAdminFormReverseTransform()
+ public function testAdminFormReverseTransform(): void
{
$personContext = $this->buildPersonContextWithThirdParty();
@@ -42,7 +42,7 @@ final class PersonContextWithThirdPartyTest extends KernelTestCase
$this->assertEquals('bloup', $actual['label']);
}
- public function testAdminFormTransform()
+ public function testAdminFormTransform(): void
{
$personContext = $this->buildPersonContextWithThirdParty();
@@ -53,7 +53,7 @@ final class PersonContextWithThirdPartyTest extends KernelTestCase
$this->assertEquals('bloup', $actual['label']);
}
- public function testGetData()
+ public function testGetData(): void
{
$personContext = $this->buildPersonContextWithThirdParty();
diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php
index 72747b478..992802cca 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Validator/AccompanyingPeriod/LocationValidityValidatorTest.php
@@ -25,7 +25,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
*/
final class LocationValidityValidatorTest extends ConstraintValidatorTestCase
{
- public function testPeriodDoesNotContainsPersonOnAnyPerson()
+ public function testPeriodDoesNotContainsPersonOnAnyPerson(): void
{
$constraint = $this->getConstraint();
@@ -42,7 +42,7 @@ final class LocationValidityValidatorTest extends ConstraintValidatorTestCase
->assertRaised();
}
- public function testPeriodDoesNotContainsPersonOnOtherPerson()
+ public function testPeriodDoesNotContainsPersonOnOtherPerson(): void
{
$constraint = $this->getConstraint();
@@ -62,7 +62,7 @@ final class LocationValidityValidatorTest extends ConstraintValidatorTestCase
->assertRaised();
}
- public function testPeriodDoesNotContainsPersonOnRemovedPerson()
+ public function testPeriodDoesNotContainsPersonOnRemovedPerson(): void
{
$constraint = $this->getConstraint();
@@ -83,7 +83,7 @@ final class LocationValidityValidatorTest extends ConstraintValidatorTestCase
->assertRaised();
}
- public function testRemoveLocationOnPeriodValidated()
+ public function testRemoveLocationOnPeriodValidated(): void
{
$constraint = $this->getConstraint();
@@ -96,7 +96,7 @@ final class LocationValidityValidatorTest extends ConstraintValidatorTestCase
->assertRaised();
}
- public function testValidAddress()
+ public function testValidAddress(): void
{
$constraint = $this->getConstraint();
@@ -111,7 +111,7 @@ final class LocationValidityValidatorTest extends ConstraintValidatorTestCase
$this->assertNoViolation();
}
- protected function createValidator()
+ protected function createValidator(): \Symfony\Component\Validator\ConstraintValidatorInterface
{
$render = $this->createMock(PersonRender::class);
$render->method('renderString')
@@ -120,7 +120,7 @@ final class LocationValidityValidatorTest extends ConstraintValidatorTestCase
return new LocationValidityValidator($render);
}
- protected function getConstraint()
+ protected function getConstraint(): \Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\LocationValidity
{
return new LocationValidity([
'messagePersonLocatedMustBeAssociated' => 'messagePersonLocatedMustBeAssociated',
diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Household/HouseholdMembershipSequentialValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Household/HouseholdMembershipSequentialValidatorTest.php
index da747a52c..6bdda5fb9 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Validator/Household/HouseholdMembershipSequentialValidatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Household/HouseholdMembershipSequentialValidatorTest.php
@@ -27,7 +27,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
*/
final class HouseholdMembershipSequentialValidatorTest extends ConstraintValidatorTestCase
{
- public function testEmptyPerson()
+ public function testEmptyPerson(): void
{
$constraint = $this->getConstraint();
@@ -38,7 +38,7 @@ final class HouseholdMembershipSequentialValidatorTest extends ConstraintValidat
$this->assertNoViolation();
}
- public function testMembershipCovering()
+ public function testMembershipCovering(): void
{
$constraint = $this->getConstraint();
@@ -66,7 +66,7 @@ final class HouseholdMembershipSequentialValidatorTest extends ConstraintValidat
->assertRaised();
}
- public function testMembershipCoveringNoShareHousehold()
+ public function testMembershipCoveringNoShareHousehold(): void
{
$constraint = $this->getConstraint();
@@ -88,7 +88,7 @@ final class HouseholdMembershipSequentialValidatorTest extends ConstraintValidat
$this->assertNoViolation();
}
- protected function createValidator()
+ protected function createValidator(): \Symfony\Component\Validator\ConstraintValidatorInterface
{
$render = $this->createMock(PersonRender::class);
$render->method('renderString')
@@ -97,7 +97,7 @@ final class HouseholdMembershipSequentialValidatorTest extends ConstraintValidat
return new HouseholdMembershipSequentialValidator($render);
}
- protected function getConstraint()
+ protected function getConstraint(): \Chill\PersonBundle\Validator\Constraints\Household\HouseholdMembershipSequential
{
return new HouseholdMembershipSequential([
'message' => 'msg',
diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Household/MaxHolderValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Household/MaxHolderValidatorTest.php
index 2880afb35..2a7bfcbb4 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Validator/Household/MaxHolderValidatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Household/MaxHolderValidatorTest.php
@@ -62,7 +62,7 @@ final class MaxHolderValidatorTest extends ConstraintValidatorTestCase
/**
* @dataProvider provideInvalidHousehold
*/
- public function testHouseholdInvalid(Household $household, mixed $parameters)
+ public function testHouseholdInvalid(Household $household, mixed $parameters): void
{
$constraint = $this->getConstraint();
@@ -73,12 +73,12 @@ final class MaxHolderValidatorTest extends ConstraintValidatorTestCase
->assertRaised();
}
- protected function createValidator()
+ protected function createValidator(): \Symfony\Component\Validator\ConstraintValidatorInterface
{
return new MaxHolderValidator();
}
- protected function getConstraint()
+ protected function getConstraint(): \Chill\PersonBundle\Validator\Constraints\Household\MaxHolder
{
return new MaxHolder([
'message' => 'msg',
diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php
index 4be918d60..5a2e7d49e 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/BirthdateValidatorTest.php
@@ -26,7 +26,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
*/
final class BirthdateValidatorTest extends ConstraintValidatorTestCase
{
- public function testTomorrowInvalid()
+ public function testTomorrowInvalid(): void
{
$bornAfter = new \DateTime('2023-08-31');
$this->validator->validate($bornAfter, $this->createConstraint());
@@ -36,7 +36,7 @@ final class BirthdateValidatorTest extends ConstraintValidatorTestCase
->assertRaised();
}
- public function testValidateTodayInvalid()
+ public function testValidateTodayInvalid(): void
{
$bornToday = new \DateTime('2023-08-30');
$this->validator->validate($bornToday, $this->createConstraint());
@@ -57,14 +57,14 @@ final class BirthdateValidatorTest extends ConstraintValidatorTestCase
->assertRaised();
}
- public function testValidateYesterdayValid()
+ public function testValidateYesterdayValid(): void
{
$bornYesterday = new \DateTime('2023-08-29');
$this->validator->validate($bornYesterday, $this->createConstraint());
$this->assertNoViolation();
}
- protected function createValidator()
+ protected function createValidator(): \Symfony\Component\Validator\ConstraintValidatorInterface
{
return new BirthdateValidator(
new ParameterBag(['chill_person' => ['validation' => ['birthdate_not_after' => 'P1D']]]),
@@ -72,7 +72,7 @@ final class BirthdateValidatorTest extends ConstraintValidatorTestCase
);
}
- private function createConstraint()
+ private function createConstraint(): \Chill\PersonBundle\Validator\Constraints\Person\Birthdate
{
return new Birthdate([
'message' => 'msg',
diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php
index a14f77bda..438fe9057 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonHasCenterValidatorTest.php
@@ -30,7 +30,7 @@ final class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
{
use ProphecyTrait;
- public function testValidateRequired()
+ public function testValidateRequired(): void
{
$constraint = $this->getConstraint();
$personHasCenter = (new Person())->setCenter(new Center());
@@ -45,7 +45,7 @@ final class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
->assertRaised();
}
- protected function createValidator()
+ protected function createValidator(): \Symfony\Component\Validator\ConstraintValidatorInterface
{
$parameterBag = $this->createMock(ParameterBagInterface::class);
$parameterBag
@@ -72,7 +72,7 @@ final class PersonHasCenterValidatorTest extends ConstraintValidatorTestCase
return new PersonHasCenterValidator($parameterBag, $prophecy->reveal());
}
- protected function getConstraint()
+ protected function getConstraint(): \Chill\PersonBundle\Validator\Constraints\Person\PersonHasCenter
{
return new PersonHasCenter([
'message' => 'msg',
diff --git a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php
index 577c81c2c..6b78e4e5d 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Validator/Person/PersonValidationTest.php
@@ -32,7 +32,7 @@ final class PersonValidationTest extends KernelTestCase
$this->validator = self::getContainer()->get(ValidatorInterface::class);
}
- public function testBirthdateInFuture()
+ public function testBirthdateInFuture(): void
{
$person = (new Person())
->setBirthdate(new \DateTime('+2 months'));
@@ -54,7 +54,7 @@ final class PersonValidationTest extends KernelTestCase
);
}
- public function testFirstnameValidation()
+ public function testFirstnameValidation(): void
{
$person = (new Person())
->setFirstname(\str_repeat('a', 500));
diff --git a/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandlerTest.php b/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandlerTest.php
index df701d906..6889f2bd4 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandlerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandlerTest.php
@@ -36,7 +36,7 @@ class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandlerTest extends TestCa
{
use ProphecyTrait;
- public function testGetSuggestedUsers()
+ public function testGetSuggestedUsers(): void
{
$accompanyingCourse = new AccompanyingPeriod();
$accompanyingCourse->setUser($referrer = new User());
diff --git a/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandlerTest.php b/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandlerTest.php
index bcd1e8c8a..63d73abe7 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandlerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandlerTest.php
@@ -33,7 +33,7 @@ class AccompanyingPeriodWorkEvaluationWorkflowHandlerTest extends TestCase
{
use ProphecyTrait;
- public function testGetSuggestedUsers()
+ public function testGetSuggestedUsers(): void
{
$accompanyingCourse = new AccompanyingPeriod();
$accompanyingCourse->setUser($referrer = new User());
diff --git a/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkWorkflowHandlerTest.php b/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkWorkflowHandlerTest.php
index 5fcaf8eb4..f71bcbc5a 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkWorkflowHandlerTest.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Workflow/AccompanyingPeriodWorkWorkflowHandlerTest.php
@@ -33,7 +33,7 @@ class AccompanyingPeriodWorkWorkflowHandlerTest extends TestCase
{
use ProphecyTrait;
- public function testGetSuggestedUsers()
+ public function testGetSuggestedUsers(): void
{
$accompanyingCourse = new AccompanyingPeriod();
$accompanyingCourse->setUser($referrer = new User());
diff --git a/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php b/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php
index 0a95d5810..162679d91 100644
--- a/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php
+++ b/src/Bundle/ChillPersonBundle/Tests/Workflows/AccompanyingPeriodLifecycle.php
@@ -27,7 +27,7 @@ final class AccompanyingPeriodLifecycle extends KernelTestCase
self::bootKernel();
}
- public function testConfirm()
+ public function testConfirm(): void
{
$registry = self::getContainer()->get(Registry::class);
$period = new AccompanyingPeriod(new \DateTime('now'));
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidity.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidity.php
index 82a2d1d40..c0942ba40 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidity.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidity.php
@@ -18,7 +18,7 @@ class AccompanyingPeriodValidity extends Constraint
{
public $messageSocialIssueCannotBeDeleted = 'The social %name% issue cannot be deleted because it is associated with an activity or an action';
- public function getTargets()
+ public function getTargets(): string|array
{
return self::CLASS_CONSTRAINT;
}
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidityValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidityValidator.php
index 6198e4e47..01a39090c 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidityValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidityValidator.php
@@ -25,7 +25,7 @@ class AccompanyingPeriodValidityValidator extends ConstraintValidator
{
public function __construct(private readonly ActivityRepository $activityRepository, private readonly SocialIssueRender $socialIssueRender, private readonly TokenStorageInterface $token) {}
- public function validate($period, Constraint $constraint)
+ public function validate($period, Constraint $constraint): void
{
if (!$constraint instanceof AccompanyingPeriodValidity) {
throw new UnexpectedTypeException($constraint, AccompanyingPeriodValidity::class);
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ConfidentialCourseMustHaveReferrer.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ConfidentialCourseMustHaveReferrer.php
index 97e5be385..6649f4e5d 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ConfidentialCourseMustHaveReferrer.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ConfidentialCourseMustHaveReferrer.php
@@ -18,7 +18,7 @@ class ConfidentialCourseMustHaveReferrer extends Constraint
{
public string $message = 'A confidential parcours must have a referrer';
- public function getTargets()
+ public function getTargets(): string|array
{
return [self::CLASS_CONSTRAINT];
}
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ConfidentialCourseMustHaveReferrerValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ConfidentialCourseMustHaveReferrerValidator.php
index b809c0fff..5f133ee7c 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ConfidentialCourseMustHaveReferrerValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ConfidentialCourseMustHaveReferrerValidator.php
@@ -18,7 +18,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class ConfidentialCourseMustHaveReferrerValidator extends ConstraintValidator
{
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (!$value instanceof AccompanyingPeriod) {
throw new UnexpectedTypeException($value, AccompanyingPeriod::class);
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php
index 8e832da6e..2d51f0f1b 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidity.php
@@ -20,7 +20,7 @@ class LocationValidity extends Constraint
public $messagePersonLocatedMustBeAssociated = "The person where the course is located must be associated to the course. Change course's location before removing the person.";
- public function getTargets()
+ public function getTargets(): string|array
{
return self::CLASS_CONSTRAINT;
}
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php
index 4b4a13c18..bb5c51a90 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php
@@ -22,7 +22,7 @@ class LocationValidityValidator extends ConstraintValidator
{
public function __construct(private readonly PersonRenderInterface $render) {}
- public function validate($period, Constraint $constraint)
+ public function validate($period, Constraint $constraint): void
{
if (!$constraint instanceof LocationValidity) {
throw new UnexpectedTypeException($constraint, LocationValidity::class);
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php
index d3c25199b..9a810aa78 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php
@@ -26,7 +26,7 @@ class ParticipationOverlapValidator extends ConstraintValidator
public function __construct(private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdpartyRender) {}
- public function validate($participations, Constraint $constraint)
+ public function validate($participations, Constraint $constraint): void
{
if (!$constraint instanceof ParticipationOverlap) {
throw new UnexpectedTypeException($constraint, ParticipationOverlap::class);
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php
index d7573c400..f595f8831 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php
@@ -23,7 +23,7 @@ class ResourceDuplicateCheckValidator extends ConstraintValidator
{
public function __construct(private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdpartyRender) {}
- public function validate($resources, Constraint $constraint)
+ public function validate($resources, Constraint $constraint): void
{
if (!$constraint instanceof ResourceDuplicateCheck) {
throw new UnexpectedTypeException($constraint, ParticipationOverlap::class);
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequential.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequential.php
index d5f3a9547..ec7907b3d 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequential.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequential.php
@@ -18,7 +18,7 @@ class HouseholdMembershipSequential extends Constraint
{
public $message = 'household_membership.Person with membership covering';
- public function getTargets()
+ public function getTargets(): string|array
{
return [self::CLASS_CONSTRAINT];
}
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php
index 2ca0af42c..8a0121e59 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php
@@ -26,7 +26,7 @@ class HouseholdMembershipSequentialValidator extends ConstraintValidator
{
public function __construct(private readonly PersonRenderInterface $render) {}
- public function validate($person, Constraint $constraint)
+ public function validate($person, Constraint $constraint): void
{
if (!$person instanceof Person) {
throw new UnexpectedTypeException($person, Person::class);
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolder.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolder.php
index 5f45f69ac..a3b8d3799 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolder.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolder.php
@@ -20,7 +20,7 @@ class MaxHolder extends Constraint
public $messageInfinity = 'household.max_holder_overflowed_infinity';
- public function getTargets()
+ public function getTargets(): string|array
{
return self::CLASS_CONSTRAINT;
}
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolderValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolderValidator.php
index 499b8dbcf..d2ac9c025 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolderValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/MaxHolderValidator.php
@@ -19,7 +19,7 @@ class MaxHolderValidator extends ConstraintValidator
{
private const MAX_HOLDERS = 2;
- public function validate($household, Constraint $constraint)
+ public function validate($household, Constraint $constraint): void
{
$holders = $household->getMembersHolder();
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/BirthdateValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/BirthdateValidator.php
index 2e65f1f25..6f537b4a6 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/BirthdateValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/BirthdateValidator.php
@@ -30,7 +30,7 @@ class BirthdateValidator extends ConstraintValidator
$this->interval_spec = $this->parameterBag->get('chill_person')['validation']['birthdate_not_after'];
}
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (null === $value) {
return;
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenter.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenter.php
index dff34e540..5cd0316ba 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenter.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenter.php
@@ -18,7 +18,7 @@ class PersonHasCenter extends Constraint
{
public string $message = 'A center is required';
- public function getTargets()
+ public function getTargets(): string|array
{
return [
self::CLASS_CONSTRAINT,
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenterValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenterValidator.php
index 0d7ba3b17..0418dad9e 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenterValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Person/PersonHasCenterValidator.php
@@ -27,7 +27,7 @@ class PersonHasCenterValidator extends ConstraintValidator
$this->centerRequired = $parameterBag->get('chill_person')['validation']['center_required'];
}
- public function validate($person, Constraint $constraint)
+ public function validate($person, Constraint $constraint): void
{
if (!$person instanceof Person) {
throw new UnexpectedTypeException($constraint, Person::class);
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicate.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicate.php
index c21cca5b6..76dde4561 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicate.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicate.php
@@ -18,7 +18,7 @@ class RelationshipNoDuplicate extends Constraint
{
public $message = 'relationship.duplicate';
- public function getTargets()
+ public function getTargets(): string|array
{
return self::CLASS_CONSTRAINT;
}
diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php
index 8a54de53e..0d488175f 100644
--- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php
+++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php
@@ -22,7 +22,7 @@ class RelationshipNoDuplicateValidator extends ConstraintValidator
{
public function __construct(private readonly RelationshipRepository $relationshipRepository) {}
- public function validate($value, Constraint $constraint)
+ public function validate($value, Constraint $constraint): void
{
if (!$constraint instanceof RelationshipNoDuplicate) {
throw new UnexpectedTypeException($constraint, RelationshipNoDuplicate::class);
diff --git a/src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php b/src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php
index bf1274d72..b5a8ed00d 100644
--- a/src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php
+++ b/src/Bundle/ChillPersonBundle/Widget/AddAPersonWidget.php
@@ -24,7 +24,7 @@ class AddAPersonWidget implements WidgetInterface
$place,
array $context,
array $config,
- ) {
+ ): string {
return $env->render('@ChillPerson/Widget/homepage_add_a_person.html.twig');
}
}
diff --git a/src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php b/src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php
index aab72f148..f744921d5 100644
--- a/src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php
+++ b/src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php
@@ -36,7 +36,7 @@ class PersonListWidget implements WidgetInterface
public function __construct(protected PersonRepository $personRepository, protected EntityManagerInterface $entityManager, protected AuthorizationHelperInterface $authorizationHelper, protected TokenStorageInterface $tokenStorage) {}
- public function render(Environment $env, $place, array $context, array $config)
+ public function render(Environment $env, $place, array $context, array $config): string
{
$numberOfItems = $config['number_of_items'] ?? 20;
diff --git a/src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php b/src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php
index 204b6c7c7..cc78120df 100644
--- a/src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php
+++ b/src/Bundle/ChillPersonBundle/Widget/PersonListWidgetFactory.php
@@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
*/
class PersonListWidgetFactory extends AbstractWidgetFactory
{
- public function configureOptions($place, NodeBuilder $node)
+ public function configureOptions($place, NodeBuilder $node): void
{
$node->booleanNode('only_active')
->defaultTrue()
diff --git a/src/Bundle/ChillReportBundle/Controller/ReportController.php b/src/Bundle/ChillReportBundle/Controller/ReportController.php
index 644bc7c65..d41caf05b 100644
--- a/src/Bundle/ChillReportBundle/Controller/ReportController.php
+++ b/src/Bundle/ChillReportBundle/Controller/ReportController.php
@@ -49,7 +49,7 @@ class ReportController extends AbstractController
*
* @return Response the web page
*/
- public function createAction($person_id, $cf_group_id, Request $request)
+ public function createAction($person_id, $cf_group_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -111,7 +111,7 @@ class ReportController extends AbstractController
*
* @return Response the web page
*/
- public function editAction(int|string $person_id, int|string $report_id)
+ public function editAction(int|string $person_id, int|string $report_id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -179,7 +179,7 @@ class ReportController extends AbstractController
*
* @return Response the web page
*/
- public function listAction($person_id, Request $request)
+ public function listAction($person_id, Request $request): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -236,7 +236,7 @@ class ReportController extends AbstractController
*
* @return Response the web page
*/
- public function newAction($person_id, $cf_group_id, Request $request)
+ public function newAction($person_id, $cf_group_id, Request $request): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -284,7 +284,7 @@ class ReportController extends AbstractController
*
* @return Response the web page
*/
- public function selectReportTypeAction($person_id, Request $request)
+ public function selectReportTypeAction($person_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -348,7 +348,7 @@ class ReportController extends AbstractController
*
* @return Response the web page
*/
- public function selectReportTypeForExportAction(Request $request)
+ public function selectReportTypeForExportAction(Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$cFGroupId = $request->query->get('cFGroup');
@@ -395,7 +395,7 @@ class ReportController extends AbstractController
*
* @return Response the web page
*/
- public function updateAction($person_id, $report_id, Request $request)
+ public function updateAction($person_id, $report_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -455,7 +455,7 @@ class ReportController extends AbstractController
*
* @return Response the web page
*/
- public function viewAction($report_id, $person_id)
+ public function viewAction($report_id, $person_id): \Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -489,7 +489,7 @@ class ReportController extends AbstractController
*
* @return \Symfony\Component\Form\Form The form
*/
- private function createCreateForm(Report $entity, Person $person, mixed $cFGroup)
+ private function createCreateForm(Report $entity, Person $person, mixed $cFGroup): \Symfony\Component\Form\FormInterface
{
return $this->createForm(ReportType::class, $entity, [
'action' => $this->generateUrl(
@@ -511,7 +511,7 @@ class ReportController extends AbstractController
*
* @return \Symfony\Component\Form\Form The form
*/
- private function createEditForm(Report $entity)
+ private function createEditForm(Report $entity): \Symfony\Component\Form\FormInterface
{
return $this->createForm(ReportType::class, $entity, [
'action' => $this->generateUrl(
diff --git a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomField.php b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomField.php
index 707133890..33c053236 100644
--- a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomField.php
+++ b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadCustomField.php
@@ -85,7 +85,7 @@ class LoadCustomField extends AbstractFixture implements OrderedFixtureInterface
$manager->flush();
}
- private function createExpectedFields(ObjectManager $manager)
+ private function createExpectedFields(ObjectManager $manager): void
{
// report logement
$reportLogement = $this->getReference('cf_group_report_logement', CustomFieldsGroup::class);
diff --git a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php
index 3519ef4cd..c35c86b39 100644
--- a/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php
+++ b/src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php
@@ -54,7 +54,7 @@ final class LoadReports extends AbstractFixture implements OrderedFixtureInterfa
$manager->flush();
}
- private function createExpected(ObjectManager $manager)
+ private function createExpected(ObjectManager $manager): void
{
$charline = $this->entityManager
->getRepository(Person::class)
@@ -74,7 +74,7 @@ final class LoadReports extends AbstractFixture implements OrderedFixtureInterfa
}
}
- private function createRandom(ObjectManager $manager, $percentage)
+ private function createRandom(ObjectManager $manager, $percentage): void
{
$people = $this->getPeopleRandom($percentage);
diff --git a/src/Bundle/ChillReportBundle/DependencyInjection/ChillReportExtension.php b/src/Bundle/ChillReportBundle/DependencyInjection/ChillReportExtension.php
index a4d2a58d5..414b7b1b6 100644
--- a/src/Bundle/ChillReportBundle/DependencyInjection/ChillReportExtension.php
+++ b/src/Bundle/ChillReportBundle/DependencyInjection/ChillReportExtension.php
@@ -29,7 +29,7 @@ class ChillReportExtension extends Extension implements PrependExtensionInterfac
/**
* Declare the entity Report, as a customizable entity (can add custom fields).
*/
- public function declareReportAsCustomizable(ContainerBuilder $container)
+ public function declareReportAsCustomizable(ContainerBuilder $container): void
{
$bundles = $container->getParameter('kernel.bundles');
@@ -57,7 +57,7 @@ class ChillReportExtension extends Extension implements PrependExtensionInterfac
);
}
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -69,7 +69,7 @@ class ChillReportExtension extends Extension implements PrependExtensionInterfac
$loader->load('services/controller.yaml');
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->declareReportAsCustomizable($container);
$this->declareRouting($container);
@@ -89,7 +89,7 @@ class ChillReportExtension extends Extension implements PrependExtensionInterfac
/**
* declare routes from report bundle.
*/
- private function declareRouting(ContainerBuilder $container)
+ private function declareRouting(ContainerBuilder $container): void
{
$container->prependExtensionConfig('chill_main', [
'routing' => [
diff --git a/src/Bundle/ChillReportBundle/Entity/Report.php b/src/Bundle/ChillReportBundle/Entity/Report.php
index 8d6c1888f..1022f22d2 100644
--- a/src/Bundle/ChillReportBundle/Entity/Report.php
+++ b/src/Bundle/ChillReportBundle/Entity/Report.php
@@ -64,7 +64,7 @@ class Report implements HasCenterInterface, HasScopeInterface
*
* @return array
*/
- public function getCFData()
+ public function getCFData(): ?array
{
return $this->cFData;
}
@@ -74,7 +74,7 @@ class Report implements HasCenterInterface, HasScopeInterface
*
* @return CustomFieldsGroup
*/
- public function getCFGroup()
+ public function getCFGroup(): ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup
{
return $this->cFGroup;
}
@@ -92,7 +92,7 @@ class Report implements HasCenterInterface, HasScopeInterface
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -102,7 +102,7 @@ class Report implements HasCenterInterface, HasScopeInterface
*
* @return Person
*/
- public function getPerson()
+ public function getPerson(): ?\Chill\PersonBundle\Entity\Person
{
return $this->person;
}
@@ -112,7 +112,7 @@ class Report implements HasCenterInterface, HasScopeInterface
*
* @return Scope
*/
- public function getScope()
+ public function getScope(): ?\Chill\MainBundle\Entity\Scope
{
return $this->scope;
}
@@ -122,7 +122,7 @@ class Report implements HasCenterInterface, HasScopeInterface
*
* @return User
*/
- public function getUser()
+ public function getUser(): ?\Chill\MainBundle\Entity\User
{
return $this->user;
}
diff --git a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php
index 1761e3522..b57da4fa5 100644
--- a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php
+++ b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php
@@ -48,7 +48,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
public function __construct(protected CustomFieldsGroup $customfieldsGroup, protected TranslatableStringHelper $translatableStringHelper, protected TranslatorInterface $translator, protected CustomFieldProvider $customFieldProvider, protected EntityManagerInterface $em) {}
- public function buildForm(FormBuilderInterface $builder)
+ public function buildForm(FormBuilderInterface $builder): void
{
$choices = array_combine($this->fields, $this->fields);
@@ -107,7 +107,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
return [FormatterInterface::TYPE_LIST];
}
- public function getDescription()
+ public function getDescription(): string
{
return $this->translator->trans(
"Generate list of report '%type%'",
@@ -272,7 +272,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
}
- public function getTitle()
+ public function getTitle(): string
{
return $this->translator->trans(
"List for report '%type%'",
@@ -413,7 +413,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
return [Declarations::PERSON_TYPE, 'report'];
}
- public function validateForm($data, ExecutionContextInterface $context)
+ public function validateForm($data, ExecutionContextInterface $context): void
{
// get the field starting with address_
$addressFields = array_filter(
@@ -448,7 +448,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
*
* @return CustomField[]
*/
- private function getCustomFields()
+ private function getCustomFields(): array
{
return array_filter($this->customfieldsGroup
->getCustomFields()->toArray(), static fn (CustomField $cf) => 'title' !== $cf->getType());
diff --git a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php
index 0346f2ab3..8f3eb99f5 100644
--- a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php
+++ b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php
@@ -26,7 +26,7 @@ class ReportDateFilter implements FilterInterface
return null;
}
- public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data)
+ public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data): void
{
$where = $qb->getDQLPart('where');
$clause = $qb->expr()->between(
@@ -57,7 +57,7 @@ class ReportDateFilter implements FilterInterface
return 'report';
}
- public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder)
+ public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder): void
{
$builder->add('date_from', PickRollingDateType::class, [
'label' => 'Report is after this date',
diff --git a/src/Bundle/ChillReportBundle/Form/ReportType.php b/src/Bundle/ChillReportBundle/Form/ReportType.php
index c680e496f..0e2c43d73 100644
--- a/src/Bundle/ChillReportBundle/Form/ReportType.php
+++ b/src/Bundle/ChillReportBundle/Form/ReportType.php
@@ -34,7 +34,7 @@ final class ReportType extends AbstractType
private readonly ObjectManager $om,
) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('user')
@@ -67,7 +67,7 @@ final class ReportType extends AbstractType
);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => \Chill\ReportBundle\Entity\Report::class,
@@ -85,7 +85,7 @@ final class ReportType extends AbstractType
/**
* @return string
*/
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'chill_reportbundle_report';
}
diff --git a/src/Bundle/ChillReportBundle/Security/Authorization/ReportVoter.php b/src/Bundle/ChillReportBundle/Security/Authorization/ReportVoter.php
index f93d140ee..2ee15ef02 100644
--- a/src/Bundle/ChillReportBundle/Security/Authorization/ReportVoter.php
+++ b/src/Bundle/ChillReportBundle/Security/Authorization/ReportVoter.php
@@ -54,7 +54,7 @@ class ReportVoter extends AbstractChillVoter implements ProvideRoleHierarchyInte
return [self::LISTS];
}
- protected function supports($attribute, $subject)
+ protected function supports($attribute, $subject): bool
{
if ($subject instanceof Report) {
return \in_array($attribute, [
@@ -67,7 +67,7 @@ class ReportVoter extends AbstractChillVoter implements ProvideRoleHierarchyInte
}
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
{
if (!$token->getUser() instanceof User) {
return false;
diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php
index d91583dc0..86e11ccb1 100644
--- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php
+++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php
@@ -68,7 +68,7 @@ final class ReportControllerNextTest extends WebTestCase
$this->group = $filteredCustomFieldsGroupHouse[0];
}
- public function testUngrantedUserIsDeniedAccessOnListReports()
+ public function testUngrantedUserIsDeniedAccessOnListReports(): void
{
$client = $this->getAuthenticatedClient('center b_social');
$client->request('GET', sprintf(
@@ -84,7 +84,7 @@ final class ReportControllerNextTest extends WebTestCase
);
}
- public function testUngrantedUserIsDeniedAccessOnReport()
+ public function testUngrantedUserIsDeniedAccessOnReport(): void
{
$client = $this->getAuthenticatedClient('center b_social');
$reports = self::$kernel->getContainer()->get('doctrine.orm.entity_manager')
@@ -106,7 +106,7 @@ final class ReportControllerNextTest extends WebTestCase
);
}
- public function testUngrantedUserIsDeniedReportCreate()
+ public function testUngrantedUserIsDeniedReportCreate(): void
{
$clientCenterA = $this->getAuthenticatedClient('center a_social');
@@ -123,7 +123,7 @@ final class ReportControllerNextTest extends WebTestCase
);
}
- public function testUngrantedUserIsDeniedReportNew()
+ public function testUngrantedUserIsDeniedReportNew(): void
{
$client = $this->getAuthenticatedClient('center b_social');
@@ -141,7 +141,7 @@ final class ReportControllerNextTest extends WebTestCase
);
}
- public function testValidCreate()
+ public function testValidCreate(): void
{
$client = $this->getAuthenticatedClient();
$form = $this->getReportForm($this->person, $this->group, $client);
@@ -158,7 +158,7 @@ final class ReportControllerNextTest extends WebTestCase
);
}
- protected function getAuthenticatedClient($username = 'center a_social')
+ protected function getAuthenticatedClient($username = 'center a_social'): \Symfony\Bundle\FrameworkBundle\KernelBrowser
{
return self::createClient([], [
'PHP_AUTH_USER' => $username,
@@ -169,7 +169,7 @@ final class ReportControllerNextTest extends WebTestCase
/**
* @return \Symfony\Component\DomCrawler\Form
*/
- protected function getReportForm(Person $person, CustomFieldsGroup $group, \Symfony\Component\BrowserKit\AbstractBrowser $client)
+ protected function getReportForm(Person $person, CustomFieldsGroup $group, \Symfony\Component\BrowserKit\AbstractBrowser $client): \Symfony\Component\DomCrawler\Form
{
$url = sprintf(
'fr/person/%d/report/cfgroup/%d/new',
diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php
index 30472ace8..ad6fc696a 100644
--- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php
+++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php
@@ -101,7 +101,7 @@ final class ReportControllerTest extends WebTestCase
*
* @return Client
*/
- public function getAuthenticatedClient($username = 'center a_social')
+ public function getAuthenticatedClient($username = 'center a_social'): \Symfony\Bundle\FrameworkBundle\KernelBrowser
{
return self::createClient([], [
'PHP_AUTH_USER' => $username,
@@ -114,7 +114,7 @@ final class ReportControllerTest extends WebTestCase
*
* @depends testMenu
*/
- public function testChooseReportModelPage(Link $link)
+ public function testChooseReportModelPage(Link $link): \Symfony\Component\DomCrawler\Crawler
{
// When I click on "add a report" link in menu
$client = $this->getAuthenticatedClient();
@@ -172,7 +172,7 @@ final class ReportControllerTest extends WebTestCase
*
* @depends testNewReportPage
*/
- public function testInvalidUser(Form $form)
+ public function testInvalidUser(Form $form): void
{
$client = $this->getAuthenticatedClient();
$filledForm = $this->fillCorrectForm($form);
@@ -191,7 +191,7 @@ final class ReportControllerTest extends WebTestCase
*
* @param int $reportId
*/
- public function testList($reportId)
+ public function testList($reportId): void
{
$client = $this->getAuthenticatedClient();
$crawler = $client->request('GET', sprintf(
@@ -283,7 +283,7 @@ final class ReportControllerTest extends WebTestCase
/**
* Test that setting a Null date redirect to an error page.
*/
- public function testNullDate()
+ public function testNullDate(): void
{
$client = $this->getAuthenticatedClient();
$form = $this->getReportForm(
@@ -308,7 +308,7 @@ final class ReportControllerTest extends WebTestCase
*
* @param int $reportId
*/
- public function testUpdate($reportId)
+ public function testUpdate($reportId): void
{
$client = $this->getAuthenticatedClient();
$crawler = $client->request(
@@ -387,7 +387,7 @@ final class ReportControllerTest extends WebTestCase
*
* @param int $reportId
*/
- public function testView($reportId)
+ public function testView($reportId): void
{
$client = $this->getAuthenticatedClient();
$client->request(
@@ -412,7 +412,7 @@ final class ReportControllerTest extends WebTestCase
Person $person,
CustomFieldsGroup $group,
\Symfony\Component\BrowserKit\AbstractBrowser $client,
- ) {
+ ): \Symfony\Component\DomCrawler\Form {
$url = sprintf(
'fr/person/%d/report/cfgroup/%d/new',
$person->getId(),
@@ -441,7 +441,7 @@ final class ReportControllerTest extends WebTestCase
*
* @param bool $isDefault if the form should be at default values
*/
- private function isFormAsExpected(Form $form, $isDefault = true)
+ private function isFormAsExpected(Form $form, $isDefault = true): void
{
$this->assertTrue(
$form->has('chill_reportbundle_report[date]'),
diff --git a/src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php b/src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php
index db938f0bf..9fe7b9391 100644
--- a/src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php
+++ b/src/Bundle/ChillReportBundle/Tests/DependencyInjection/ChillReportExtensionTest.php
@@ -26,7 +26,7 @@ final class ChillReportExtensionTest extends KernelTestCase
/**
* @doesNotPerformAssertions
*/
- public function testDeclareReportAsCustomizable()
+ public function testDeclareReportAsCustomizable(): void
{
self::bootKernel(['environment' => 'test']);
$customizablesEntities = self::$kernel->getContainer()
diff --git a/src/Bundle/ChillReportBundle/Tests/Export/Filter/ReportDateFilterTest.php b/src/Bundle/ChillReportBundle/Tests/Export/Filter/ReportDateFilterTest.php
index 9b1040fb8..f951c16df 100644
--- a/src/Bundle/ChillReportBundle/Tests/Export/Filter/ReportDateFilterTest.php
+++ b/src/Bundle/ChillReportBundle/Tests/Export/Filter/ReportDateFilterTest.php
@@ -33,7 +33,7 @@ final class ReportDateFilterTest extends AbstractFilterTest
$this->filter = self::getContainer()->get(ReportDateFilter::class);
}
- public function getFilter()
+ public function getFilter(): \Chill\ReportBundle\Export\Filter\ReportDateFilter
{
return $this->filter;
}
diff --git a/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php b/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php
index 6d001c0df..8f6117aea 100644
--- a/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php
+++ b/src/Bundle/ChillReportBundle/Tests/Search/ReportSearchTest.php
@@ -22,7 +22,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/
final class ReportSearchTest extends WebTestCase
{
- public function testNamedSearch()
+ public function testNamedSearch(): void
{
$client = $this->getAuthenticatedClient();
@@ -34,7 +34,7 @@ final class ReportSearchTest extends WebTestCase
$this->assertTrue($client->getResponse()->isSuccessful());
}
- public function testSearchByDate()
+ public function testSearchByDate(): void
{
$client = $this->getAuthenticatedClient();
@@ -46,7 +46,7 @@ final class ReportSearchTest extends WebTestCase
$this->assertMatchesRegularExpression('/Situation de logement/i', $crawler->text());
}
- public function testSearchDoubleDate()
+ public function testSearchDoubleDate(): void
{
$client = $this->getAuthenticatedClient();
@@ -57,7 +57,7 @@ final class ReportSearchTest extends WebTestCase
$this->assertGreaterThan(0, $crawler->filter('.error')->count());
}
- public function testSearchEmtpy()
+ public function testSearchEmtpy(): void
{
$client = $this->getAuthenticatedClient();
@@ -68,7 +68,7 @@ final class ReportSearchTest extends WebTestCase
$this->assertGreaterThan(0, $crawler->filter('.error')->count());
}
- public function testSearchExpectedDefault()
+ public function testSearchExpectedDefault(): void
{
$client = $this->getAuthenticatedClient();
@@ -86,7 +86,7 @@ final class ReportSearchTest extends WebTestCase
* We test for that that :
* - we do not see any unauthorized scope mention
*/
- public function testUsersDoNotSeeUnauthorizedResults()
+ public function testUsersDoNotSeeUnauthorizedResults(): void
{
$clientSocial = $this->getAuthenticatedClient();
$clientAdministrative = $this->getAuthenticatedClient('center a_administrative');
@@ -105,7 +105,7 @@ final class ReportSearchTest extends WebTestCase
/**
* @return \Symfony\Component\BrowserKit\AbstractBrowser
*/
- private function getAuthenticatedClient(mixed $username = 'center a_social')
+ private function getAuthenticatedClient(mixed $username = 'center a_social'): \Symfony\Bundle\FrameworkBundle\KernelBrowser
{
return self::createClient([], [
'PHP_AUTH_USER' => $username,
diff --git a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php
index c71051821..b039880c9 100644
--- a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php
+++ b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php
@@ -133,7 +133,7 @@ final class ReportVoterTest extends KernelTestCase
$action,
$message,
?User $user = null,
- ) {
+ ): void {
$token = $this->prepareToken($user);
$result = $this->voter->vote($token, $report, [$action]);
$this->assertEquals($expectedResult, $result, $message);
@@ -146,7 +146,7 @@ final class ReportVoterTest extends KernelTestCase
*
* @return Person
*/
- protected function preparePerson(Center $center)
+ protected function preparePerson(Center $center): \Chill\PersonBundle\Entity\Person
{
return (new Person())
->setCenter($center);
diff --git a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php
index d7a4054f7..20bf26dd2 100644
--- a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php
+++ b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php
@@ -87,7 +87,7 @@ final class TimelineProviderTest extends WebTestCase
// static::$em->remove($this->report);
}
- public function testReportIsNotVisibleToUngrantedUsers()
+ public function testReportIsNotVisibleToUngrantedUsers(): void
{
$client = self::createClient(
[],
@@ -108,7 +108,7 @@ final class TimelineProviderTest extends WebTestCase
/**
* Test that a report is shown in timeline.
*/
- public function testTimelineReport()
+ public function testTimelineReport(): void
{
$client = self::createClient(
[],
@@ -129,7 +129,7 @@ final class TimelineProviderTest extends WebTestCase
);
}
- public function testTimelineReportWithSummaryField()
+ public function testTimelineReportWithSummaryField(): void
{
// load the page
$client = self::createClient(
diff --git a/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php b/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php
index 17b600149..87b939d09 100644
--- a/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php
+++ b/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php
@@ -27,7 +27,7 @@ class TimelineReportProvider implements TimelineProviderInterface
{
public function __construct(protected EntityManager $em, protected AuthorizationHelper $helper, private readonly Security $security, protected CustomFieldsHelper $customFieldsHelper, protected $showEmptyValues) {}
- public function fetchQuery($context, array $args)
+ public function fetchQuery($context, array $args): \Chill\MainBundle\Timeline\TimelineSingleQuery
{
$this->checkContext($context);
@@ -147,7 +147,7 @@ class TimelineReportProvider implements TimelineProviderInterface
*
* @throws \LogicException if the context is not supported
*/
- private function checkContext($context)
+ private function checkContext($context): void
{
if ('person' !== $context && 'center' !== $context) {
throw new \LogicException("The context '{$context}' is not supported. Currently only 'person' and 'center' is supported");
diff --git a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php
index c4c261cd3..bc61da44c 100644
--- a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php
+++ b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php
@@ -37,7 +37,7 @@ class Version20150622233319 extends AbstractMigration implements ContainerAwareI
$this->addSql('ALTER TABLE Report DROP scope_id');
}
- public function setContainer(?ContainerInterface $container = null)
+ public function setContainer(?ContainerInterface $container = null): void
{
if (null === $container) {
throw new \RuntimeException('Container is not provided. This migration need container to set a default center');
diff --git a/src/Bundle/ChillTaskBundle/ChillTaskBundle.php b/src/Bundle/ChillTaskBundle/ChillTaskBundle.php
index 05f92ea93..173c44c77 100644
--- a/src/Bundle/ChillTaskBundle/ChillTaskBundle.php
+++ b/src/Bundle/ChillTaskBundle/ChillTaskBundle.php
@@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillTaskBundle extends Bundle
{
- public function build(ContainerBuilder $container)
+ public function build(ContainerBuilder $container): void
{
parent::build($container);
diff --git a/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php b/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
index 152184570..0b905026b 100644
--- a/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
+++ b/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
@@ -114,7 +114,7 @@ final class SingleTaskController extends AbstractController
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->logger->notice('A task has been removed', [
- 'by_user' => $this->getUser()->getUsername(),
+ 'by_user' => $this->getUser()->getUserIdentifier(),
'task_id' => $task->getId(),
'description' => $task->getDescription(),
'assignee' => $task->getAssignee(),
@@ -251,7 +251,7 @@ final class SingleTaskController extends AbstractController
#[Route(path: '/{_locale}/task/single-task/list', name: 'chill_task_singletask_list')]
public function listAction(
Request $request,
- ) {
+ ): \Symfony\Component\HttpFoundation\Response {
$this->denyAccessUnlessGranted(TaskVoter::SHOW, null);
$showMissionTypeFilter = $this->singleTaskRepository->countByDistinctTypes() > 1;
@@ -398,7 +398,7 @@ final class SingleTaskController extends AbstractController
*/
#[Route(path: '/{_locale}/task/single-task/list/my', name: 'chill_task_singletask_my_tasks', defaults: ['_format' => 'html'])]
#[Route(path: '/api/1.0/task/single-task/list/my', defaults: ['_format' => 'json'])]
- public function myTasksAction(string $_format, Request $request)
+ public function myTasksAction(string $_format, Request $request): \Symfony\Component\HttpFoundation\JsonResponse|\Symfony\Component\HttpFoundation\Response
{
$this->denyAccessUnlessGranted('ROLE_USER');
@@ -565,7 +565,7 @@ final class SingleTaskController extends AbstractController
}
#[Route(path: '/{_locale}/task/single-task/{id}/show', name: 'chill_task_single_task_show')]
- public function showAction(SingleTask $task, Request $request)
+ public function showAction(SingleTask $task, Request $request): \Symfony\Component\HttpFoundation\Response
{
$this->denyAccessUnlessGranted(TaskVoter::SHOW, $task);
diff --git a/src/Bundle/ChillTaskBundle/Controller/TaskController.php b/src/Bundle/ChillTaskBundle/Controller/TaskController.php
index 2b6c3d0bb..bc0261865 100644
--- a/src/Bundle/ChillTaskBundle/Controller/TaskController.php
+++ b/src/Bundle/ChillTaskBundle/Controller/TaskController.php
@@ -132,7 +132,7 @@ class TaskController extends AbstractController
/**
* @return \Symfony\Component\Form\FormInterface
*/
- protected function createTransitionForm(AbstractTask $task)
+ protected function createTransitionForm(AbstractTask $task): \Symfony\Component\Form\FormInterface
{
$builder = $this->createFormBuilder($task);
$builder->add('submit', SubmitType::class);
diff --git a/src/Bundle/ChillTaskBundle/DependencyInjection/ChillTaskExtension.php b/src/Bundle/ChillTaskBundle/DependencyInjection/ChillTaskExtension.php
index 0122861d6..f14d95267 100644
--- a/src/Bundle/ChillTaskBundle/DependencyInjection/ChillTaskExtension.php
+++ b/src/Bundle/ChillTaskBundle/DependencyInjection/ChillTaskExtension.php
@@ -26,7 +26,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillTaskExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -44,7 +44,7 @@ class ChillTaskExtension extends Extension implements PrependExtensionInterface
$loader->load('services/form.yaml');
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->prependAuthorization($container);
$this->prependRoute($container);
diff --git a/src/Bundle/ChillTaskBundle/DependencyInjection/Compiler/TaskWorkflowDefinitionCompilerPass.php b/src/Bundle/ChillTaskBundle/DependencyInjection/Compiler/TaskWorkflowDefinitionCompilerPass.php
index 4447778ec..cbc98d9d8 100644
--- a/src/Bundle/ChillTaskBundle/DependencyInjection/Compiler/TaskWorkflowDefinitionCompilerPass.php
+++ b/src/Bundle/ChillTaskBundle/DependencyInjection/Compiler/TaskWorkflowDefinitionCompilerPass.php
@@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\Reference;
class TaskWorkflowDefinitionCompilerPass implements CompilerPassInterface
{
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
if (!$container->hasDefinition(TaskWorkflowManager::class)) {
throw new \LogicException('The service '.TaskWorkflowManager::class.' is not registered');
diff --git a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php
index 08405218d..073079eb7 100644
--- a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php
+++ b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php
@@ -164,7 +164,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
return $this;
}
- public function setClosed(bool $closed)
+ public function setClosed(bool $closed): void
{
$this->closed = $closed;
}
diff --git a/src/Bundle/ChillTaskBundle/Entity/RecurringTask.php b/src/Bundle/ChillTaskBundle/Entity/RecurringTask.php
index 13b5a9006..33d35a2e2 100644
--- a/src/Bundle/ChillTaskBundle/Entity/RecurringTask.php
+++ b/src/Bundle/ChillTaskBundle/Entity/RecurringTask.php
@@ -58,7 +58,7 @@ class RecurringTask extends AbstractTask
*
* @return \DateTime
*/
- public function getFirstOccurenceEndDate()
+ public function getFirstOccurenceEndDate(): ?\DateTime
{
return $this->firstOccurenceEndDate;
}
@@ -68,7 +68,7 @@ class RecurringTask extends AbstractTask
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -78,7 +78,7 @@ class RecurringTask extends AbstractTask
*
* @return \DateTime
*/
- public function getLastOccurenceEndDate()
+ public function getLastOccurenceEndDate(): ?\DateTime
{
return $this->lastOccurenceEndDate;
}
@@ -88,7 +88,7 @@ class RecurringTask extends AbstractTask
*
* @return string
*/
- public function getOccurenceFrequency()
+ public function getOccurenceFrequency(): ?string
{
return $this->occurenceFrequency;
}
diff --git a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php
index 0d33792b7..080d51282 100644
--- a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php
+++ b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php
@@ -77,7 +77,7 @@ class SingleTask extends AbstractTask
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
@@ -92,7 +92,7 @@ class SingleTask extends AbstractTask
*
* @return \DateTime
*/
- public function getStartDate()
+ public function getStartDate(): ?\DateTime
{
return $this->startDate;
}
@@ -145,7 +145,7 @@ class SingleTask extends AbstractTask
return $this;
}
- public function setRecurringTask(RecurringTask $recurringTask)
+ public function setRecurringTask(RecurringTask $recurringTask): void
{
$this->recurringTask = $recurringTask;
}
diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php
index 26a73a7e5..d39d5d51c 100644
--- a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php
+++ b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php
@@ -66,7 +66,7 @@ class AbstractTaskPlaceEvent
*
* @return string
*/
- public function getTransition()
+ public function getTransition(): string
{
return $this->transition;
}
diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php
index f9e89fe5b..2d9a4c0b5 100644
--- a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php
+++ b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php
@@ -45,7 +45,7 @@ class SingleTaskPlaceEvent extends AbstractTaskPlaceEvent
*
* @return int
*/
- public function getId()
+ public function getId(): ?int
{
return $this->id;
}
diff --git a/src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php b/src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php
index 280eddeea..8fe0f3cbb 100644
--- a/src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php
+++ b/src/Bundle/ChillTaskBundle/Event/Lifecycle/TaskLifecycleEvent.php
@@ -47,7 +47,7 @@ class TaskLifecycleEvent implements EventSubscriberInterface
];
}
- public function onTaskPersist(TaskEvent $e)
+ public function onTaskPersist(TaskEvent $e): void
{
$task = $e->getTask();
$user = $this->tokenStorage->getToken()->getUser();
@@ -65,7 +65,7 @@ class TaskLifecycleEvent implements EventSubscriberInterface
$this->em->persist($event);
}
- public function onTransition(WorkflowEvent $e)
+ public function onTransition(WorkflowEvent $e): void
{
$task = $e->getSubject();
$user = $this->tokenStorage->getToken()->getUser();
diff --git a/src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php b/src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php
index e4f92341d..10a000f0e 100644
--- a/src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php
+++ b/src/Bundle/ChillTaskBundle/Form/SingleTaskListType.php
@@ -63,7 +63,7 @@ class SingleTaskListType extends AbstractType
$this->taskWorkflowManager = $taskWorkflowManager;
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$statuses = [
'Tasks not started' => SingleTaskRepository::DATE_STATUS_NOT_STARTED,
@@ -137,7 +137,7 @@ class SingleTaskListType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefined('person')
@@ -152,7 +152,7 @@ class SingleTaskListType extends AbstractType
->setAllowedTypes('add_type', ['bool']);
}
- protected function getReachablesCenters()
+ protected function getReachablesCenters(): array
{
$user = $this->tokenStorage->getToken()->getUser();
$role = TaskVoter::SHOW;
diff --git a/src/Bundle/ChillTaskBundle/Form/SingleTaskType.php b/src/Bundle/ChillTaskBundle/Form/SingleTaskType.php
index 7e572e078..89f68b4d9 100644
--- a/src/Bundle/ChillTaskBundle/Form/SingleTaskType.php
+++ b/src/Bundle/ChillTaskBundle/Form/SingleTaskType.php
@@ -29,7 +29,7 @@ class SingleTaskType extends AbstractType
{
public function __construct(private readonly ParameterBagInterface $parameterBag, private readonly CenterResolverDispatcherInterface $centerResolverDispatcher, private readonly ScopeResolverDispatcher $scopeResolverDispatcher) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$center = null;
$isScopeConcerned = false;
@@ -71,7 +71,7 @@ class SingleTaskType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setRequired('role')
diff --git a/src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php b/src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php
index eb35cd913..599f6e611 100644
--- a/src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php
+++ b/src/Bundle/ChillTaskBundle/Menu/MenuBuilder.php
@@ -38,7 +38,7 @@ class MenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildAccompanyingCourseMenu($menu, $parameters)
+ public function buildAccompanyingCourseMenu($menu, $parameters): void
{
/** @var AccompanyingPeriod $course */
$course = $parameters['accompanyingCourse'];
@@ -56,7 +56,7 @@ class MenuBuilder implements LocalMenuBuilderInterface
}
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
match ($menuId) {
'person' => $this->buildPersonMenu($menu, $parameters),
@@ -66,7 +66,7 @@ class MenuBuilder implements LocalMenuBuilderInterface
};
}
- public function buildPersonMenu($menu, $parameters)
+ public function buildPersonMenu($menu, $parameters): void
{
// var $person \Chill\PersonBundle\Entity\Person */
$person = $parameters['person'] ?? null;
diff --git a/src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php b/src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php
index 052eb5d9b..74933077b 100644
--- a/src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php
+++ b/src/Bundle/ChillTaskBundle/Menu/SectionMenuBuilder.php
@@ -37,7 +37,7 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
$this->translator = $translator;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (false === $this->authorizationChecker->isGranted(TaskVoter::SHOW)) {
return;
diff --git a/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php
index 32d7ebd03..2365dc5e2 100644
--- a/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php
+++ b/src/Bundle/ChillTaskBundle/Menu/UserMenuBuilder.php
@@ -28,7 +28,7 @@ final readonly class UserMenuBuilder implements LocalMenuBuilderInterface
private AuthorizationCheckerInterface $authorizationChecker,
) {}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (false === $this->authorizationChecker->isGranted(TaskVoter::SHOW)) {
return;
@@ -74,7 +74,7 @@ final readonly class UserMenuBuilder implements LocalMenuBuilderInterface
return ['user'];
}
- private function addItemInMenu(MenuItem $menu, string $message, int $number, $order, array $states = [], array $status = [])
+ private function addItemInMenu(MenuItem $menu, string $message, int $number, $order, array $states = [], array $status = []): void
{
if (0 < $number) {
$menu->addChild(
diff --git a/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php b/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php
index c8a84cbf8..d1a9ba13a 100644
--- a/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php
+++ b/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php
@@ -101,7 +101,7 @@ class SingleTaskRepository extends EntityRepository
->getResult();
}
- public function setAuthorizationHelper(AuthorizationHelper $authorizationHelper)
+ public function setAuthorizationHelper(AuthorizationHelper $authorizationHelper): void
{
$this->authorizationHelper = $authorizationHelper;
}
diff --git a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php
index ff97930c5..917e19bdd 100644
--- a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php
+++ b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php
@@ -31,12 +31,12 @@ class AuthorizationEvent extends \Symfony\Contracts\EventDispatcher\Event
private readonly TokenInterface $token,
) {}
- public function getAttribute()
+ public function getAttribute(): string
{
return $this->attribute;
}
- public function getSubject()
+ public function getSubject(): \Chill\TaskBundle\Entity\AbstractTask|\Chill\PersonBundle\Entity\AccompanyingPeriod|\Chill\PersonBundle\Entity\Person|null
{
return $this->subject;
}
@@ -56,7 +56,7 @@ class AuthorizationEvent extends \Symfony\Contracts\EventDispatcher\Event
return null !== $this->vote;
}
- public function removeVote()
+ public function removeVote(): void
{
$this->vote = null;
}
diff --git a/src/Bundle/ChillTaskBundle/Security/Authorization/TaskVoter.php b/src/Bundle/ChillTaskBundle/Security/Authorization/TaskVoter.php
index daee05133..c31c67e86 100644
--- a/src/Bundle/ChillTaskBundle/Security/Authorization/TaskVoter.php
+++ b/src/Bundle/ChillTaskBundle/Security/Authorization/TaskVoter.php
@@ -80,12 +80,12 @@ final class TaskVoter extends AbstractChillVoter implements ProvideRoleHierarchy
return [];
}
- public function supports($attribute, $subject)
+ public function supports(string $attribute, mixed $subject): bool
{
return $this->voter->supports($attribute, $subject);
}
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
+ protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
if (!$token->getUser() instanceof User) {
return false;
diff --git a/src/Bundle/ChillTaskBundle/Templating/UI/CountNotificationTask.php b/src/Bundle/ChillTaskBundle/Templating/UI/CountNotificationTask.php
index 7c2768682..733106622 100644
--- a/src/Bundle/ChillTaskBundle/Templating/UI/CountNotificationTask.php
+++ b/src/Bundle/ChillTaskBundle/Templating/UI/CountNotificationTask.php
@@ -62,7 +62,7 @@ class CountNotificationTask implements NotificationCounterInterface
return $this->_countNotification($u, SingleTaskRepository::DATE_STATUS_WARNING);
}
- public function resetCacheOnNewStates(Event $e)
+ public function resetCacheOnNewStates(Event $e): void
{
/** @var \Chill\TaskBundle\Entity\SingleTask $task */
$task = $e->getSubject();
@@ -111,7 +111,7 @@ class CountNotificationTask implements NotificationCounterInterface
return $sum;
}
- private function getCacheKey(User $u, $status)
+ private function getCacheKey(User $u, $status): string
{
return sprintf(self::CACHE_KEY, $u->getId(), $status);
}
diff --git a/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php b/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php
index 1453df4d0..d416fbf06 100644
--- a/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php
+++ b/src/Bundle/ChillTaskBundle/Tests/Controller/SingleTaskControllerTest.php
@@ -34,7 +34,7 @@ final class SingleTaskControllerTest extends WebTestCase
$this->faker = Faker\Factory::create('fr');
}
- public function testNew()
+ public function testNew(): void
{
$client = self::createClient(
[],
diff --git a/src/Bundle/ChillTaskBundle/Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php b/src/Bundle/ChillTaskBundle/Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php
index fbd02f289..3ee3b1129 100644
--- a/src/Bundle/ChillTaskBundle/Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php
+++ b/src/Bundle/ChillTaskBundle/Timeline/SingleTaskTaskLifeCycleEventTimelineProvider.php
@@ -42,7 +42,7 @@ class SingleTaskTaskLifeCycleEventTimelineProvider implements TimelineProviderIn
$this->registry = $registry;
}
- public function fetchQuery($context, $args)
+ public function fetchQuery($context, $args): \Chill\MainBundle\Timeline\TimelineSingleQuery
{
if ('task' !== $context) {
throw new \LogicException(sprintf('%s is not able to render context %s', self::class, $context));
@@ -74,7 +74,7 @@ class SingleTaskTaskLifeCycleEventTimelineProvider implements TimelineProviderIn
]);
}
- public function getEntities(array $ids)
+ public function getEntities(array $ids): array
{
$events = $this->em
->getRepository(SingleTaskPlaceEvent::class)
diff --git a/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php b/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
index 98b38a989..19f628885 100644
--- a/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
+++ b/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php
@@ -32,7 +32,7 @@ class TaskLifeCycleEventTimelineProvider implements TimelineProviderInterface
public function __construct(protected EntityManagerInterface $em, protected Registry $registry, protected AuthorizationHelper $authorizationHelper, protected Security $security) {}
- public function fetchQuery($context, $args)
+ public function fetchQuery($context, $args): \Chill\MainBundle\Timeline\TimelineSingleQuery
{
$metadata = $this->em
->getClassMetadata(SingleTaskPlaceEvent::class);
@@ -53,7 +53,7 @@ class TaskLifeCycleEventTimelineProvider implements TimelineProviderInterface
]);
}
- public function getEntities(array $ids)
+ public function getEntities(array $ids): array
{
$events = $this->em
->getRepository(SingleTaskPlaceEvent::class)
@@ -108,7 +108,7 @@ class TaskLifeCycleEventTimelineProvider implements TimelineProviderInterface
}
}
- private function getFromClause(string $context)
+ private function getFromClause(string $context): string
{
$taskEvent = $this->em->getClassMetadata(SingleTaskPlaceEvent::class);
$singleTask = $this->em->getClassMetadata(SingleTask::class);
diff --git a/src/Bundle/ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php b/src/Bundle/ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php
index 188cfa2d1..fb08666b3 100644
--- a/src/Bundle/ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php
+++ b/src/Bundle/ChillTaskBundle/Workflow/Event/DefaultTaskGuardEvent.php
@@ -28,7 +28,7 @@ class DefaultTaskGuardEvent implements EventSubscriberInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function checkACL(GuardEvent $event)
+ public function checkACL(GuardEvent $event): void
{
if (
false === $this->authorizationChecker->isGranted(
diff --git a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php
index c0ce60dbe..fd033fb6a 100644
--- a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php
+++ b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php
@@ -23,7 +23,7 @@ class TaskWorkflowManager implements WorkflowSupportStrategyInterface
*/
protected $definitions = [];
- public function addDefinition(TaskWorkflowDefinition $definition)
+ public function addDefinition(TaskWorkflowDefinition $definition): void
{
$this->definitions[] = $definition;
}
@@ -62,7 +62,7 @@ class TaskWorkflowManager implements WorkflowSupportStrategyInterface
->getWorkflowMetadata($task, $key, $metadataSubject);
}
- public function onTaskStateEntered(Event $e)
+ public function onTaskStateEntered(Event $e): void
{
$task = $e->getSubject();
diff --git a/src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php b/src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php
index f11473dd7..662775d0f 100644
--- a/src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php
+++ b/src/Bundle/ChillThirdPartyBundle/ChillThirdPartyBundle.php
@@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillThirdPartyBundle extends Bundle
{
- public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function build(\Symfony\Component\DependencyInjection\ContainerBuilder $container): void
{
parent::build($container);
$container->registerForAutoconfiguration(ThirdPartyTypeProviderInterface::class)
diff --git a/src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php b/src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php
index 85d50e93f..2fea77814 100644
--- a/src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php
+++ b/src/Bundle/ChillThirdPartyBundle/Controller/AdminController.php
@@ -20,7 +20,7 @@ class AdminController extends AbstractController
* ThirdParty admin.
*/
#[Route(path: '/{_locale}/admin/thirdparty', name: 'chill_thirdparty_admin_index')]
- public function indexAdminAction()
+ public function indexAdminAction(): \Symfony\Component\HttpFoundation\Response
{
return $this->render('@ChillThirdParty/Admin/index.html.twig');
}
diff --git a/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php b/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php
index 13641ba31..31e190bf0 100644
--- a/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php
+++ b/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php
@@ -90,7 +90,7 @@ final class ThirdPartyController extends CRUDController
return parent::createFormFor($action, $entity, $formClass, $formOptions);
}
- protected function getQueryResult(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, ?FilterOrderHelper $filterOrder = null)
+ protected function getQueryResult(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, ?FilterOrderHelper $filterOrder = null): array
{
return $this->thirdPartyACLAwareRepository
->listThirdParties(
diff --git a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php
index 475d22049..76a84001f 100644
--- a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php
+++ b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php
@@ -33,7 +33,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class ChillThirdPartyExtension extends Extension implements PrependExtensionInterface
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
@@ -53,7 +53,7 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
$loader->load('services/doctrineEventListener.yaml');
}
- public function prepend(ContainerBuilder $container)
+ public function prepend(ContainerBuilder $container): void
{
$this->preprendRoutes($container);
$this->prependRoleHierarchy($container);
diff --git a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php
index 8586451b2..da2fe4f0a 100644
--- a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php
+++ b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/CompilerPass/ThirdPartyTypeCompilerPass.php
@@ -24,7 +24,7 @@ class ThirdPartyTypeCompilerPass implements CompilerPassInterface
{
final public const TAG = 'chill_3party.provider';
- public function process(ContainerBuilder $container)
+ public function process(ContainerBuilder $container): void
{
$definition = $container->getDefinition(ThirdPartyTypeManager::class);
$usedKeys = [];
diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php
index e65a06515..4c6038623 100644
--- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php
+++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php
@@ -271,7 +271,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
return $this;
}
- public function addCenter(Center $center)
+ public function addCenter(Center $center): void
{
if (false === $this->centers->contains($center)) {
$this->centers->add($center);
@@ -519,7 +519,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
return $this;
}
- public function removeCenter(Center $center)
+ public function removeCenter(Center $center): void
{
if ($this->centers->contains($center)) {
$this->centers->removeElement($center);
diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php b/src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php
index 1beb72a1d..89ce3f4e3 100644
--- a/src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php
+++ b/src/Bundle/ChillThirdPartyBundle/Form/ChoiceLoader/ThirdPartyChoiceLoader.php
@@ -50,7 +50,7 @@ class ThirdPartyChoiceLoader implements ChoiceLoaderInterface
return new ArrayChoiceList($this->lazyLoadedParties, $value);
}
- public function loadChoicesForValues($values, $value = null)
+ public function loadChoicesForValues($values, $value = null): array
{
$choices = [];
@@ -67,7 +67,7 @@ class ThirdPartyChoiceLoader implements ChoiceLoaderInterface
return $choices;
}
- public function loadValuesForChoices(array $choices, $value = null)
+ public function loadValuesForChoices(array $choices, $value = null): array
{
$values = [];
diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyCategoryType.php b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyCategoryType.php
index dcbd629c0..f7f35ed56 100644
--- a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyCategoryType.php
+++ b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyCategoryType.php
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class ThirdPartyCategoryType extends AbstractType
{
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TranslatableStringFormType::class)
@@ -29,7 +29,7 @@ class ThirdPartyCategoryType extends AbstractType
]);
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('class', ThirdPartyCategory::class);
diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php
index 9cd671872..6f1ac096d 100644
--- a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php
+++ b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php
@@ -49,7 +49,7 @@ class ThirdPartyType extends AbstractType
$this->askCenter = $parameterBag->get('chill_main')['acl']['form_show_centers'];
}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TextType::class, [
@@ -152,7 +152,7 @@ class ThirdPartyType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => ThirdParty::class,
diff --git a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php
index 9e79ff813..3594c3a95 100644
--- a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php
+++ b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyType.php
@@ -63,7 +63,7 @@ class PickThirdPartyType extends AbstractType
$this->typesManager = $typesManager;
}
- public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options)
+ public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options): void
{
$view->vars['attr']['class'] = \array_merge(['select2 '], $view->vars['attr']['class'] ?? []);
$view->vars['attr']['data-3party-picker'] = true;
@@ -82,7 +82,7 @@ class PickThirdPartyType extends AbstractType
$view->vars['attr']['data-searching-label'] = $this->translator->trans('select2.searching');
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setRequired('center')
diff --git a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php
index 77720331d..6d0022ec6 100644
--- a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php
+++ b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php
@@ -26,7 +26,7 @@ class PickThirdPartyTypeCategoryType extends \Symfony\Component\Form\AbstractTyp
public function __construct(private readonly ThirdPartyCategoryRepository $thirdPartyCategoryRepository, private readonly ThirdPartyTypeManager $thirdPartyTypeManager, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator) {}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$choices = \array_merge(
$this->thirdPartyCategoryRepository->findBy(['active' => true]),
@@ -57,7 +57,7 @@ class PickThirdPartyTypeCategoryType extends \Symfony\Component\Form\AbstractTyp
]);
}
- public function getParent()
+ public function getParent(): ?string
{
return ChoiceType::class;
}
diff --git a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php
index 5e704fdcb..d34f06fac 100644
--- a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php
+++ b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php
@@ -28,12 +28,12 @@ class PickThirdpartyDynamicType extends AbstractType
{
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) {}
- public function buildForm(FormBuilderInterface $builder, array $options)
+ public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->addViewTransformer(new EntityToJsonTransformer($this->denormalizer, $this->serializer, $options['multiple'], 'thirdparty'));
}
- public function buildView(FormView $view, FormInterface $form, array $options)
+ public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['multiple'] = $options['multiple'];
$view->vars['types'] = ['thirdparty'];
@@ -47,7 +47,7 @@ class PickThirdpartyDynamicType extends AbstractType
}
}
- public function configureOptions(OptionsResolver $resolver)
+ public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefault('multiple', false)
@@ -60,7 +60,7 @@ class PickThirdpartyDynamicType extends AbstractType
->setAllowedTypes('submit_on_adding_new_entity', ['bool']);
}
- public function getBlockPrefix()
+ public function getBlockPrefix(): string
{
return 'pick_entity_dynamic';
}
diff --git a/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php
index 75b6a0c64..0ac50a7b5 100644
--- a/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php
@@ -27,7 +27,7 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
$this->authorizationChecker = $authorizationChecker;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if (!$this->authorizationChecker->isGranted('ROLE_ADMIN')) {
return;
diff --git a/src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php b/src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php
index dda6d2d99..6df5e373b 100644
--- a/src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php
+++ b/src/Bundle/ChillThirdPartyBundle/Menu/MenuBuilder.php
@@ -40,7 +40,7 @@ class MenuBuilder implements LocalMenuBuilderInterface
$this->translator = $translator;
}
- public function buildMenu($menuId, MenuItem $menu, array $parameters)
+ public function buildMenu($menuId, MenuItem $menu, array $parameters): void
{
if ($this->authorizationChecker->isGranted(ThirdPartyVoter::SHOW)) {
$menu
diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php
index 111be4089..89aaf2c61 100644
--- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php
+++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php
@@ -212,7 +212,7 @@ class ThirdPartyRepository implements ObjectRepository
return $qb;
}
- private function setIsActiveCondition(QueryBuilder $qb, array $terms)
+ private function setIsActiveCondition(QueryBuilder $qb, array $terms): void
{
if (\array_key_exists('is_active', $terms)) {
$qb->andWhere(
@@ -226,7 +226,7 @@ class ThirdPartyRepository implements ObjectRepository
* Add parameters to filter by containing $terms["name"] or
* $terms["_default"].
*/
- private function setNameCondition(QueryBuilder $qb, array $terms)
+ private function setNameCondition(QueryBuilder $qb, array $terms): void
{
if (\array_key_exists('name', $terms) || \array_key_exists('_default', $terms)) {
$term = $terms['name'] ?? $terms['_default'];
@@ -239,7 +239,7 @@ class ThirdPartyRepository implements ObjectRepository
}
}
- private function setTypesCondition(QueryBuilder $qb, array $terms)
+ private function setTypesCondition(QueryBuilder $qb, array $terms): void
{
if (\array_key_exists('types', $terms)) {
$orx = $qb->expr()->orX();
diff --git a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php
index 8970fec1c..a2d0d696f 100644
--- a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php
+++ b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php
@@ -46,7 +46,7 @@ class ThirdPartyApiSearch implements SearchApiInterface
{
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository) {}
- public function getResult(string $key, array $metadata, float $pertinence)
+ public function getResult(string $key, array $metadata, float $pertinence): ?\Chill\ThirdPartyBundle\Entity\ThirdParty
{
return $this->thirdPartyRepository->find($metadata['id']);
}
diff --git a/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php b/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php
index 09f7feb3b..1d4dd4040 100644
--- a/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php
+++ b/src/Bundle/ChillThirdPartyBundle/Security/Voter/ThirdPartyVoter.php
@@ -29,14 +29,8 @@ class ThirdPartyVoter extends AbstractChillVoter implements ProvideRoleHierarchy
final public const UPDATE = 'CHILL_3PARTY_3PARTY_UPDATE';
- /**
- * @var AuthorizationHelper
- */
- protected $authorizationHelper;
-
- public function __construct(AuthorizationHelper $authorizationHelper)
+ public function __construct(protected AuthorizationHelper $authorizationHelper)
{
- $this->authorizationHelper = $authorizationHelper;
}
public function getRoles(): array
@@ -58,7 +52,7 @@ class ThirdPartyVoter extends AbstractChillVoter implements ProvideRoleHierarchy
return $this->getRoles();
}
- protected function supports($attribute, $subject)
+ protected function supports(string $attribute, mixed $subject): bool
{
if ($subject instanceof ThirdParty) {
return \in_array($attribute, $this->getRoles(), true);
@@ -71,11 +65,7 @@ class ThirdPartyVoter extends AbstractChillVoter implements ProvideRoleHierarchy
return false;
}
- /**
- * @param string $attribute
- * @param ThirdParty|null $subject
- */
- protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
+ protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
return true;
$user = $token->getUser();
diff --git a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php
index 929b97c1e..84e8e1721 100644
--- a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php
+++ b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php
@@ -26,7 +26,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
- public function normalize($thirdParty, $format = null, array $context = [])
+ public function normalize($thirdParty, $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
if (!$thirdParty instanceof ThirdParty) {
throw new UnexpectedValueException();
@@ -64,7 +64,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
];
}
- public function supportsNormalization($data, $format = null)
+ public function supportsNormalization($data, $format = null, array $context = []): bool
{
return $data instanceof ThirdParty && 'json' === $format;
}
diff --git a/src/Bundle/ChillThirdPartyBundle/Tests/Controller/ThirdPartyControllerTest.php b/src/Bundle/ChillThirdPartyBundle/Tests/Controller/ThirdPartyControllerTest.php
index 6c70faf35..52276074b 100644
--- a/src/Bundle/ChillThirdPartyBundle/Tests/Controller/ThirdPartyControllerTest.php
+++ b/src/Bundle/ChillThirdPartyBundle/Tests/Controller/ThirdPartyControllerTest.php
@@ -23,7 +23,7 @@ final class ThirdPartyControllerTest extends WebTestCase
/**
* @doesNotPerformAssertions
*/
- public function testIndex()
+ public function testIndex(): void
{
$client = self::createClient();
@@ -33,7 +33,7 @@ final class ThirdPartyControllerTest extends WebTestCase
/**
* @doesNotPerformAssertions
*/
- public function testNew()
+ public function testNew(): void
{
$client = self::createClient();
@@ -43,7 +43,7 @@ final class ThirdPartyControllerTest extends WebTestCase
/**
* @doesNotPerformAssertions
*/
- public function testUpdate()
+ public function testUpdate(): void
{
$client = self::createClient();
diff --git a/src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php b/src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php
index 1801c1986..459aa9734 100644
--- a/src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php
+++ b/src/Bundle/ChillThirdPartyBundle/Tests/Entity/ThirdPartyTest.php
@@ -22,7 +22,7 @@ use PHPUnit\Framework\TestCase;
*/
final class ThirdPartyTest extends TestCase
{
- public function testAddingRemovingActivityTypes()
+ public function testAddingRemovingActivityTypes(): void
{
$tp = new ThirdParty();
$cat1 = new ThirdPartyCategory();
@@ -64,7 +64,7 @@ final class ThirdPartyTest extends TestCase
$this->assertNotContains('type', $tp->getTypesAndCategories());
}
- public function testSyncingActivityTypes()
+ public function testSyncingActivityTypes(): void
{
$tp = new ThirdParty();
$tp->setTypesAndCategories([
diff --git a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php
index 0c0010cae..da57cc6b6 100644
--- a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php
+++ b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyDocGenNormalizerTest.php
@@ -36,7 +36,7 @@ final class ThirdPartyDocGenNormalizerTest extends KernelTestCase
$this->phoneNumberUtil = PhoneNumberUtil::getInstance();
}
- public function testAvoidRecursionWithNullParent()
+ public function testAvoidRecursionWithNullParent(): void
{
$thirdparty = new ThirdParty();
$thirdparty
@@ -88,7 +88,7 @@ final class ThirdPartyDocGenNormalizerTest extends KernelTestCase
$this->assertEquals('', $actual['parent']['acronym']);
}
- public function testNormalize()
+ public function testNormalize(): void
{
$thirdparty = new ThirdParty();
$thirdparty
diff --git a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php
index e9032dd90..169615bff 100644
--- a/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php
+++ b/src/Bundle/ChillThirdPartyBundle/Tests/Serializer/Normalizer/ThirdPartyJsonDenormalizerTest.php
@@ -31,7 +31,7 @@ final class ThirdPartyJsonDenormalizerTest extends KernelTestCase
$this->normalizer = self::getContainer()->get(DenormalizerInterface::class);
}
- public function testDenormalizeContact()
+ public function testDenormalizeContact(): void
{
$str = <<<'JSON'
{
diff --git a/src/Bundle/ChillWopiBundle/src/DependencyInjection/ChillWopiExtension.php b/src/Bundle/ChillWopiBundle/src/DependencyInjection/ChillWopiExtension.php
index 1c0ef6490..f7c64a207 100644
--- a/src/Bundle/ChillWopiBundle/src/DependencyInjection/ChillWopiExtension.php
+++ b/src/Bundle/ChillWopiBundle/src/DependencyInjection/ChillWopiExtension.php
@@ -18,7 +18,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
final class ChillWopiExtension extends Extension
{
- public function load(array $configs, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container): void
{
$config = $this->processConfiguration(new Configuration(), $configs);
diff --git a/src/Bundle/ChillWopiBundle/src/Service/Wopi/AuthorizationManager.php b/src/Bundle/ChillWopiBundle/src/Service/Wopi/AuthorizationManager.php
index 4c9cb4a2f..f4470d021 100644
--- a/src/Bundle/ChillWopiBundle/src/Service/Wopi/AuthorizationManager.php
+++ b/src/Bundle/ChillWopiBundle/src/Service/Wopi/AuthorizationManager.php
@@ -28,7 +28,7 @@ class AuthorizationManager implements \ChampsLibres\WopiBundle\Contracts\Authori
return false;
}
- public function getRelatedStoredObject(Document $document)
+ public function getRelatedStoredObject(Document $document): ?\Chill\DocStoreBundle\Entity\StoredObject
{
return $this->storedObjectRepository->findOneBy(['uuid' => $document->getWopiDocId()]);
}
diff --git a/src/Bundle/ChillWopiBundle/tests/Service/Wopi/ChillDocumentLockManagerTest.php b/src/Bundle/ChillWopiBundle/tests/Service/Wopi/ChillDocumentLockManagerTest.php
index 5c22189d1..541fc65a1 100644
--- a/src/Bundle/ChillWopiBundle/tests/Service/Wopi/ChillDocumentLockManagerTest.php
+++ b/src/Bundle/ChillWopiBundle/tests/Service/Wopi/ChillDocumentLockManagerTest.php
@@ -32,7 +32,7 @@ final class ChillDocumentLockManagerTest extends KernelTestCase
self::bootKernel();
}
- public function testRelock()
+ public function testRelock(): void
{
$manager = $this->makeManager(1);
$document = new StoredObject();
@@ -55,7 +55,7 @@ final class ChillDocumentLockManagerTest extends KernelTestCase
$this->assertFalse($manager->hasLock($document, $request->reveal()));
}
- public function testSingleLock()
+ public function testSingleLock(): void
{
$manager = $this->makeManager(1);
$document = new StoredObject();