Completed
Push — master ( 06e75e...4dd477 )
by Florian
06:57
created
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 1 patch
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.
lib/Payone/Protocol/Logger/Log4php.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
             return FALSE;
86 86
         }
87 87
 
88
-        $sFullLogMessage = date('[Y-m-d H:i:s] ').strtoupper($level).' - '.$message.PHP_EOL;
88
+        $sFullLogMessage = date('[Y-m-d H:i:s] ') . strtoupper($level) . ' - ' . $message . PHP_EOL;
89 89
         error_log($sFullLogMessage, 3, $fileName);
90 90
         
91 91
         return true;
Please login to merge, or discard this patch.
lib/Payone/TransactionStatus/Validator/Ip.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
         $remoteAddr = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_SANITIZE_STRING);
109 109
         if ($this->getProxyCheckEnabled() == 1) {
110 110
             $proxy = filter_input(INPUT_SERVER, 'HTTP_X_FORWARDED_FOR', FILTER_SANITIZE_STRING);
111
-            if(!empty($proxy)) {
111
+            if (!empty($proxy)) {
112 112
                 $proxyIps = explode(',', $proxy);
113 113
                 $relevantIp = array_shift($proxyIps);
114 114
                 $relevantIp = trim($relevantIp);
Please login to merge, or discard this patch.
lib/Payone/SessionStatus/Validator/Ip.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
         $remoteAddr = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_SANITIZE_STRING);
109 109
         if ($this->getProxyCheckEnabled() == 1) {
110 110
             $proxy = filter_input(INPUT_SERVER, 'HTTP_X_FORWARDED_FOR', FILTER_SANITIZE_STRING);
111
-            if(!empty($proxy)) {
111
+            if (!empty($proxy)) {
112 112
                 $proxyIps = explode(',', $proxy);
113 113
                 $relevantIp = array_shift($proxyIps);
114 114
                 $relevantIp = trim($relevantIp);
Please login to merge, or discard this patch.