From fee195c8fe10697b1b6e2f32a327a38d36dc77e4 Mon Sep 17 00:00:00 2001 From: Maciej Date: Thu, 27 Jul 2023 09:12:45 +0200 Subject: [PATCH] OP-180 - adds ecs fix --- src/Form/Type/PriceFilterType.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Form/Type/PriceFilterType.php b/src/Form/Type/PriceFilterType.php index f43ace61..1a7d7248 100644 --- a/src/Form/Type/PriceFilterType.php +++ b/src/Form/Type/PriceFilterType.php @@ -25,6 +25,7 @@ final class PriceFilterType extends AbstractFilterType { public const MAXIMUM_PRICE_VALUE = 9999999999999999; + private PriceNameResolverInterface $priceNameResolver; private CurrencyContextInterface $currencyContext; @@ -52,9 +53,9 @@ public function buildForm(FormBuilderInterface $builder, array $options): void new PositiveOrZero([ 'message' => 'bitbag_sylius_elasticsearch_plugin.min_price_positive_or_zero', ]), - new LessThan(PriceFilterType::MAXIMUM_PRICE_VALUE, options: [ - 'message' => 'bitbag_sylius_elasticsearch_plugin.price_value_too_large' - ]) + new LessThan(self::MAXIMUM_PRICE_VALUE, options: [ + 'message' => 'bitbag_sylius_elasticsearch_plugin.price_value_too_large', + ]), ], ]) ->add($this->priceNameResolver->resolveMaxPriceName(), MoneyType::class, [ @@ -69,9 +70,9 @@ public function buildForm(FormBuilderInterface $builder, array $options): void new PositiveOrZero([ 'message' => 'bitbag_sylius_elasticsearch_plugin.max_price_positive_or_zero', ]), - new LessThan(PriceFilterType::MAXIMUM_PRICE_VALUE, options: [ - 'message' => 'bitbag_sylius_elasticsearch_plugin.price_value_too_large' - ]) + new LessThan(self::MAXIMUM_PRICE_VALUE, options: [ + 'message' => 'bitbag_sylius_elasticsearch_plugin.price_value_too_large', + ]), ], ]) ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {