Rector changes and immplementations of required methods

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

View File

@@ -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,

View File

@@ -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']);
}