Completed
Pull Request — master (#106)
by Florian
03:43
created
lib/Payone/Api/Adapter/Http/Curl.php 2 patches
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@
 block discarded – undo
55 55
         curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
56 56
         curl_setopt($curl, CURLOPT_TIMEOUT, self::DEFAULT_TIMEOUT);
57 57
 
58
-        if ( $this->checkIfProxyIsEnabled() ) {
59
-            curl_setopt($curl,  CURLOPT_PROXY, $this->getProxyUrl());
58
+        if ($this->checkIfProxyIsEnabled()) {
59
+            curl_setopt($curl, CURLOPT_PROXY, $this->getProxyUrl());
60 60
             curl_setopt($curl, CURLOPT_PROXYPORT, $this->getProxyPort());
61 61
         }
62 62
 
Please login to merge, or discard this patch.
lib/Payone/Api/Mapper/Response/UpdateAccess.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,11 +47,9 @@
 block discarded – undo
47 47
 
48 48
         if ($this->isOk()) {
49 49
             $response = new Payone_Api_Response_Management_UpdateAccess_Ok($params);
50
-        }
51
-        elseif ($this->isError()) {
50
+        } elseif ($this->isError()) {
52 51
             $response = new Payone_Api_Response_Error($params);
53
-        }
54
-        else {
52
+        } else {
55 53
             throw new Payone_Api_Exception_UnknownStatus();
56 54
         }
57 55
 
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/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.
lib/Payone/Api/Mapper/Response/Debit.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_Debit_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/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/Refund.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,11 +47,9 @@
 block discarded – undo
47 47
 
48 48
         if ($this->isApproved()) {
49 49
             $response = new Payone_Api_Response_Refund_Approved($params);
50
-        }
51
-        elseif ($this->isError()) {
50
+        } elseif ($this->isError()) {
52 51
             $response = new Payone_Api_Response_Error($params);
53
-        }
54
-        else {
52
+        } else {
55 53
             throw new Payone_Api_Exception_UnknownStatus();
56 54
         }
57 55
 
Please login to merge, or discard this patch.
lib/Payone/Api/Mapper/Response/CreditCardCheck.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->isValid()) {
48 48
             $response = new Payone_Api_Response_CreditCardCheck_Valid($params);
49
-        }
50
-        elseif ($this->isInvalid()) {
49
+        } elseif ($this->isInvalid()) {
51 50
             $response = new Payone_Api_Response_CreditCardCheck_Invalid($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/Capture.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,11 +47,9 @@
 block discarded – undo
47 47
 
48 48
         if ($this->isApproved()) {
49 49
             $response = new Payone_Api_Response_Capture_Approved($params);
50
-        }
51
-        elseif ($this->isError()) {
50
+        } elseif ($this->isError()) {
52 51
             $response = new Payone_Api_Response_Error($params);
53
-        }
54
-        else {
52
+        } else {
55 53
             throw new Payone_Api_Exception_UnknownStatus();
56 54
         }
57 55
 
Please login to merge, or discard this patch.