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])
|
||||
. ' ';
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ use function in_array;
|
||||
|
||||
class SearchHouseholdApiProvider implements SearchApiInterface
|
||||
{
|
||||
public function __construct(private HouseholdRepository $householdRepository, private PersonACLAwareRepositoryInterface $personACLAwareRepository, private Security $security, private AuthorizationHelperInterface $authorizationHelper, private ExtractDateFromPattern $extractDateFromPattern, private ExtractPhonenumberFromPattern $extractPhonenumberFromPattern)
|
||||
public function __construct(private readonly HouseholdRepository $householdRepository, private readonly PersonACLAwareRepositoryInterface $personACLAwareRepository, private readonly Security $security, private readonly AuthorizationHelperInterface $authorizationHelper, private readonly ExtractDateFromPattern $extractDateFromPattern, private readonly ExtractPhonenumberFromPattern $extractPhonenumberFromPattern)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ use function in_array;
|
||||
|
||||
class SearchPersonApiProvider implements SearchApiInterface
|
||||
{
|
||||
public function __construct(private PersonRepository $personRepository, private PersonACLAwareRepositoryInterface $personACLAwareRepository, private Security $security, private AuthorizationHelperInterface $authorizationHelper, private ExtractDateFromPattern $extractDateFromPattern, private ExtractPhonenumberFromPattern $extractPhonenumberFromPattern)
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -23,9 +23,9 @@ use function count;
|
||||
|
||||
class SimilarPersonMatcher
|
||||
{
|
||||
public const SIMILAR_SEARCH_ORDER_BY_ALPHABETICAL = 'alphabetical';
|
||||
final public const SIMILAR_SEARCH_ORDER_BY_ALPHABETICAL = 'alphabetical';
|
||||
|
||||
public const SIMILAR_SEARCH_ORDER_BY_SIMILARITY = 'similarity';
|
||||
final public const SIMILAR_SEARCH_ORDER_BY_SIMILARITY = 'similarity';
|
||||
|
||||
/**
|
||||
* @var AuthorizationHelper
|
||||
|
Reference in New Issue
Block a user