apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -20,10 +20,6 @@ use Chill\PersonBundle\Repository\PersonACLAwareRepositoryInterface;
use Chill\PersonBundle\Repository\PersonRepository;
use Symfony\Component\Security\Core\Security;
use function array_map;
use function count;
use function in_array;
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) {}
@@ -35,7 +31,7 @@ class SearchPersonApiProvider implements SearchApiInterface
public function prepare(array $metadatas): void
{
$ids = array_map(static fn ($m) => $m['id'], $metadatas);
$ids = \array_map(static fn ($m) => $m['id'], $metadatas);
$this->personRepository->findByIds($ids);
}
@@ -50,12 +46,12 @@ class SearchPersonApiProvider implements SearchApiInterface
$filtered,
null,
null,
count($datesResult->getFound()) > 0 ? $datesResult->getFound()[0] : null,
\count($datesResult->getFound()) > 0 ? $datesResult->getFound()[0] : null,
null,
null,
null,
null,
count($phoneResult->getFound()) > 0 ? $phoneResult->getFound()[0] : null
\count($phoneResult->getFound()) > 0 ? $phoneResult->getFound()[0] : null
)
->setSelectKey('person')
->setSelectJsonbMetadata("jsonb_build_object('id', person.id)");
@@ -68,6 +64,6 @@ class SearchPersonApiProvider implements SearchApiInterface
public function supportsTypes(string $pattern, array $types, array $parameters): bool
{
return in_array('person', $types, true);
return \in_array('person', $types, true);
}
}