Completed
Push — master ( 6da602...e92961 )
by Florian
04:20
created
lib/Payone/Api/Mapper/Response/Genericpayment.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,17 +34,13 @@
 block discarded – undo
34 34
 
35 35
         if ($this->isApproved()) {
36 36
             $response = new Payone_Api_Response_Genericpayment_Approved($params);
37
-        }
38
-        elseif ($this->isOk()) {
37
+        } elseif ($this->isOk()) {
39 38
             $response = new Payone_Api_Response_Genericpayment_Ok($params);
40
-        }
41
-        elseif ($this->isRedirect()) {
39
+        } elseif ($this->isRedirect()) {
42 40
             $response = new Payone_Api_Response_Genericpayment_Redirect($params);
43
-        }
44
-        elseif ($this->isError()) {
41
+        } elseif ($this->isError()) {
45 42
             $response = new Payone_Api_Response_Error($params);
46
-        }
47
-        else {
43
+        } else {
48 44
             throw new Payone_Api_Exception_UnknownStatus();
49 45
         }
50 46
         
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
@@ -158,8 +158,7 @@
 block discarded – undo
158 158
     {
159 159
         if (is_array($this->params) and array_key_exists($key, $this->params)) {
160 160
             return $this->params[$key];
161
-        }
162
-        else
161
+        } else
163 162
         {
164 163
             return null;
165 164
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Mapper/Response/AddressCheck.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,14 +45,11 @@
 block discarded – undo
45 45
 
46 46
         if ($this->isValid()) {
47 47
             $response = new Payone_Api_Response_AddressCheck_Valid($params);
48
-        }
49
-        elseif ($this->isInvalid()) {
48
+        } elseif ($this->isInvalid()) {
50 49
             $response = new Payone_Api_Response_AddressCheck_Invalid($params);
51
-        }
52
-        elseif ($this->isError()) {
50
+        } elseif ($this->isError()) {
53 51
             $response = new Payone_Api_Response_Error($params);
54
-        }
55
-        else {
52
+        } else {
56 53
             throw new Payone_Api_Exception_UnknownStatus();
57 54
         }
58 55
 
Please login to merge, or discard this patch.
lib/Payone/Api/Mapper/Response/GetInvoice.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,13 +47,11 @@
 block discarded – undo
47 47
 
48 48
         if ($this->isError()) {
49 49
             $response = new Payone_Api_Response_Error($params);
50
-        }
51
-        elseif (empty($params) || $this->isApproved() || $this->isBlocked() || $this->isEnrolled() ||
50
+        } elseif (empty($params) || $this->isApproved() || $this->isBlocked() || $this->isEnrolled() ||
52 51
             $this->isInvalid() || $this->isRedirect() || $this->isValid()
53 52
         ) {
54 53
             throw new Payone_Api_Exception_UnknownStatus();
55
-        }
56
-        else {
54
+        } else {
57 55
             $params = array('response' => $params);
58 56
             $response = new Payone_Api_Response_Management_GetInvoice($params);
59 57
             $response->setStatus(Payone_Api_Enum_ResponseType::VALID);
Please login to merge, or discard this patch.
lib/Payone/Api/Mapper/Response/ManageMandate.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,11 +46,9 @@
 block discarded – undo
46 46
 
47 47
         if ($this->isApproved()) {
48 48
             $response = new Payone_Api_Response_Management_ManageMandate_Approved($params);
49
-        }
50
-        elseif ($this->isError()) {
49
+        } elseif ($this->isError()) {
51 50
             $response = new Payone_Api_Response_Error($params);
52
-        }
53
-        else {
51
+        } else {
54 52
             throw new Payone_Api_Exception_UnknownStatus();
55 53
         }
56 54
 
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
         curl_close($curl);
Please login to merge, or discard this patch.
lib/Payone/Api/Request/Parameter/Abstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
         {
70 70
             if (!is_array($data) and !is_object($data)) {
71 71
                 $result[$key] = $data;
72
-            }
73
-            else if ($data instanceof Payone_Api_Request_Parameter_Interface) {
72
+            } else if ($data instanceof Payone_Api_Request_Parameter_Interface) {
74 73
                 /**
75 74
                  * @var Payone_Api_Request_Parameter_Interface $data
76 75
                  */
Please login to merge, or discard this patch.
lib/Payone/Api/Request/Abstract.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -140,8 +140,7 @@  discard block
 block discarded – undo
140 140
                  * @var Payone_Api_Request_Parameter_Interface $data
141 141
                  */
142 142
                 $result = array_merge($result, $data->toArray());
143
-            }
144
-            elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
143
+            } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
145 144
                 $result[$key] = $data;
146 145
             }
147 146
         }
@@ -192,8 +191,7 @@  discard block
 block discarded – undo
192 191
 
193 192
                 return $object->get($propertyName);
194 193
             }
195
-        }
196
-        elseif (property_exists($this, $name)) {
194
+        } elseif (property_exists($this, $name)) {
197 195
             return $this->$name;
198 196
         }
199 197
         return null;
@@ -224,8 +222,7 @@  discard block
 block discarded – undo
224 222
 
225 223
                 return $object->set($propertyName, $value);
226 224
             }
227
-        }
228
-        elseif (property_exists($this, $name)) {
225
+        } elseif (property_exists($this, $name)) {
229 226
             $this->$name = $value;
230 227
             return true;
231 228
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Response/Management/GetInvoice.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.