@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $constants = $this->getClassConstants('Payone_Enum_ClearingType'); |
| 42 | 42 | |
| 43 | - if($blFlipArray === true) { |
|
| 43 | + if ($blFlipArray === true) { |
|
| 44 | 44 | $constants = array_flip($constants); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -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(); |
@@ -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(); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | */ |
| 158 | 158 | public function __toString() |
| 159 | 159 | { |
| 160 | - if($this->applyFilters) { |
|
| 160 | + if ($this->applyFilters) { |
|
| 161 | 161 | $result = $this->applyFilters->apply($this->toArray()); |
| 162 | 162 | } else { |
| 163 | 163 | $protocolFactory = new Payone_Protocol_Factory(); |
@@ -415,10 +415,10 @@ discard block |
||
| 415 | 415 | |
| 416 | 416 | public function isFrontendApiCall() |
| 417 | 417 | { |
| 418 | - if($this instanceof Payone_Api_Request_Authorization_Abstract) { |
|
| 418 | + if ($this instanceof Payone_Api_Request_Authorization_Abstract) { |
|
| 419 | 419 | $oOrder = Mage::getSingleton('checkout/session')->getQuote(); |
| 420 | 420 | $oPayment = $oOrder->getPayment(); |
| 421 | - if($oPayment->getMethod() == 'payone_creditcard_iframe') { |
|
| 421 | + if ($oPayment->getMethod() == 'payone_creditcard_iframe') { |
|
| 422 | 422 | return true; |
| 423 | 423 | } |
| 424 | 424 | } |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | |
| 75 | 75 | $requestParams = $this->getMapperRequest()->map($request); |
| 76 | 76 | |
| 77 | - if($request->isFrontendApiCall() === false) { |
|
| 77 | + if ($request->isFrontendApiCall() === false) { |
|
| 78 | 78 | $responseRaw = $this->getAdapter()->request($requestParams); |
| 79 | 79 | } else { |
| 80 | 80 | $responseRaw = $request->getFrontendApiResponse(); |
@@ -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 | /** |
@@ -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,18 +112,18 @@ 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)) { |
|
| 117 | - $aTmp = array($aSplit[$i-1] => $sValue); |
|
| 115 | + for ($i = count($aSplit); $i > 0; $i--) { |
|
| 116 | + if ($i == count($aSplit)) { |
|
| 117 | + $aTmp = array($aSplit[$i - 1] => $sValue); |
|
| 118 | 118 | } else { |
| 119 | - $aTmp = array($aSplit[$i-1] => $aTmp); |
|
| 119 | + $aTmp = array($aSplit[$i - 1] => $aTmp); |
|
| 120 | 120 | } |
| 121 | 121 | } |
| 122 | 122 | |
| 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 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $stringArray = array(); |
| 77 | 77 | |
| 78 | 78 | foreach ($objectArray as $key => $value) { |
| 79 | - if($value instanceof Payone_Api_Response_Parameter_Interface){ |
|
| 79 | + if ($value instanceof Payone_Api_Response_Parameter_Interface) { |
|
| 80 | 80 | $stringArray[] = $this->apply($value->toArray()); |
| 81 | 81 | } elseif ($value !== null) { |
| 82 | 82 | $filter = $this->getFilterConfig($key); |
@@ -86,9 +86,9 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - if(is_array($value)) { |
|
| 89 | + if (is_array($value)) { |
|
| 90 | 90 | foreach ($value as $sArrayKey => $sArrayValue) { |
| 91 | - $stringArray[] = $key.'_'.$sArrayKey.'='.$sArrayValue; |
|
| 91 | + $stringArray[] = $key . '_' . $sArrayKey . '=' . $sArrayValue; |
|
| 92 | 92 | } |
| 93 | 93 | } else { |
| 94 | 94 | $stringArray[] = $key . '=' . $value; |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | public function setFilters(array $filters) |
| 127 | 127 | { |
| 128 | 128 | $this->filters = array(); |
| 129 | - foreach($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value) |
|
| 129 | + foreach ($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value) |
|
| 130 | 130 | { |
| 131 | 131 | $this->addFilter($value); |
| 132 | 132 | } |
@@ -160,8 +160,8 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | public function getFilterConfig($key) |
| 162 | 162 | { |
| 163 | - foreach($this->filters_config as $filter => $config) { |
|
| 164 | - if(in_array($key, $config)) { |
|
| 163 | + foreach ($this->filters_config as $filter => $config) { |
|
| 164 | + if (in_array($key, $config)) { |
|
| 165 | 165 | return $this->getFilter($filter); |
| 166 | 166 | } |
| 167 | 167 | } |