@@ -45,7 +45,7 @@ |
||
| 45 | 45 | SessionInterface $session, |
| 46 | 46 | OrderRepositoryInterface $orderRepository, |
| 47 | 47 | OrderInterface $cart |
| 48 | - ) { |
|
| 48 | + ) { |
|
| 49 | 49 | $session->has('session_key_name')->willReturn(true); |
| 50 | 50 | $session->get('session_key_name')->willReturn(12345); |
| 51 | 51 | $orderRepository->findCartById(12345)->willReturn($cart); |
@@ -24,7 +24,8 @@ |
||
| 24 | 24 | |
| 25 | 25 | final class UniqueSimpleProductCodeValidatorSpec extends ObjectBehavior |
| 26 | 26 | { |
| 27 | - function let(ExecutionContextInterface $context, ProductVariantRepositoryInterface $productVariantRepository) { |
|
| 27 | + function let(ExecutionContextInterface $context, ProductVariantRepositoryInterface $productVariantRepository) |
|
| 28 | + { |
|
| 28 | 29 | $this->beConstructedWith($productVariantRepository); |
| 29 | 30 | $this->initialize($context); |
| 30 | 31 | } |
@@ -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 | |
@@ -222,7 +222,8 @@ |
||
| 222 | 222 | * |
| 223 | 223 | * @return \Generator |
| 224 | 224 | */ |
| 225 | - private function createGenerator(Collaborator ...$collaborators) { |
|
| 225 | + private function createGenerator(Collaborator ...$collaborators) |
|
| 226 | + { |
|
| 226 | 227 | foreach ($collaborators as $collaborator) { |
| 227 | 228 | yield $collaborator->getWrappedObject() => []; |
| 228 | 229 | } |
@@ -46,7 +46,8 @@ discard block |
||
| 46 | 46 | $this->getAllOrdersCount()->shouldReturn(0); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - function it_has_number_of_all_orders(ChannelInterface $channel) { |
|
| 49 | + function it_has_number_of_all_orders(ChannelInterface $channel) |
|
| 50 | + { |
|
| 50 | 51 | $firstStatistics = new PerChannelCustomerStatistics(110, 120, $channel->getWrappedObject()); |
| 51 | 52 | $secondStatistics = new PerChannelCustomerStatistics(13, 120, $channel->getWrappedObject()); |
| 52 | 53 | |
@@ -55,7 +56,8 @@ discard block |
||
| 55 | 56 | $this->getAllOrdersCount()->shouldReturn(123); |
| 56 | 57 | } |
| 57 | 58 | |
| 58 | - function it_has_an_array_of_statistics_per_channel(ChannelInterface $channel) { |
|
| 59 | + function it_has_an_array_of_statistics_per_channel(ChannelInterface $channel) |
|
| 60 | + { |
|
| 59 | 61 | $firstStatistics = new PerChannelCustomerStatistics(110, 120, $channel->getWrappedObject()); |
| 60 | 62 | $secondStatistics = new PerChannelCustomerStatistics(13, 120, $channel->getWrappedObject()); |
| 61 | 63 | |
@@ -222,7 +222,8 @@ |
||
| 222 | 222 | * |
| 223 | 223 | * @return \Generator |
| 224 | 224 | */ |
| 225 | - private function createGenerator(Collaborator ...$collaborators) { |
|
| 225 | + private function createGenerator(Collaborator ...$collaborators) |
|
| 226 | + { |
|
| 226 | 227 | foreach ($collaborators as $collaborator) { |
| 227 | 228 | yield $collaborator->getWrappedObject() => []; |
| 228 | 229 | } |
@@ -25,7 +25,8 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | final class ThemeAwareTranslatorSpec extends ObjectBehavior |
| 27 | 27 | { |
| 28 | - function let(TranslatorInterface $translator, ThemeContextInterface $themeContext) { |
|
| 28 | + function let(TranslatorInterface $translator, ThemeContextInterface $themeContext) |
|
| 29 | + { |
|
| 29 | 30 | $translator->implement(TranslatorBagInterface::class); |
| 30 | 31 | |
| 31 | 32 | $this->beConstructedWith($translator, $themeContext); |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | function it_should_assign_current_and_default_locale_to_given_translatable_entity( |
| 41 | 41 | TranslationLocaleProviderInterface $translationLocaleProvider, |
| 42 | 42 | TranslatableInterface $translatableEntity |
| 43 | - ) |
|
| 44 | - { |
|
| 43 | + ) { |
|
| 45 | 44 | $translationLocaleProvider->getDefaultLocaleCode()->willReturn('en_US'); |
| 46 | 45 | |
| 47 | 46 | $translatableEntity->setCurrentLocale('en_US')->shouldBeCalled(); |
@@ -43,8 +43,7 @@ discard block |
||
| 43 | 43 | LocaleContextInterface $localeContext, |
| 44 | 44 | TranslationLocaleProviderInterface $translationLocaleProvider, |
| 45 | 45 | TranslatableInterface $translatableEntity |
| 46 | - ) |
|
| 47 | - { |
|
| 46 | + ) { |
|
| 48 | 47 | $localeContext->getLocaleCode()->willReturn('de_DE'); |
| 49 | 48 | $translationLocaleProvider->getDefaultLocaleCode()->willReturn('en_US'); |
| 50 | 49 | |
@@ -58,8 +57,7 @@ discard block |
||
| 58 | 57 | LocaleContextInterface $localeContext, |
| 59 | 58 | TranslationLocaleProviderInterface $translationLocaleProvider, |
| 60 | 59 | TranslatableInterface $translatableEntity |
| 61 | - ) |
|
| 62 | - { |
|
| 60 | + ) { |
|
| 63 | 61 | $localeContext->getLocaleCode()->willThrow(new LocaleNotFoundException()); |
| 64 | 62 | $translationLocaleProvider->getDefaultLocaleCode()->willReturn('en_US'); |
| 65 | 63 | |