Completed
Pull Request — master (#52)
by Rafał
30:27
created
src/PH/Bundle/CoreBundle/Doctrine/ORM/SubscriptionRepository.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -40,6 +40,9 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/PH/Bundle/CoreBundle/Doctrine/ORM/PaymentMethodRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      */
34 34
     protected function applyCriteria(QueryBuilder $queryBuilder, array $criteria = []): void
35 35
     {
36
-        $criteria = array_filter($criteria, function ($value) {
36
+        $criteria = array_filter($criteria, function($value) {
37 37
             return !is_null($value);
38 38
         });
39 39
 
Please login to merge, or discard this patch.
src/PH/Bundle/CoreBundle/Form/Extension/PaymentMethodTypeExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
                 'data' => $gatewayFactory,
30 30
             ])
31 31
             ->add('supportsRecurring', CheckboxType::class)
32
-            ->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) {
32
+            ->addEventListener(FormEvents::SUBMIT, function(FormEvent $event) {
33 33
                 $paymentMethod = $event->getData();
34 34
 
35 35
                 if (!$paymentMethod instanceof PaymentMethodInterface) {
Please login to merge, or discard this patch.
src/PH/Bundle/CoreBundle/Form/Extension/SubscriptionTypeExtension.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function buildForm(FormBuilderInterface $builder, array $options)
40 40
     {
41
-        $formModifier = function (FormInterface $form, string $type = null) {
41
+        $formModifier = function(FormInterface $form, string $type = null) {
42 42
             $methods = null === $type ? [] : $this->paymentMethodsProvider->getSupportedMethods($type);
43 43
 
44 44
             $form->add('method', PaymentMethodChoiceType::class, [
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         $builder->addEventListener(
51 51
             FormEvents::PRE_SET_DATA,
52
-            function (FormEvent $event) use ($formModifier) {
52
+            function(FormEvent $event) use ($formModifier) {
53 53
                 $data = $event->getData();
54 54
 
55 55
                 $formModifier($event->getForm(), $data->getType());
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         $builder->get('type')->addEventListener(
60 60
             FormEvents::POST_SUBMIT,
61
-            function (FormEvent $event) use ($formModifier) {
61
+            function(FormEvent $event) use ($formModifier) {
62 62
                 $type = $event->getForm()->getData();
63 63
                 $formModifier($event->getForm()->getParent(), $type);
64 64
             }
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
             ->add('metadata', TextType::class);
69 69
 
70 70
         $builder->get('metadata')->addModelTransformer(new CallbackTransformer(
71
-            function ($value) {
71
+            function($value) {
72 72
                 if (is_array($value)) {
73 73
                     return json_encode($value);
74 74
                 }
75 75
 
76 76
                 return $value;
77 77
             },
78
-            function ($value) {
78
+            function($value) {
79 79
                 if (is_string($value)) {
80 80
                     return json_decode($value, true);
81 81
                 }
Please login to merge, or discard this patch.
src/PH/Bundle/SubscriptionBundle/Form/Type/SubscriptionType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@
 block discarded – undo
36 36
 
37 37
         $builder->get('startDate')
38 38
             ->addModelTransformer(new CallbackTransformer(
39
-                function ($value) {
39
+                function($value) {
40 40
                     return $value;
41 41
                 },
42
-                function ($value) {
42
+                function($value) {
43 43
                     if (is_string($value)) {
44 44
                         return new \DateTime($value);
45 45
                     }
Please login to merge, or discard this patch.
src/PH/Component/Core/Model/Subscription.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/PH/Component/Core/Resolver/SubscriptionPaymentStateResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
      */
104 104
     private function getPaymentsWithState(SubscriptionInterface $subscription, string $state)
105 105
     {
106
-        return $subscription->getPayments()->filter(function (PaymentInterface $payment) use ($state) {
106
+        return $subscription->getPayments()->filter(function(PaymentInterface $payment) use ($state) {
107 107
             return $state === $payment->getState();
108 108
         });
109 109
     }
Please login to merge, or discard this patch.