@@ -36,7 +36,7 @@ |
||
36 | 36 | $container->setParameter('ggggino_skuskucart.cart_mode', $config['cart_mode']); |
37 | 37 | |
38 | 38 | foreach ($config['templates'] as $key => $template) { |
39 | - $container->setParameter('ggggino_skuskucart.templates.' . $key, $template); |
|
39 | + $container->setParameter('ggggino_skuskucart.templates.'.$key, $template); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $paymentMethod = $data->getPaymentMethod(); |
101 | 101 | |
102 | 102 | // se non è settato vuol dire che non ci sono ancora arrivato |
103 | - if( !$paymentMethod ) |
|
103 | + if (!$paymentMethod) |
|
104 | 104 | return false; |
105 | 105 | |
106 | 106 | /** @var GatewayInterface $gateway */ |
@@ -126,11 +126,11 @@ discard block |
||
126 | 126 | $this->saveCurrentStepData($form); |
127 | 127 | |
128 | 128 | |
129 | - if( !$this->allowAnonymous ) |
|
129 | + if (!$this->allowAnonymous) |
|
130 | 130 | throw new AccessDeniedException("Anonymous users cannot buy"); |
131 | 131 | |
132 | 132 | // @todo done this because craue form flow doesn't permit to add a custom action |
133 | - if( $this->requestStack->getCurrentRequest()->request->get('flow_cart_transition') == self::TRANSITION_RESET_CART ) { |
|
133 | + if ($this->requestStack->getCurrentRequest()->request->get('flow_cart_transition') == self::TRANSITION_RESET_CART) { |
|
134 | 134 | $this->emptyCart($formData); |
135 | 135 | $this->reset(); |
136 | 136 | $form = $this->createForm(); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $finalCart->setPayment($payment); |
174 | 174 | |
175 | 175 | $requestFields = $this->requestStack->getCurrentRequest()->request->get('choosePayment'); |
176 | - if(isset($requestFields['additionalFields']) && count($requestFields['additionalFields']) > 0 ) { |
|
176 | + if (isset($requestFields['additionalFields']) && count($requestFields['additionalFields']) > 0) { |
|
177 | 177 | $finalCart->setAdditionalFields(json_encode($requestFields['additionalFields'])); |
178 | 178 | } |
179 | 179 |
@@ -100,8 +100,9 @@ discard block |
||
100 | 100 | $paymentMethod = $data->getPaymentMethod(); |
101 | 101 | |
102 | 102 | // se non è settato vuol dire che non ci sono ancora arrivato |
103 | - if( !$paymentMethod ) |
|
104 | - return false; |
|
103 | + if( !$paymentMethod ) { |
|
104 | + return false; |
|
105 | + } |
|
105 | 106 | |
106 | 107 | /** @var GatewayInterface $gateway */ |
107 | 108 | $gateway = $this->payum->getGateway($paymentMethod); |
@@ -126,8 +127,9 @@ discard block |
||
126 | 127 | $this->saveCurrentStepData($form); |
127 | 128 | |
128 | 129 | |
129 | - if( !$this->allowAnonymous ) |
|
130 | - throw new AccessDeniedException("Anonymous users cannot buy"); |
|
130 | + if( !$this->allowAnonymous ) { |
|
131 | + throw new AccessDeniedException("Anonymous users cannot buy"); |
|
132 | + } |
|
131 | 133 | |
132 | 134 | // @todo done this because craue form flow doesn't permit to add a custom action |
133 | 135 | if( $this->requestStack->getCurrentRequest()->request->get('flow_cart_transition') == self::TRANSITION_RESET_CART ) { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | protected $extra_fields; |
21 | 21 | |
22 | - public function __construct( $extra_fields ) { |
|
22 | + public function __construct($extra_fields) { |
|
23 | 23 | $this->extra_fields = $extra_fields; |
24 | 24 | } |
25 | 25 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | |
24 | 24 | foreach ($options['fields'] as $field) { |
25 | - $class = 'Symfony\Component\Form\Extension\Core\Type\\'.$field['type'] .'Type'; |
|
25 | + $class = 'Symfony\Component\Form\Extension\Core\Type\\'.$field['type'].'Type'; |
|
26 | 26 | |
27 | 27 | $cssClass = null !== $field['class'] ? $field['class'] : ''; |
28 | 28 | |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | ) |
36 | 36 | )); |
37 | 37 | |
38 | - if($field['data'] !== null) { |
|
39 | - $builder->get($field['id'])->setData( true ); |
|
38 | + if ($field['data'] !== null) { |
|
39 | + $builder->get($field['id'])->setData(true); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 |