@@ -218,6 +218,9 @@ |
||
| 218 | 218 | ]; |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | + /** |
|
| 222 | + * @param string $message |
|
| 223 | + */ |
|
| 221 | 224 | private function errorResponse($message) |
| 222 | 225 | { |
| 223 | 226 | $content = $this->templating->render( |
@@ -106,9 +106,9 @@ discard block |
||
| 106 | 106 | ); |
| 107 | 107 | } |
| 108 | 108 | } catch (Exception\Declined $e) { |
| 109 | - return $this->errorResponse('Payment declined: ' . print_r($e->getErrors(), true)); |
|
| 109 | + return $this->errorResponse('Payment declined: '.print_r($e->getErrors(), true)); |
|
| 110 | 110 | } catch (Exception\Runtime $e) { |
| 111 | - return $this->errorResponse('Unexpected error occured: ' . print_r($e, true)); |
|
| 111 | + return $this->errorResponse('Unexpected error occured: '.print_r($e, true)); |
|
| 112 | 112 | }; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | return new RedirectResponse($this->router->generate('cardinity_client.payment_success')); |
| 170 | 170 | } |
| 171 | 171 | } catch (Exception\Runtime $e) { |
| 172 | - return $this->errorResponse('Unexpected error occured. ' . $e->getMessage() . ': ' . print_r($e->getErrors(), true)); |
|
| 172 | + return $this->errorResponse('Unexpected error occured. '.$e->getMessage().': '.print_r($e->getErrors(), true)); |
|
| 173 | 173 | }; |
| 174 | 174 | |
| 175 | 175 | return $this->errorResponse('Unexpected response while finalizing payment'); |
@@ -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 | |