Completed
Push — master ( e48b3f...12a717 )
by
unknown
02:57
created
lib/Payone/Config/Abstract.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         if (empty($data)) {
79 79
             $this->config = $this->getDefaultConfigData();
80
-        }
81
-        else {
80
+        } else {
82 81
             $this->config = $data;
83 82
         }
84 83
     }
@@ -127,8 +126,7 @@  discard block
 block discarded – undo
127 126
 
128 127
             // Start recursion:
129 128
             return $this->set($newKey, $value, $tree[$currentKey]);
130
-        }
131
-        else {
129
+        } else {
132 130
             // Set value (can overwrite an existing value)
133 131
             $tree[$key] = $value;
134 132
             // Exit recursion, Success!
@@ -166,15 +164,12 @@  discard block
 block discarded – undo
166 164
                 // Reassemble key, start recursion:
167 165
                 $newKey = implode(self::KEY_SEPARATOR, $explodedKey);
168 166
                 return $this->get($newKey, $newTree);
169
-            }
170
-            else {
167
+            } else {
171 168
                 return NULL; // Exit recursion, unsuccessful
172 169
             }
173
-        }
174
-        elseif (is_array($tree) and array_key_exists($key, $tree)) {
170
+        } elseif (is_array($tree) and array_key_exists($key, $tree)) {
175 171
             return $tree[$key]; // Exit recursion, Success!
176
-        }
177
-        else {
172
+        } else {
178 173
             return NULL; // Exit recursion, unsuccessful
179 174
         }
180 175
     }
Please login to merge, or discard this patch.
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/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/Settings/Data/ConfigFile/Abstract.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,21 +51,18 @@
 block discarded – undo
51 51
             if ($data instanceof Payone_Settings_Data_ConfigFile_Interface) {
52 52
                 /** @var Payone_Api_Request_Parameter_Interface $data */
53 53
                 $array[$key] = $data->toArray();
54
-            }
55
-            elseif (is_array($data))
54
+            } elseif (is_array($data))
56 55
             {
57 56
                 foreach ($data as $innerKey => $innerValue)
58 57
                 {
59 58
                     if ($innerValue instanceof Payone_Settings_Data_ConfigFile_Interface) {
60 59
                         /** @var Payone_Api_Request_Parameter_Interface $innerValue */
61 60
                         $array[$key][$innerValue->getKey()] = $innerValue->toArray();
62
-                    }
63
-                    else {
61
+                    } else {
64 62
                         $array[$key][$innerKey] = $innerValue;
65 63
                     }
66 64
                 }
67
-            }
68
-            else {
65
+            } else {
69 66
                 $array[$key] = $data;
70 67
             }
71 68
         }
Please login to merge, or discard this patch.
lib/Payone/Settings/Data/ConfigFile/Shop/ClearingTypes.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
             if ($value instanceof Payone_Settings_Data_ConfigFile_Interface) {
59 59
                 /** @var Payone_Api_Request_Parameter_Interface $value */
60 60
                 $array[$value->getKey()] = $value->toArray();
61
-            }
62
-            else {
61
+            } else {
63 62
                 $array[$key] = $value;
64 63
             }
65 64
         }
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
@@ -104,8 +104,7 @@
 block discarded – undo
104 104
 
105 105
             // Protocol
106 106
             $this->protocol($request, $response);
107
-        }
108
-        catch (Exception $e) {
107
+        } catch (Exception $e) {
109 108
             $this->protocolException($e, $request);
110 109
             throw $e;
111 110
         }
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/Api/Response/Abstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@
 block discarded – undo
75 75
         foreach ($this as $key => $data) {
76 76
             if ($data === null) {
77 77
                 continue;
78
-            }
79
-            elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
78
+            } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
80 79
                 $result[$key] = $data;
81 80
             }
82 81
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Response/AddressCheck/Valid.php 1 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.