mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -45,28 +45,8 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf
|
||||
'birthdate-after', 'gender', 'nationality', 'phonenumber', 'city',
|
||||
];
|
||||
|
||||
private ExtractDateFromPattern $extractDateFromPattern;
|
||||
|
||||
private ExtractPhonenumberFromPattern $extractPhonenumberFromPattern;
|
||||
|
||||
private PaginatorFactory $paginatorFactory;
|
||||
|
||||
private PersonACLAwareRepositoryInterface $personACLAwareRepository;
|
||||
|
||||
private EngineInterface $templating;
|
||||
|
||||
public function __construct(
|
||||
EngineInterface $templating,
|
||||
ExtractDateFromPattern $extractDateFromPattern,
|
||||
ExtractPhonenumberFromPattern $extractPhonenumberFromPattern,
|
||||
PaginatorFactory $paginatorFactory,
|
||||
PersonACLAwareRepositoryInterface $personACLAwareRepository
|
||||
) {
|
||||
$this->templating = $templating;
|
||||
$this->extractDateFromPattern = $extractDateFromPattern;
|
||||
$this->extractPhonenumberFromPattern = $extractPhonenumberFromPattern;
|
||||
$this->paginatorFactory = $paginatorFactory;
|
||||
$this->personACLAwareRepository = $personACLAwareRepository;
|
||||
public function __construct(private EngineInterface $templating, private ExtractDateFromPattern $extractDateFromPattern, private ExtractPhonenumberFromPattern $extractPhonenumberFromPattern, private PaginatorFactory $paginatorFactory, private PersonACLAwareRepositoryInterface $personACLAwareRepository)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
@@ -121,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
|
||||
(strpos($data[$key], ' ') !== false ? '"' . $data[$key] . '"' : $data[$key])
|
||||
(str_contains($data[$key], ' ') ? '"' . $data[$key] . '"' : $data[$key])
|
||||
. ' ';
|
||||
}
|
||||
|
||||
|
@@ -26,32 +26,8 @@ use function in_array;
|
||||
|
||||
class SearchHouseholdApiProvider implements SearchApiInterface
|
||||
{
|
||||
private AuthorizationHelperInterface $authorizationHelper;
|
||||
|
||||
private ExtractDateFromPattern $extractDateFromPattern;
|
||||
|
||||
private ExtractPhonenumberFromPattern $extractPhonenumberFromPattern;
|
||||
|
||||
private HouseholdRepository $householdRepository;
|
||||
|
||||
private PersonACLAwareRepositoryInterface $personACLAwareRepository;
|
||||
|
||||
private Security $security;
|
||||
|
||||
public function __construct(
|
||||
HouseholdRepository $householdRepository,
|
||||
PersonACLAwareRepositoryInterface $personACLAwareRepository,
|
||||
Security $security,
|
||||
AuthorizationHelperInterface $authorizationHelper,
|
||||
ExtractDateFromPattern $extractDateFromPattern,
|
||||
ExtractPhonenumberFromPattern $extractPhonenumberFromPattern
|
||||
) {
|
||||
$this->householdRepository = $householdRepository;
|
||||
$this->personACLAwareRepository = $personACLAwareRepository;
|
||||
$this->security = $security;
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
$this->extractDateFromPattern = $extractDateFromPattern;
|
||||
$this->extractPhonenumberFromPattern = $extractPhonenumberFromPattern;
|
||||
public function __construct(private HouseholdRepository $householdRepository, private PersonACLAwareRepositoryInterface $personACLAwareRepository, private Security $security, private AuthorizationHelperInterface $authorizationHelper, private ExtractDateFromPattern $extractDateFromPattern, private ExtractPhonenumberFromPattern $extractPhonenumberFromPattern)
|
||||
{
|
||||
}
|
||||
|
||||
public function getResult(string $key, array $metadata, float $pertinence)
|
||||
|
@@ -26,32 +26,8 @@ use function in_array;
|
||||
|
||||
class SearchPersonApiProvider implements SearchApiInterface
|
||||
{
|
||||
private AuthorizationHelperInterface $authorizationHelper;
|
||||
|
||||
private ExtractDateFromPattern $extractDateFromPattern;
|
||||
|
||||
private ExtractPhonenumberFromPattern $extractPhonenumberFromPattern;
|
||||
|
||||
private PersonACLAwareRepositoryInterface $personACLAwareRepository;
|
||||
|
||||
private PersonRepository $personRepository;
|
||||
|
||||
private Security $security;
|
||||
|
||||
public function __construct(
|
||||
PersonRepository $personRepository,
|
||||
PersonACLAwareRepositoryInterface $personACLAwareRepository,
|
||||
Security $security,
|
||||
AuthorizationHelperInterface $authorizationHelper,
|
||||
ExtractDateFromPattern $extractDateFromPattern,
|
||||
ExtractPhonenumberFromPattern $extractPhonenumberFromPattern
|
||||
) {
|
||||
$this->personRepository = $personRepository;
|
||||
$this->personACLAwareRepository = $personACLAwareRepository;
|
||||
$this->security = $security;
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
$this->extractDateFromPattern = $extractDateFromPattern;
|
||||
$this->extractPhonenumberFromPattern = $extractPhonenumberFromPattern;
|
||||
public function __construct(private PersonRepository $personRepository, private PersonACLAwareRepositoryInterface $personACLAwareRepository, private Security $security, private AuthorizationHelperInterface $authorizationHelper, private ExtractDateFromPattern $extractDateFromPattern, private ExtractPhonenumberFromPattern $extractPhonenumberFromPattern)
|
||||
{
|
||||
}
|
||||
|
||||
public function getResult(string $key, array $metadata, float $pertinence)
|
||||
|
@@ -37,10 +37,6 @@ class SimilarPersonMatcher
|
||||
*/
|
||||
protected $em;
|
||||
|
||||
protected PersonNotDuplicateRepository $personNotDuplicateRepository;
|
||||
|
||||
protected PersonRenderInterface $personRender;
|
||||
|
||||
/**
|
||||
* @var TokenStorageInterface
|
||||
*/
|
||||
@@ -50,14 +46,12 @@ class SimilarPersonMatcher
|
||||
EntityManagerInterface $em,
|
||||
AuthorizationHelper $authorizationHelper,
|
||||
TokenStorageInterface $tokenStorage,
|
||||
PersonNotDuplicateRepository $personNotDuplicateRepository,
|
||||
PersonRenderInterface $personRender
|
||||
protected PersonNotDuplicateRepository $personNotDuplicateRepository,
|
||||
protected PersonRenderInterface $personRender
|
||||
) {
|
||||
$this->em = $em;
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
$this->personNotDuplicateRepository = $personNotDuplicateRepository;
|
||||
$this->personRender = $personRender;
|
||||
}
|
||||
|
||||
public function matchPerson(
|
||||
|
Reference in New Issue
Block a user