@@ -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 | |
@@ -46,8 +46,8 @@ |
||
| 46 | 46 | StateMachineInterface $secondOrderStateMachine |
| 47 | 47 | ): void { |
| 48 | 48 | $orderRepository->findOrdersUnpaidSince(Argument::type(\DateTimeInterface::class))->willReturn([ |
| 49 | - $firstOrder, |
|
| 50 | - $secondOrder, |
|
| 49 | + $firstOrder, |
|
| 50 | + $secondOrder, |
|
| 51 | 51 | ]); |
| 52 | 52 | |
| 53 | 53 | $stateMachineFactory->get($firstOrder, 'sylius_order')->willReturn($firstOrderStateMachine); |
@@ -25,7 +25,8 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function it_does_not_crash(): void |
| 27 | 27 | { |
| 28 | - $class = new class() extends Bundle { |
|
| 28 | + $class = new class() extends Bundle |
|
| 29 | + { |
|
| 29 | 30 | use SyliusPluginTrait; |
| 30 | 31 | }; |
| 31 | 32 | |
@@ -33,8 +33,8 @@ |
||
| 33 | 33 | public function getFunctions(): array |
| 34 | 34 | { |
| 35 | 35 | return [ |
| 36 | - new TwigFunction('sylius_inventory_is_available', [$this->helper, 'isStockAvailable']), |
|
| 37 | - new TwigFunction('sylius_inventory_is_sufficient', [$this->helper, 'isStockSufficient']), |
|
| 36 | + new TwigFunction('sylius_inventory_is_available', [$this->helper, 'isStockAvailable']), |
|
| 37 | + new TwigFunction('sylius_inventory_is_sufficient', [$this->helper, 'isStockSufficient']), |
|
| 38 | 38 | ]; |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -65,10 +65,10 @@ |
||
| 65 | 65 | { |
| 66 | 66 | $this->client->updateRequestData([ |
| 67 | 67 | 'translations' => [ |
| 68 | - $localeCode => [ |
|
| 69 | - 'name' => $productAssociationTypeName, |
|
| 70 | - 'locale' => $localeCode, |
|
| 71 | - ], |
|
| 68 | + $localeCode => [ |
|
| 69 | + 'name' => $productAssociationTypeName, |
|
| 70 | + 'locale' => $localeCode, |
|
| 71 | + ], |
|
| 72 | 72 | ], |
| 73 | 73 | ]); |
| 74 | 74 | } |
@@ -48,7 +48,8 @@ |
||
| 48 | 48 | |
| 49 | 49 | function it_throws_an_exception_if_constraint_is_not_of_expected_type(): void |
| 50 | 50 | { |
| 51 | - $this->shouldThrow(\InvalidArgumentException::class)->during('validate', ['', new class() extends Constraint { |
|
| 51 | + $this->shouldThrow(\InvalidArgumentException::class)->during('validate', ['', new class() extends Constraint |
|
| 52 | + { |
|
| 52 | 53 | }]); |
| 53 | 54 | } |
| 54 | 55 | |
@@ -46,7 +46,8 @@ |
||
| 46 | 46 | { |
| 47 | 47 | $this |
| 48 | 48 | ->shouldThrow(\InvalidArgumentException::class) |
| 49 | - ->during('validate', ['', new class() extends Constraint { |
|
| 49 | + ->during('validate', ['', new class() extends Constraint |
|
| 50 | + { |
|
| 50 | 51 | }]) |
| 51 | 52 | ; |
| 52 | 53 | } |
@@ -105,11 +105,11 @@ |
||
| 105 | 105 | if (isset($sorting['price'])) { |
| 106 | 106 | // Another hack, the subquery to get the first position variant |
| 107 | 107 | $subQuery = $this->createQueryBuilder('m') |
| 108 | - ->select('min(v.position)') |
|
| 109 | - ->innerJoin('m.variants', 'v') |
|
| 110 | - ->andWhere('m.id = :product_id') |
|
| 111 | - ->andWhere('v.enabled = :enabled') |
|
| 112 | - ; |
|
| 108 | + ->select('min(v.position)') |
|
| 109 | + ->innerJoin('m.variants', 'v') |
|
| 110 | + ->andWhere('m.id = :product_id') |
|
| 111 | + ->andWhere('v.enabled = :enabled') |
|
| 112 | + ; |
|
| 113 | 113 | |
| 114 | 114 | $queryBuilder |
| 115 | 115 | ->addSelect('variant') |
@@ -45,14 +45,16 @@ |
||
| 45 | 45 | { |
| 46 | 46 | $this |
| 47 | 47 | ->shouldThrow(\InvalidArgumentException::class) |
| 48 | - ->during('validate', ['', new class() extends Constraint { |
|
| 48 | + ->during('validate', ['', new class() extends Constraint |
|
| 49 | + { |
|
| 49 | 50 | }]) |
| 50 | 51 | ; |
| 51 | 52 | } |
| 52 | 53 | |
| 53 | 54 | function it_throws_an_exception_if_constraint_does_not_type_of_order_shipping_method_eligibility(): void |
| 54 | 55 | { |
| 55 | - $constraint = new class() extends Constraint implements OrderTokenValueAwareInterface { |
|
| 56 | + $constraint = new class() extends Constraint implements OrderTokenValueAwareInterface |
|
| 57 | + { |
|
| 56 | 58 | private $orderTokenValue; |
| 57 | 59 | |
| 58 | 60 | public function getOrderTokenValue(): ?string |