@@ -42,6 +42,6 @@ |
||
| 42 | 42 | const REMINDER = 'reminder'; |
| 43 | 43 | const VAUTHORIZATION = 'vauthorization'; |
| 44 | 44 | const VSETTLEMENT = 'vsettlement'; |
| 45 | - const TRANSFER= 'transfer'; |
|
| 46 | - const INVOICE= 'invoice'; |
|
| 45 | + const TRANSFER = 'transfer'; |
|
| 46 | + const INVOICE = 'invoice'; |
|
| 47 | 47 | } |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | */ |
| 63 | 63 | public function __toString() |
| 64 | 64 | { |
| 65 | - if($this->applyFilters) { |
|
| 65 | + if ($this->applyFilters) { |
|
| 66 | 66 | $result = $this->applyFilters->apply($this->toArray()); |
| 67 | 67 | } else { |
| 68 | 68 | $protocolFactory = new Payone_Protocol_Factory(); |
@@ -83,8 +83,7 @@ |
||
| 83 | 83 | { |
| 84 | 84 | if ($data === null) { |
| 85 | 85 | continue; |
| 86 | - } |
|
| 87 | - elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) { |
|
| 86 | + } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) { |
|
| 88 | 87 | $result[$key] = $data; |
| 89 | 88 | } |
| 90 | 89 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | public function getPayDataArray() |
| 96 | 96 | { |
| 97 | 97 | $aPayData = array(); |
| 98 | - foreach($this->getPayData()->getItems() as $item) { |
|
| 98 | + foreach ($this->getPayData()->getItems() as $item) { |
|
| 99 | 99 | $sCorrectedKey = strtolower($item->getKey()); |
| 100 | 100 | $sCorrectedKey = str_replace('-', '_', $sCorrectedKey); |
| 101 | 101 | $aPayData[$sCorrectedKey] = $item->getData(); |
@@ -112,8 +112,8 @@ discard block |
||
| 112 | 112 | $aPayData = $this->getPayDataArray(); |
| 113 | 113 | foreach ($aPayData as $sKey => $sValue) { |
| 114 | 114 | $aSplit = explode('_', $sKey); |
| 115 | - for($i = count($aSplit); $i > 0; $i--) { |
|
| 116 | - if($i == count($aSplit)) { |
|
| 115 | + for ($i = count($aSplit); $i > 0; $i--) { |
|
| 116 | + if ($i == count($aSplit)) { |
|
| 117 | 117 | $aTmp = array($aSplit[$i-1] => $sValue); |
| 118 | 118 | } else { |
| 119 | 119 | $aTmp = array($aSplit[$i-1] => $aTmp); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $aInstallmentData = array_replace_recursive($aInstallmentData, $aTmp); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - if(isset($aInstallmentData['paymentdetails']) && count($aInstallmentData['paymentdetails']) > 0) { |
|
| 126 | + if (isset($aInstallmentData['paymentdetails']) && count($aInstallmentData['paymentdetails']) > 0) { |
|
| 127 | 127 | return $aInstallmentData['paymentdetails']; |
| 128 | 128 | } |
| 129 | 129 | |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | public function setStreet($street) |
| 160 | 160 | { |
| 161 | 161 | $sNewStreet2 = ''; |
| 162 | - if(stripos($street, '\n') !== false) {//MAGE-195 - split address by the \n and write it in the 2. address field |
|
| 162 | + if (stripos($street, '\n') !== false) {//MAGE-195 - split address by the \n and write it in the 2. address field |
|
| 163 | 163 | $aStreetExpl = explode('\n', $street); |
| 164 | 164 | |
| 165 | 165 | $street = $aStreetExpl[0]; |
@@ -73,8 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | if ($this->secstatus == Payone_Api_Enum_AddressCheckSecstatus::ADDRESS_CORRECT) { |
| 75 | 75 | return TRUE; |
| 76 | - } |
|
| 77 | - else { |
|
| 76 | + } else { |
|
| 78 | 77 | return FALSE; |
| 79 | 78 | } |
| 80 | 79 | } |
@@ -86,8 +85,7 @@ discard block |
||
| 86 | 85 | { |
| 87 | 86 | if ($this->secstatus == Payone_Api_Enum_AddressCheckSecstatus::ADDRESS_CORRECTABLE) { |
| 88 | 87 | return TRUE; |
| 89 | - } |
|
| 90 | - else { |
|
| 88 | + } else { |
|
| 91 | 89 | return FALSE; |
| 92 | 90 | } |
| 93 | 91 | } |
@@ -99,8 +97,7 @@ discard block |
||
| 99 | 97 | { |
| 100 | 98 | if ($this->secstatus == Payone_Api_Enum_AddressCheckSecstatus::ADDRESS_NONE_CORRECTABLE) { |
| 101 | 99 | return TRUE; |
| 102 | - } |
|
| 103 | - else { |
|
| 100 | + } else { |
|
| 104 | 101 | return FALSE; |
| 105 | 102 | } |
| 106 | 103 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | { |
| 54 | 54 | $result = array(); |
| 55 | 55 | foreach ($this as $key => $data) { |
| 56 | - if (!is_array($data) and ! is_object($data)) { |
|
| 56 | + if (!is_array($data) and !is_object($data)) { |
|
| 57 | 57 | $result[$key] = $data; |
| 58 | 58 | } else if ($data instanceof Payone_Api_Response_Parameter_Interface) { |
| 59 | 59 | /** |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | { |
| 61 | 61 | if ($this->isError()) { |
| 62 | 62 | $result = parent::__toString(); |
| 63 | - } |
|
| 64 | - else { |
|
| 63 | + } else { |
|
| 65 | 64 | $stringArray = array('status=' . $this->getStatus(), 'data=PDF-Content'); |
| 66 | 65 | $result = implode('|', $stringArray); |
| 67 | 66 | } |
@@ -73,8 +73,7 @@ |
||
| 73 | 73 | $response = $this->getMapperResponse()->map($responseRaw); |
| 74 | 74 | |
| 75 | 75 | $this->protocol($request, $response); |
| 76 | - } |
|
| 77 | - catch (Exception $e) { |
|
| 76 | + } catch (Exception $e) { |
|
| 78 | 77 | $this->protocolException($e, $request); |
| 79 | 78 | throw $e; |
| 80 | 79 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | $requestParams = $this->getMapperRequest()->map($request); |
| 68 | 68 | |
| 69 | - if($request->isFrontendApiCall() === false) { |
|
| 69 | + if ($request->isFrontendApiCall() === false) { |
|
| 70 | 70 | $responseRaw = $this->getAdapter()->request($requestParams); |
| 71 | 71 | } else { |
| 72 | 72 | $responseRaw = $request->getFrontendApiResponse(); |
@@ -73,8 +73,7 @@ |
||
| 73 | 73 | $response = $this->getMapperResponse()->map($responseRaw); |
| 74 | 74 | |
| 75 | 75 | $this->protocol($request, $response); |
| 76 | - } |
|
| 77 | - catch (Exception $e) { |
|
| 76 | + } catch (Exception $e) { |
|
| 78 | 77 | $this->protocolException($e, $request); |
| 79 | 78 | throw $e; |
| 80 | 79 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | * @param null|Payone_Api_Response_Interface $response |
| 45 | 45 | */ |
| 46 | 46 | public function protocol(Payone_Api_Request_Interface $request, |
| 47 | - Payone_Api_Response_Interface $response = null) |
|
| 47 | + Payone_Api_Response_Interface $response = null) |
|
| 48 | 48 | { |
| 49 | 49 | $request->setApplyFilters($this->getServiceApplyFilters()); |
| 50 | 50 | $response->setApplyFilters($this->getServiceApplyFilters()); |