Completed
Pull Request — master (#22)
by
unknown
04:53
created
lib/Payone/Api/Mapper/Response/Authorization.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,14 +46,11 @@
 block discarded – undo
46 46
 
47 47
         if ($this->isApproved()) {
48 48
             $response = new Payone_Api_Response_Authorization_Approved($params);
49
-        }
50
-        elseif ($this->isRedirect()) {
49
+        } elseif ($this->isRedirect()) {
51 50
             $response = new Payone_Api_Response_Authorization_Redirect($params);
52
-        }
53
-        elseif ($this->isError()) {
51
+        } elseif ($this->isError()) {
54 52
             $response = new Payone_Api_Response_Error($params);
55
-        }
56
-        else {
53
+        } else {
57 54
             throw new Payone_Api_Exception_UnknownStatus();
58 55
         }
59 56
 
Please login to merge, or discard this patch.
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/Vauthorization.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_Vauthorization_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/Mapper/Response/BankAccountCheck.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,17 +46,13 @@
 block discarded – undo
46 46
 
47 47
         if ($this->isValid()) {
48 48
             $response = new Payone_Api_Response_BankAccountCheck_Valid($params);
49
-        }
50
-        elseif ($this->isInvalid()) {
49
+        } elseif ($this->isInvalid()) {
51 50
             $response = new Payone_Api_Response_BankAccountCheck_Invalid($params);
52
-        }
53
-        elseif ($this->isBlocked()) {
51
+        } elseif ($this->isBlocked()) {
54 52
             $response = new Payone_Api_Response_BankAccountCheck_Blocked($params);
55
-        }
56
-        elseif ($this->isError()) {
53
+        } elseif ($this->isError()) {
57 54
             $response = new Payone_Api_Response_Error($params);
58
-        }
59
-        else {
55
+        } else {
60 56
             throw new Payone_Api_Exception_UnknownStatus();
61 57
         }
62 58
 
Please login to merge, or discard this patch.
lib/Payone/Api/Mapper/Response/GetFile.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_GetFile($params);
59 57
             $response->setStatus(Payone_Api_Enum_ResponseType::VALID);
Please login to merge, or discard this patch.
lib/Payone/Api/Mapper/Response/3dsCheck.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,17 +45,13 @@
 block discarded – undo
45 45
 
46 46
         if ($this->isValid()) {
47 47
             $response = new Payone_Api_Response_3dsCheck_Valid($params);
48
-        }
49
-        elseif ($this->isEnrolled()) {
48
+        } elseif ($this->isEnrolled()) {
50 49
             $response = new Payone_Api_Response_3dsCheck_Enrolled($params);
51
-        }
52
-        elseif ($this->isInvalid()) {
50
+        } elseif ($this->isInvalid()) {
53 51
             $response = new Payone_Api_Response_3dsCheck_Invalid($params);
54
-        }
55
-        elseif ($this->isError()) {
52
+        } elseif ($this->isError()) {
56 53
             $response = new Payone_Api_Response_Error($params);
57
-        }
58
-        else {
54
+        } else {
59 55
             throw new Payone_Api_Exception_UnknownStatus();
60 56
         }
61 57
 
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
@@ -141,8 +141,7 @@  discard block
 block discarded – undo
141 141
                  * @var Payone_Api_Request_Parameter_Interface $data
142 142
                  */
143 143
                 $result = array_merge($result, $data->toArray());
144
-            }
145
-            elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
144
+            } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
146 145
                 $result[$key] = $data;
147 146
             }
148 147
         }
@@ -194,8 +193,7 @@  discard block
 block discarded – undo
194 193
 
195 194
                 return $object->get($propertyName);
196 195
             }
197
-        }
198
-        elseif (property_exists($this, $name)) {
196
+        } elseif (property_exists($this, $name)) {
199 197
             return $this->$name;
200 198
         }
201 199
 
@@ -228,8 +226,7 @@  discard block
 block discarded – undo
228 226
 
229 227
                 return $object->set($propertyName, $value);
230 228
             }
231
-        }
232
-        elseif (property_exists($this, $name)) {
229
+        } elseif (property_exists($this, $name)) {
233 230
             $this->$name = $value;
234 231
             return true;
235 232
         }
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/ClientApi/Request/Abstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,8 +189,7 @@
 block discarded – undo
189 189
 
190 190
                 return $object->get($propertyName);
191 191
             }
192
-        }
193
-        elseif (property_exists($this, $name)) {
192
+        } elseif (property_exists($this, $name)) {
194 193
             return $this->$name;
195 194
         }
196 195
 
Please login to merge, or discard this patch.