Merge branch 'master' into upgrade-sf5

This commit is contained in:
2024-02-12 21:50:34 +01:00
920 changed files with 6430 additions and 1914 deletions

View File

@@ -17,7 +17,9 @@ use Chill\MainBundle\Search\SearchApiQuery;
class SearchUserApiProvider implements SearchApiInterface
{
public function __construct(private readonly UserRepository $userRepository) {}
public function __construct(private readonly UserRepository $userRepository)
{
}
public function getResult(string $key, array $metadata, float $pertinence)
{

View File

@@ -19,7 +19,8 @@ class Result
* mixed an arbitrary result.
*/
private $result
) {}
) {
}
public function getRelevance(): float
{

View File

@@ -11,4 +11,6 @@ declare(strict_types=1);
namespace Chill\MainBundle\Search;
class ParsingException extends \Exception {}
class ParsingException extends \Exception
{
}

View File

@@ -20,7 +20,9 @@ use Doctrine\ORM\Query\ResultSetMappingBuilder;
class SearchApi
{
public function __construct(private readonly EntityManagerInterface $em, private readonly iterable $providers, private readonly PaginatorFactory $paginator) {}
public function __construct(private readonly EntityManagerInterface $em, private readonly iterable $providers, private readonly PaginatorFactory $paginator)
{
}
public function getResults(string $pattern, array $types, array $parameters): Collection
{

View File

@@ -17,7 +17,7 @@ class SearchApiNoQueryException extends \RuntimeException
private readonly array $types;
public function __construct(string $pattern = '', array $types = [], private readonly array $parameters = [], $code = 0, \Throwable $previous = null)
public function __construct(string $pattern = '', array $types = [], private readonly array $parameters = [], $code = 0, ?\Throwable $previous = null)
{
$typesStr = \implode(', ', $types);
$message = "No query for this search: pattern : {$pattern}, types: {$typesStr}";

View File

@@ -17,7 +17,9 @@ class SearchApiResult
{
private mixed $result;
public function __construct(private readonly float $relevance) {}
public function __construct(private readonly float $relevance)
{
}
/**
* @Serializer\Groups({"read"})

View File

@@ -13,7 +13,9 @@ namespace Chill\MainBundle\Search\Utils;
class SearchExtractionResult
{
public function __construct(private readonly string $filteredSubject, private readonly array $found) {}
public function __construct(private readonly string $filteredSubject, private readonly array $found)
{
}
public function getFilteredSubject(): string
{