mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 10:29:42 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -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,
|
||||
|
@@ -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']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user