Completed
Pull Request — master (#24)
by Florian
20:35
created
lib/Payone/Api/Response/Genericpayment/Approved.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Payone/Api/Response/AddressCheck/Valid.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
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];
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
lib/Payone/Api/Response/Parameter/Abstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
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
                 /**
Please login to merge, or discard this patch.
lib/Payone/Api/Response/Management/GetFile.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Service/Payment/Preauthorize.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,8 +100,7 @@
 block discarded – undo
100 100
 
101 101
             // Protocol
102 102
             $this->protocol($request, $response);
103
-        }
104
-        catch (Exception $e) {
103
+        } catch (Exception $e) {
105 104
             $this->protocolException($e, $request);
106 105
             throw $e;
107 106
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Service/ProtocolRequest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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());
Please login to merge, or discard this patch.
lib/Payone/Api/Service/Management/GetFile.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
             $response->setRawResponse($adapter->getRawResponse());
55 55
 
56
-             $this->protocol($request, $response);
56
+                $this->protocol($request, $response);
57 57
         }
58 58
         catch (Exception $e) {
59 59
             $this->protocolException($e, $request);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,8 +100,7 @@
 block discarded – undo
100 100
 
101 101
             // Protocol
102 102
             $this->protocol($request, $response);
103
-        }
104
-        catch (Exception $e) {
103
+        } catch (Exception $e) {
105 104
             $this->protocolException($e, $request);
106 105
             throw $e;
107 106
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Adapter/Http/Curl.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,11 +61,9 @@
 block discarded – undo
61 61
 
62 62
         if (curl_getinfo($curl, CURLINFO_HTTP_CODE) != 200) {
63 63
             throw new Payone_Api_Exception_InvalidResponse();
64
-        }
65
-        elseif (curl_error($curl)) {
64
+        } elseif (curl_error($curl)) {
66 65
             $response[] = "errormessage=" . curl_errno($curl) . ": " . curl_error($curl);
67
-        }
68
-        else {
66
+        } else {
69 67
             $response = explode("\n", $result);
70 68
         }
71 69
 
Please login to merge, or discard this patch.
lib/Payone/Api/Mapper/Response/Abstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,8 +166,7 @@
 block discarded – undo
166 166
     {
167 167
         if (is_array($this->params) and array_key_exists($key, $this->params)) {
168 168
             return $this->params[$key];
169
-        }
170
-        else
169
+        } else
171 170
         {
172 171
             return null;
173 172
         }
Please login to merge, or discard this patch.