@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ->getQuery() |
70 | 70 | ; |
71 | 71 | |
72 | - $result = $this->waitFor(function () use ($query) { |
|
72 | + $result = $this->waitFor(function() use ($query) { |
|
73 | 73 | return $query->getResult(); |
74 | 74 | }); |
75 | 75 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ; |
99 | 99 | |
100 | 100 | try { |
101 | - $this->waitFor(function () use ($query) { |
|
101 | + $this->waitFor(function() use ($query) { |
|
102 | 102 | return 0 === count($query->getResult()) ? true : false; |
103 | 103 | }); |
104 | 104 | } catch (\RuntimeException $exception) { |
@@ -52,10 +52,10 @@ |
||
52 | 52 | ->end() |
53 | 53 | ->end() |
54 | 54 | ->validate() |
55 | - ->ifTrue(function ($array) { |
|
55 | + ->ifTrue(function($array) { |
|
56 | 56 | return !isset($array['operator']); |
57 | 57 | }) |
58 | - ->then(function ($array) { |
|
58 | + ->then(function($array) { |
|
59 | 59 | $array['operator'] = 'sylius.inventory_operator.'.($array['track_inventory'] ? 'default' : 'noop'); |
60 | 60 | |
61 | 61 | return $array; |
@@ -33,7 +33,7 @@ |
||
33 | 33 | parent::buildForm($builder, $options); |
34 | 34 | |
35 | 35 | $builder |
36 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) { |
|
36 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($options) { |
|
37 | 37 | $data = $event->getData(); |
38 | 38 | if (isset($data['variant'])) { |
39 | 39 | $event->getForm()->add('variant', 'entity_hidden', array( |
@@ -45,7 +45,7 @@ |
||
45 | 45 | 'label' => 'sylius.form.action.customer_group', |
46 | 46 | 'property' => 'name', |
47 | 47 | 'class' => $this->groupRepository->getClassName(), |
48 | - 'query_builder' => function () { |
|
48 | + 'query_builder' => function() { |
|
49 | 49 | return $this->groupRepository->getFormQueryBuilder(); |
50 | 50 | }, |
51 | 51 | 'constraints' => array( |
@@ -31,13 +31,13 @@ |
||
31 | 31 | { |
32 | 32 | parent::configureOptions($resolver); |
33 | 33 | |
34 | - $queryBuilder = function (Options $options) { |
|
34 | + $queryBuilder = function(Options $options) { |
|
35 | 35 | $repositoryOptions = array( |
36 | 36 | 'disabled' => $options['disabled'], |
37 | 37 | 'channel' => $options['channel'], |
38 | 38 | ); |
39 | 39 | |
40 | - return function (PaymentMethodRepositoryInterface $repository) use ($repositoryOptions) { |
|
40 | + return function(PaymentMethodRepositoryInterface $repository) use ($repositoryOptions) { |
|
41 | 41 | return $repository->getQueryBuidlerForChoiceType($repositoryOptions); |
42 | 42 | }; |
43 | 43 | }; |
@@ -51,7 +51,7 @@ |
||
51 | 51 | 'by_reference' => false, |
52 | 52 | 'label' => 'sylius.form.cart.coupon', |
53 | 53 | )) |
54 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
54 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
55 | 55 | $data = $event->getData(); |
56 | 56 | |
57 | 57 | if (!$data->getPromotionCoupons()->isEmpty()) { |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public function buildForm(FormBuilderInterface $builder, array $options) |
33 | 33 | { |
34 | 34 | $builder |
35 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
35 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
36 | 36 | $data = $event->getData(); |
37 | 37 | |
38 | 38 | if (!array_key_exists('differentBillingAddress', $data) || false === $data['differentBillingAddress']) { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $event->setData($data); |
42 | 42 | } |
43 | 43 | }) |
44 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options) { |
|
44 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options) { |
|
45 | 45 | /* @var CustomerInterface $customer */ |
46 | 46 | $customer = $options['customer']; |
47 | 47 | // if customer does not have user, it is not registered, so we do not preset data |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $notBlank->message = $this->translator->trans('sylius.checkout.shipping_method.not_blank'); |
49 | 49 | |
50 | 50 | $builder |
51 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($notBlank, $criteria, $channel) { |
|
51 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($notBlank, $criteria, $channel) { |
|
52 | 52 | $form = $event->getForm(); |
53 | 53 | $shipment = $event->getData(); |
54 | 54 |
@@ -334,7 +334,7 @@ |
||
334 | 334 | $min = (int) trim(str_replace('+', '', $data['range'])); |
335 | 335 | $max = null; |
336 | 336 | } else { |
337 | - list($min, $max) = array_map(function ($value) { return (int) trim($value); }, explode('-', $data['range'])); |
|
337 | + list($min, $max) = array_map(function($value) { return (int) trim($value); }, explode('-', $data['range'])); |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | $configuration[] = array( |