@@ -22,7 +22,7 @@ |
||
22 | 22 | $rootNode |
23 | 23 | ->children() |
24 | 24 | ->scalarNode('consumer_key') |
25 | - ->isRequired() |
|
25 | + ->isRequired() |
|
26 | 26 | ->end() |
27 | 27 | ->scalarNode('consumer_secret') |
28 | 28 | ->isRequired() |
@@ -33,7 +33,7 @@ |
||
33 | 33 | private function years() |
34 | 34 | { |
35 | 35 | $return = []; |
36 | - for ($i = date('Y'); $i <= date('Y')+7; $i++) { |
|
36 | + for ($i = date('Y'); $i <= date('Y') + 7; $i++) { |
|
37 | 37 | $return[$i] = $i; |
38 | 38 | } |
39 | 39 | return $return; |
@@ -24,9 +24,9 @@ |
||
24 | 24 | $extension = $bundle->getContainerExtension(); |
25 | 25 | $container = new ContainerBuilder(); |
26 | 26 | $container->setParameter('kernel.debug', true); |
27 | - $container->setParameter('kernel.cache_dir', sys_get_temp_dir() . '/guzzle'); |
|
27 | + $container->setParameter('kernel.cache_dir', sys_get_temp_dir().'/guzzle'); |
|
28 | 28 | $container->setParameter('kernel.bundles', array()); |
29 | - $container->setParameter('kernel.root_dir', __DIR__ . '/Fixtures'); |
|
29 | + $container->setParameter('kernel.root_dir', __DIR__.'/Fixtures'); |
|
30 | 30 | |
31 | 31 | $container->set('validator', $this->getMock('\Symfony\Component\Validator\Validator\ValidatorInterface')); |
32 | 32 |
@@ -225,6 +225,9 @@ |
||
225 | 225 | ); |
226 | 226 | } |
227 | 227 | |
228 | + /** |
|
229 | + * @param string $message |
|
230 | + */ |
|
228 | 231 | private function errorResponse($message) |
229 | 232 | { |
230 | 233 | $content = $this->templating->render( |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | return $this->successResponse($payment); |
104 | 104 | } |
105 | 105 | } catch (Exception\Declined $e) { |
106 | - return $this->errorResponse('Payment declined: ' . print_r($e->getErrors(), true)); |
|
106 | + return $this->errorResponse('Payment declined: '.print_r($e->getErrors(), true)); |
|
107 | 107 | } catch (Exception\Runtime $e) { |
108 | - return $this->errorResponse('Unexpected error occurred: ' . print_r($e, true)); |
|
108 | + return $this->errorResponse('Unexpected error occurred: '.print_r($e, true)); |
|
109 | 109 | }; |
110 | 110 | } |
111 | 111 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | return new RedirectResponse($this->router->generate('cardinity_client.payment_success')); |
166 | 166 | } |
167 | 167 | } catch (Exception\Runtime $e) { |
168 | - return $this->errorResponse('Unexpected error occurred. ' . $e->getMessage() . ': ' . print_r($e->getErrors(), true)); |
|
168 | + return $this->errorResponse('Unexpected error occurred. '.$e->getMessage().': '.print_r($e->getErrors(), true)); |
|
169 | 169 | }; |
170 | 170 | |
171 | 171 | return $this->errorResponse('Unexpected response while finalizing payment'); |