mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -38,14 +38,14 @@ use function array_merge;
|
||||
|
||||
class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterface
|
||||
{
|
||||
public const NAME = 'person_regular';
|
||||
final public const NAME = 'person_regular';
|
||||
|
||||
private const POSSIBLE_KEYS = [
|
||||
'_default', 'firstname', 'lastname', 'birthdate', 'birthdate-before',
|
||||
'birthdate-after', 'gender', 'nationality', 'phonenumber', 'city',
|
||||
];
|
||||
|
||||
public function __construct(private EngineInterface $templating, private ExtractDateFromPattern $extractDateFromPattern, private ExtractPhonenumberFromPattern $extractPhonenumberFromPattern, private PaginatorFactory $paginatorFactory, private PersonACLAwareRepositoryInterface $personACLAwareRepository)
|
||||
public function __construct(private readonly EngineInterface $templating, private readonly ExtractDateFromPattern $extractDateFromPattern, private readonly ExtractPhonenumberFromPattern $extractPhonenumberFromPattern, private readonly PaginatorFactory $paginatorFactory, private readonly PersonACLAwareRepositoryInterface $personACLAwareRepository)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
|
||||
foreach (['firstname', 'lastname', 'gender', 'city'] as $key) {
|
||||
$string .= !isset($data[$key]) ? '' : $key . ':' .
|
||||
// add quote if contains spaces
|
||||
(str_contains($data[$key], ' ') ? '"' . $data[$key] . '"' : $data[$key])
|
||||
(str_contains((string) $data[$key], ' ') ? '"' . $data[$key] . '"' : $data[$key])
|
||||
. ' ';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user