apply rules rector up to php82

This commit is contained in:
2023-05-01 21:39:45 +02:00
parent 81e8928344
commit 6d63177ff4
733 changed files with 1257 additions and 1322 deletions

View File

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