mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-26 17:43:54 +00:00
Upgrade php to v8.3 with rector
This commit is contained in:
@@ -32,25 +32,30 @@ class CountPerson implements ExportInterface
|
||||
$this->entityManager = $em;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
// this export does not add any form
|
||||
}
|
||||
#[\Override]
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getAllowedFormattersTypes()
|
||||
{
|
||||
return [FormatterInterface::TYPE_TABULAR];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription()
|
||||
{
|
||||
return 'Count peoples by various parameters.';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getLabels($key, array $values, $data)
|
||||
{
|
||||
// the Closure which will be executed by the formatter.
|
||||
@@ -60,6 +65,7 @@ class CountPerson implements ExportInterface
|
||||
};
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getQueryKeys($data)
|
||||
{
|
||||
// this array match the result keys in the query. We have only
|
||||
@@ -67,21 +73,25 @@ class CountPerson implements ExportInterface
|
||||
return ['export_result'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getResult($query, $data)
|
||||
{
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getTitle()
|
||||
{
|
||||
return 'Count peoples';
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getType()
|
||||
{
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
{
|
||||
// we gather all center the user choose.
|
||||
@@ -98,11 +108,13 @@ class CountPerson implements ExportInterface
|
||||
return $qb;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function requiredRole(): string
|
||||
{
|
||||
return PersonVoter::STATS;
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function supportsModifiers()
|
||||
{
|
||||
// explain the export manager which formatters and filters are allowed
|
||||
|
Reference in New Issue
Block a user