@@ -40,6 +40,9 @@ |
||
| 40 | 40 | ; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @param \Doctrine\ORM\QueryBuilder $queryBuilder |
|
| 45 | + */ |
|
| 43 | 46 | public function applyCustomCriteria($queryBuilder, $criteria): void |
| 44 | 47 | { |
| 45 | 48 | foreach ((array) $criteria as $key => $criterion) { |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | return null; |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - $payment = $this->payments->filter(function (PaymentInterface $payment) use ($state) { |
|
| 117 | + $payment = $this->payments->filter(function(PaymentInterface $payment) use ($state) { |
|
| 118 | 118 | return null === $state || $payment->getState() === $state; |
| 119 | 119 | })->last(); |
| 120 | 120 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 38 | 38 | { |
| 39 | - $formModifier = function (FormInterface $form, string $type = null) { |
|
| 39 | + $formModifier = function(FormInterface $form, string $type = null) { |
|
| 40 | 40 | $methods = null === $type ? [] : $this->paymentMethodsProvider->getSupportedMethods($type); |
| 41 | 41 | |
| 42 | 42 | $form->add('method', PaymentMethodChoiceType::class, [ |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $builder->addEventListener( |
| 49 | 49 | FormEvents::PRE_SET_DATA, |
| 50 | - function (FormEvent $event) use ($formModifier) { |
|
| 50 | + function(FormEvent $event) use ($formModifier) { |
|
| 51 | 51 | $data = $event->getData(); |
| 52 | 52 | |
| 53 | 53 | $formModifier($event->getForm(), $data->getType()); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | $builder->get('type')->addEventListener( |
| 58 | 58 | FormEvents::POST_SUBMIT, |
| 59 | - function (FormEvent $event) use ($formModifier) { |
|
| 59 | + function(FormEvent $event) use ($formModifier) { |
|
| 60 | 60 | $type = $event->getForm()->getData(); |
| 61 | 61 | $formModifier($event->getForm()->getParent(), $type); |
| 62 | 62 | } |
@@ -39,10 +39,10 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $builder->get('startDate') |
| 41 | 41 | ->addModelTransformer(new CallbackTransformer( |
| 42 | - function ($value) { |
|
| 42 | + function($value) { |
|
| 43 | 43 | return $value; |
| 44 | 44 | }, |
| 45 | - function ($value) { |
|
| 45 | + function($value) { |
|
| 46 | 46 | if (is_string($value)) { |
| 47 | 47 | return new \DateTime($value); |
| 48 | 48 | } |
@@ -54,10 +54,10 @@ discard block |
||
| 54 | 54 | ->add('metadata', TextType::class); |
| 55 | 55 | |
| 56 | 56 | $builder->get('metadata')->addModelTransformer(new CallbackTransformer( |
| 57 | - function ($value) { |
|
| 57 | + function($value) { |
|
| 58 | 58 | return $value; |
| 59 | 59 | }, |
| 60 | - function ($value) { |
|
| 60 | + function($value) { |
|
| 61 | 61 | |
| 62 | 62 | $collection = new ArrayCollection(); |
| 63 | 63 | |