mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
Remove usage of setParameters in various filters
This commit is contained in:
@@ -22,13 +22,12 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class JobFilter implements FilterInterface
|
||||
final readonly class JobFilter implements FilterInterface
|
||||
{
|
||||
private const PREFIX = 'cal_filter_job';
|
||||
|
||||
public function __construct(
|
||||
protected TranslatorInterface $translator,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
private TranslatableStringHelper $translatableStringHelper
|
||||
) {}
|
||||
|
||||
public function addRole(): ?string
|
||||
@@ -59,9 +58,10 @@ class JobFilter implements FilterInterface
|
||||
)
|
||||
)
|
||||
->andWhere($qb->expr()->in("{$p}_history.job", ":{$p}_job"))
|
||||
->setParameters([
|
||||
"{$p}_job" => $data["job"],
|
||||
]);
|
||||
->setParameter(
|
||||
"{$p}_job",
|
||||
$data["job"]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -59,9 +59,10 @@ class ScopeFilter implements FilterInterface
|
||||
)
|
||||
)
|
||||
->andWhere($qb->expr()->in("{$p}_history.scope", ":{$p}_scope"))
|
||||
->setParameters([
|
||||
"{$p}_scope" => $data["scope"],
|
||||
]);
|
||||
->setParameter(
|
||||
"{$p}_scope",
|
||||
$data["scope"]
|
||||
);
|
||||
}
|
||||
|
||||
public function applyOn(): string
|
||||
|
Reference in New Issue
Block a user