Completed
Push — master ( 4b710d...0ce398 )
by Florian
03:51
created
lib/Payone/Config.php 1 patch
Braces   +13 added lines, -14 removed lines patch added patch discarded remove patch
@@ -107,14 +107,16 @@  discard block
 block discarded – undo
107 107
             }
108 108
 
109 109
             $this->config = $this->getDefaultConfigData();
110
-        }
111
-        else {
112
-            if(array_key_exists('api', $data))
113
-                $this->setApiConfig($data['api']);
114
-            if(array_key_exists('transaction_status', $data))
115
-                $this->setTransactionStatusConfig($data['transaction_status']);
116
-            if(array_key_exists('session_status', $data))
117
-                $this->setSessionStatusConfig($data['session_status']);
110
+        } else {
111
+            if(array_key_exists('api', $data)) {
112
+                            $this->setApiConfig($data['api']);
113
+            }
114
+            if(array_key_exists('transaction_status', $data)) {
115
+                            $this->setTransactionStatusConfig($data['transaction_status']);
116
+            }
117
+            if(array_key_exists('session_status', $data)) {
118
+                            $this->setSessionStatusConfig($data['session_status']);
119
+            }
118 120
             $this->config = $data;
119 121
         }
120 122
     }
@@ -173,8 +175,7 @@  discard block
 block discarded – undo
173 175
             $object = $tree[$currentKey];
174 176
             $object->setValue($newKey, $value);
175 177
             return TRUE;
176
-        }
177
-        else {
178
+        } else {
178 179
             // Set value (can overwrite an existing value)
179 180
             $tree[$key] = $value;
180 181
             // Exit recursion, Success!
@@ -208,11 +209,9 @@  discard block
 block discarded – undo
208 209
             /** @var $object Payone_Config_Abstract */
209 210
             $object = $tree[$currentKey];
210 211
             return $object->getValue($newKey);
211
-        }
212
-        elseif (is_array($tree) and array_key_exists($key, $tree)) {
212
+        } elseif (is_array($tree) and array_key_exists($key, $tree)) {
213 213
             return $tree[$key]; // Exit recursion, Success!
214
-        }
215
-        else {
214
+        } else {
216 215
             return NULL; // Exit recursion, unsuccessful
217 216
         }
218 217
     }
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.
lib/Payone/Settings/Service/XmlGenerate.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -108,12 +108,10 @@  discard block
 block discarded – undo
108 108
                     foreach ($value['attribute'] as $attributKey => $attributData) {
109 109
                         $node->addAttribute($attributKey, $attributData);
110 110
                     }
111
-                }
112
-                else {
111
+                } else {
113 112
                     $this->simpleXmlFromNestedArray($key, $value, $parent);
114 113
                 }
115
-            }
116
-            else {
114
+            } else {
117 115
                 $parent->addChild($key, $value);
118 116
             }
119 117
         }
@@ -414,8 +412,7 @@  discard block
 block discarded – undo
414 412
             foreach ($data as $key => $value) {
415 413
                 $child = $this->appendElement($parentNode, $key, $value, $withCdata);
416 414
             }
417
-        }
418
-        else {
415
+        } else {
419 416
             if (isset($data)) {
420 417
                 $child = $this->appendElement($parent, $property, $data, $withCdata);
421 418
             }
@@ -436,8 +433,7 @@  discard block
 block discarded – undo
436 433
             foreach ($value as $key => $data) {
437 434
                 $mapNode->setAttribute($key, $data);
438 435
             }
439
-        }
440
-        else {
436
+        } else {
441 437
             if (!empty($data)) {
442 438
                 $mapNode->setAttribute($name, $value);
443 439
             }
@@ -460,8 +456,7 @@  discard block
 block discarded – undo
460 456
             $cdata = $this->dom->createCDATASection($value);
461 457
             $child = $this->dom->createElement($key);
462 458
             $child->appendChild($cdata);
463
-        }
464
-        else
459
+        } else
465 460
         {
466 461
             $child = $this->dom->createElement($key);
467 462
             if($value !== null)
Please login to merge, or discard this patch.
lib/Payone/TransactionStatus/Request/Abstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
         {
84 84
             if ($data === null) {
85 85
                 continue;
86
-            }
87
-            elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
86
+            } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
88 87
                 $result[$key] = $data;
89 88
             }
90 89
         }
Please login to merge, or discard this patch.
lib/Payone/TransactionStatus/Service/HandleRequest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,8 +99,7 @@
 block discarded – undo
99 99
 
100 100
             // Protocol
101 101
             $this->protocol($request, $response);
102
-        }
103
-        catch (Exception $e) {
102
+        } catch (Exception $e) {
104 103
             $this->protocolException($e, $request);
105 104
             throw $e;
106 105
         }
Please login to merge, or discard this patch.
lib/Payone/SessionStatus/Request/Abstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
         {
84 84
             if ($data === null) {
85 85
                 continue;
86
-            }
87
-            elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
86
+            } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
88 87
                 $result[$key] = $data;
89 88
             }
90 89
         }
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/Service/Payment/Refund.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
             $response = $this->getMapperResponse()->map($responseRaw);
84 84
 
85 85
             $this->protocol($request, $response);
86
-        }
87
-        catch (Exception $e) {
86
+        } catch (Exception $e) {
88 87
             $this->protocolException($e, $request);
89 88
             throw $e;
90 89
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Service/Payment/Vauthorize.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
             $response = $this->getMapperResponse()->map($responseRaw);
84 84
 
85 85
             $this->protocol($request, $response);
86
-        }
87
-        catch (Exception $e) {
86
+        } catch (Exception $e) {
88 87
             $this->protocolException($e, $request);
89 88
             throw $e;
90 89
         }
Please login to merge, or discard this patch.