@@ -47,7 +47,8 @@ |
||
| 47 | 47 | { |
| 48 | 48 | $resolver->setNormalizer('validation_groups', function (Options $options, array $validationGroups) { |
| 49 | 49 | return function (FormInterface $form) use ($validationGroups) { |
| 50 | - if ((bool) $form->get('promotionCoupon')->getNormData()) { // Validate the coupon if it was sent |
|
| 50 | + if ((bool) $form->get('promotionCoupon')->getNormData()) { |
|
| 51 | +// Validate the coupon if it was sent |
|
| 51 | 52 | $validationGroups[] = 'sylius_promotion_coupon'; |
| 52 | 53 | } |
| 53 | 54 | |
@@ -15,7 +15,8 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function it_does_not_crash(): void |
| 17 | 17 | { |
| 18 | - new class() extends Bundle { |
|
| 18 | + new class() extends Bundle |
|
| 19 | + { |
|
| 19 | 20 | use SyliusPluginTrait; |
| 20 | 21 | }; |
| 21 | 22 | } |
@@ -462,8 +462,7 @@ |
||
| 462 | 462 | if (!$this->hasNotEmptyAttributeByCodeAndLocale($attributeValue->getCode(), $localeCode)) { |
| 463 | 463 | if ( |
| 464 | 464 | null !== $fallbackLocaleCode && |
| 465 | - $this->hasNotEmptyAttributeByCodeAndLocale($attributeValue->getCode(), $fallbackLocaleCode)) |
|
| 466 | - { |
|
| 465 | + $this->hasNotEmptyAttributeByCodeAndLocale($attributeValue->getCode(), $fallbackLocaleCode)) { |
|
| 467 | 466 | return $this->getAttributeByCodeAndLocale($attributeValue->getCode(), $fallbackLocaleCode); |
| 468 | 467 | } |
| 469 | 468 | |