Completed
Push — master ( 4f6aa3...3890b9 )
by
unknown
01:49 queued 47s
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 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -91,17 +91,17 @@  discard block
 block discarded – undo
91 91
     public function __construct(array $data = array())
92 92
     {
93 93
         if (empty($data)) {
94
-            if($this->getApiConfig() === null)
94
+            if ($this->getApiConfig() === null)
95 95
             {
96 96
                 $this->apiConfig = new Payone_Api_Config();
97 97
             }
98 98
 
99
-            if($this->getTransactionStatusConfig() === null)
99
+            if ($this->getTransactionStatusConfig() === null)
100 100
             {
101 101
                 $this->transactionStatusConfig = new Payone_TransactionStatus_Config();
102 102
             }
103 103
 
104
-            if($this->getSessionStatusConfig() === null)
104
+            if ($this->getSessionStatusConfig() === null)
105 105
             {
106 106
                 $this->sessionStatusConfig = new Payone_SessionStatus_Config();
107 107
             }
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
             $this->config = $this->getDefaultConfigData();
110 110
         }
111 111
         else {
112
-            if(array_key_exists('api', $data))
112
+            if (array_key_exists('api', $data))
113 113
                 $this->setApiConfig($data['api']);
114
-            if(array_key_exists('transaction_status', $data))
114
+            if (array_key_exists('transaction_status', $data))
115 115
                 $this->setTransactionStatusConfig($data['transaction_status']);
116
-            if(array_key_exists('session_status', $data))
116
+            if (array_key_exists('session_status', $data))
117 117
                 $this->setSessionStatusConfig($data['session_status']);
118 118
             $this->config = $data;
119 119
         }
Please login to merge, or discard this 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 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -453,9 +453,9 @@  discard block
 block discarded – undo
453 453
      * @param bool $asCdata
454 454
      * @return DOMElement
455 455
      */
456
-    protected function appendElement( $parent, $key, $value = null, $asCdata = false)
456
+    protected function appendElement($parent, $key, $value = null, $asCdata = false)
457 457
     {
458
-        if($asCdata === true)
458
+        if ($asCdata === true)
459 459
         {
460 460
             $cdata = $this->dom->createCDATASection($value);
461 461
             $child = $this->dom->createElement($key);
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         else
465 465
         {
466 466
             $child = $this->dom->createElement($key);
467
-            if($value !== null)
467
+            if ($value !== null)
468 468
             {
469 469
                 $domValue = $this->dom->createTextNode($value);
470 470
                 $child->appendChild($domValue);
Please login to merge, or discard this 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/Settings/Data/ConfigFile/Shop/Global.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     protected $parameter_invoice = array();
53 53
 
54 54
     /** @var Payone_Settings_Data_ConfigFile_Global_StatusMapping */
55
-    protected $status_mapping = null ;
55
+    protected $status_mapping = null;
56 56
 
57 57
     /** @var array */
58 58
     protected $payment_creditcard = array();
Please login to merge, or discard this patch.
lib/Payone/Settings/Data/ConfigFile/Root.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,6 +67,6 @@
 block discarded – undo
67 67
 
68 68
     public function addShop($shop)
69 69
     {
70
-        return $this->shop[]=$shop;
70
+        return $this->shop[] = $shop;
71 71
     }
72 72
 }
Please login to merge, or discard this patch.
lib/Payone/Settings/Data/ConfigFile/PaymentMethod/Abstract.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
     protected $title = '';
42 42
 
43 43
     protected $mid = null;
44
-    protected $aid =null;
44
+    protected $aid = null;
45 45
     protected $portalid = null;
46 46
     protected $fee_config = array();
47 47
     protected $min_order_total = null;
48
-    protected $max_order_total =null;
48
+    protected $max_order_total = null;
49 49
     /** @var string */
50 50
     protected $types = null;
51 51
     /** @var string */
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
     public function addFeeConfig($value)
115 115
     {
116
-        return $this->fee_config[]=$value;
116
+        return $this->fee_config[] = $value;
117 117
     }
118 118
 
119 119
     public function setMaxOrderTotal($max_order_total)
Please login to merge, or discard this patch.
lib/Payone/Settings/Data/ConfigFile/PaymentMethod/CashOnDelivery.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,8 +143,8 @@
 block discarded – undo
143 143
     }
144 144
 
145 145
     /**
146
-         * @return string
147
-         */
146
+     * @return string
147
+     */
148 148
         public function getKey()
149 149
         {
150 150
             return $this->key;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * @param string $active
58 58
      */
59
-    public function setActive( $active)
59
+    public function setActive($active)
60 60
     {
61 61
         $this->active = $active;
62 62
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     /**
73 73
      * @param string $authorization
74 74
      */
75
-    public function setAuthorization( $authorization)
75
+    public function setAuthorization($authorization)
76 76
     {
77 77
         $this->authorization = $authorization;
78 78
     }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     /**
89 89
      * @param string $countries
90 90
      */
91
-    public function setCountries( $countries)
91
+    public function setCountries($countries)
92 92
     {
93 93
         $this->countries = $countries;
94 94
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     /**
106 106
      * @param string $mode
107 107
      */
108
-    public function setMode( $mode)
108
+    public function setMode($mode)
109 109
     {
110 110
         $this->mode = $mode;
111 111
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     /**
122 122
      * @param string $newOrderStatus
123 123
      */
124
-    public function setNewOrderStatus( $newOrderStatus)
124
+    public function setNewOrderStatus($newOrderStatus)
125 125
     {
126 126
         $this->newOrderStatus = $newOrderStatus;
127 127
     }
Please login to merge, or discard this patch.