Skip to content

Commit

Permalink
OP-180 - adds ecs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MacBalc committed Jul 27, 2023
1 parent 3e87ecf commit fee195c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Form/Type/PriceFilterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
final class PriceFilterType extends AbstractFilterType
{
public const MAXIMUM_PRICE_VALUE = 9999999999999999;

private PriceNameResolverInterface $priceNameResolver;

private CurrencyContextInterface $currencyContext;
Expand Down Expand Up @@ -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, [
Expand All @@ -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) {
Expand Down

0 comments on commit fee195c

Please sign in to comment.