| @@ -52,7 +52,7 @@ discard block | ||
| 52 | 52 | |
| 53 | 53 | public function serialize($data, $options = array()) | 
| 54 | 54 |      { | 
| 55 | - $options = $this->setDefaults((array) $options); | |
| 55 | + $options = $this->setDefaults((array)$options); | |
| 56 | 56 | return $this->createXML($options['root_name'], $data)->saveXml(); | 
| 57 | 57 | } | 
| 58 | 58 | |
| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 |      { | 
| 102 | 102 | $xml = $this->getXMLRoot(); | 
| 103 | 103 | $xml->appendChild($this->convert($node_name, $arr)); | 
| 104 | - $this->xml = null; // clear the xml node in the class for 2nd time use. | |
| 104 | + $this->xml = null; // clear the xml node in the class for 2nd time use. | |
| 105 | 105 | return $xml; | 
| 106 | 106 | } | 
| 107 | 107 | |
| @@ -127,8 +127,8 @@ discard block | ||
| 127 | 127 |                  foreach ($arr['@attributes'] as $key => $value) { | 
| 128 | 128 |                      if (!$this->isValidTagName($key)) { | 
| 129 | 129 | throw new Exception( | 
| 130 | - '[Array2XML] Illegal character in attribute name. attribute: '. | |
| 131 | - $key.' in node: '.$node_name | |
| 130 | + '[Array2XML] Illegal character in attribute name. attribute: ' . | |
| 131 | + $key . ' in node: ' . $node_name | |
| 132 | 132 | ); | 
| 133 | 133 | } | 
| 134 | 134 | $node->setAttribute($key, $this->bool2str($value)); | 
| @@ -139,12 +139,12 @@ discard block | ||
| 139 | 139 | // else check if its directly stored as string | 
| 140 | 140 |              if (isset($arr['@value'])) { | 
| 141 | 141 | $node->appendChild($xml->createTextNode($this->bool2str($arr['@value']))); | 
| 142 | - unset($arr['@value']); //remove the key from the array once done. | |
| 142 | + unset($arr['@value']); //remove the key from the array once done. | |
| 143 | 143 | //return from recursion, as a note with value cannot have child nodes. | 
| 144 | 144 | return $node; | 
| 145 | 145 |              } elseif (isset($arr['@cdata'])) { | 
| 146 | 146 | $node->appendChild($xml->createCDATASection($this->bool2str($arr['@cdata']))); | 
| 147 | - unset($arr['@cdata']); //remove the key from the array once done. | |
| 147 | + unset($arr['@cdata']); //remove the key from the array once done. | |
| 148 | 148 | //return from recursion, as a note with cdata cannot have child nodes. | 
| 149 | 149 | return $node; | 
| 150 | 150 | } | 
| @@ -155,8 +155,8 @@ discard block | ||
| 155 | 155 |              foreach ($arr as $key => $value) { | 
| 156 | 156 |                  if (!$this->isValidTagName($key)) { | 
| 157 | 157 | throw new Exception( | 
| 158 | - '[Array2XML] Illegal character in tag name. tag: '. | |
| 159 | - $key.' in node: '.$node_name | |
| 158 | + '[Array2XML] Illegal character in tag name. tag: ' . | |
| 159 | + $key . ' in node: ' . $node_name | |
| 160 | 160 | ); | 
| 161 | 161 | } | 
| 162 | 162 |                  if (is_array($value) && is_numeric(key($value))) { | 
| @@ -144,10 +144,10 @@ | ||
| 144 | 144 |      { | 
| 145 | 145 | $client = new HttpClient(); | 
| 146 | 146 | $client->setConfig(array( | 
| 147 | - 'curl.options' => array( | |
| 148 | - CURLOPT_SSL_VERIFYPEER => false, | |
| 149 | - CURLOPT_SSL_VERIFYHOST => false, | |
| 150 | - ) | |
| 147 | + 'curl.options' => array( | |
| 148 | + CURLOPT_SSL_VERIFYPEER => false, | |
| 149 | + CURLOPT_SSL_VERIFYHOST => false, | |
| 150 | + ) | |
| 151 | 151 | )); | 
| 152 | 152 | $request = $client->post($url, null, $data); | 
| 153 | 153 |          try { | 
| @@ -41,7 +41,7 @@ | ||
| 41 | 41 |      { | 
| 42 | 42 | $response->setOrderId((string)$xml->OrderId); | 
| 43 | 43 | $response->setTransactionId((string)$xml->TransId); | 
| 44 | - $response->setAuthCode((string) $xml->AuthCode); | |
| 44 | + $response->setAuthCode((string)$xml->AuthCode); | |
| 45 | 45 | } | 
| 46 | 46 | |
| 47 | 47 | /** | 
| @@ -30,7 +30,7 @@ | ||
| 30 | 30 | protected function buildRequest(Request $request, $transactionType) | 
| 31 | 31 |      { | 
| 32 | 32 | $rawRequest = $this->builderFactory->createBuilder($transactionType)->build($request); | 
| 33 | - return array( 'DATA' => $rawRequest); | |
| 33 | +        return array('DATA' => $rawRequest); | |
| 34 | 34 | } | 
| 35 | 35 | |
| 36 | 36 | /** | 
| @@ -28,7 +28,7 @@ discard block | ||
| 28 | 28 | protected function buildRequest(Request $request, $transactionType) | 
| 29 | 29 |      { | 
| 30 | 30 | $rawRequest = $this->builderFactory->createBuilder($transactionType)->build($request); | 
| 31 | - return array( 'xmldata' => $rawRequest); | |
| 31 | +        return array('xmldata' => $rawRequest); | |
| 32 | 32 | } | 
| 33 | 33 | |
| 34 | 34 | /** | 
| @@ -38,6 +38,6 @@ discard block | ||
| 38 | 38 | protected function parseResponse($rawResponse, $transactionType) | 
| 39 | 39 |      { | 
| 40 | 40 | $rawRequest = $this->builderFactory->createBuilder($transactionType)->build($request); | 
| 41 | - return array( 'DATA' => $rawRequest); | |
| 41 | +        return array('DATA' => $rawRequest); | |
| 42 | 42 | } | 
| 43 | 43 | } | 
| @@ -28,7 +28,7 @@ | ||
| 28 | 28 | protected function buildRequest(Request $request, $transactionType) | 
| 29 | 29 |      { | 
| 30 | 30 | $rawRequest = $this->builderFactory->createBuilder($transactionType)->build($request); | 
| 31 | - return array( 'data' => $rawRequest); | |
| 31 | +        return array('data' => $rawRequest); | |
| 32 | 32 | } | 
| 33 | 33 | |
| 34 | 34 | /** | 
| @@ -9,7 +9,7 @@ | ||
| 9 | 9 | const TRANSACTION_TYPE = 'reverse'; | 
| 10 | 10 | const ENVELOPE_NAME = 'posnetRequest'; | 
| 11 | 11 | |
| 12 | - const TEMPORARY_DEFAULT_TRANSACTION_TYPE ='sale'; //TODO: To be removed. | |
| 12 | + const TEMPORARY_DEFAULT_TRANSACTION_TYPE = 'sale'; //TODO: To be removed. | |
| 13 | 13 | |
| 14 | 14 | public function build(Request $request) | 
| 15 | 15 |      { |