Completed
Push — master ( 4dd477...9fac23 )
by Florian
07:23
created
lib/Payone/Api/Service/Payment/Preauthorize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 
67 67
             $requestParams = $this->getMapperRequest()->map($request);
68 68
 
69
-            if($request->isFrontendApiCall() === false) {
69
+            if ($request->isFrontendApiCall() === false) {
70 70
                 $responseRaw = $this->getAdapter()->request($requestParams);
71 71
             } else {
72 72
                 $responseRaw = $request->getFrontendApiResponse();
Please login to merge, or discard this patch.
lib/Payone/Settings/Configuration/PaymentMethod.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         $constants = $this->getClassConstants('Payone_Enum_ClearingType');
42 42
         
43
-        if($blFlipArray === true) {
43
+        if ($blFlipArray === true) {
44 44
             $constants = array_flip($constants);
45 45
         }
46 46
         return $constants;
Please login to merge, or discard this patch.
lib/Payone/TransactionStatus/Request/Abstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
     
100 100
     protected function _toString($aValue)
101 101
     {
102
-        if($this->applyFilters) {
102
+        if ($this->applyFilters) {
103 103
             $result = $this->applyFilters->apply($aValue);
104 104
         } else {
105 105
             $protocolFactory     = new Payone_Protocol_Factory();
Please login to merge, or discard this patch.
lib/Payone/Protocol/Service/ApplyFilters.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         foreach ($objectArray as $key => $value) {
79 79
 
80
-            if($value instanceof Payone_Api_Response_Parameter_Interface){
80
+            if ($value instanceof Payone_Api_Response_Parameter_Interface) {
81 81
                 $stringArray[] = $this->apply($value->toArray());
82 82
             } elseif ($value !== null) {
83 83
                 $filter = $this->getFilterConfig($key);
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
                 }
88 88
             }
89 89
 
90
-            if(is_array($value)) {
90
+            if (is_array($value)) {
91 91
                 foreach ($value as $sArrayKey => $sArrayValue) {
92
-                    $stringArray[] = $key.'_'.$sArrayKey.'='.$sArrayValue;
92
+                    $stringArray[] = $key . '_' . $sArrayKey . '=' . $sArrayValue;
93 93
                 }
94 94
             } else {
95 95
                 $stringArray[] = $key . '=' . $value;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     public function setFilters(array $filters)
127 127
     {
128 128
         $this->filters = array();
129
-        foreach($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value)
129
+        foreach ($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value)
130 130
         {
131 131
             $this->addFilter($value);
132 132
         }
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function getFilterConfig($key)
161 161
     {
162
-        foreach($this->filters_config as $filter => $config) {
163
-            if(in_array($key, $config)) {
162
+        foreach ($this->filters_config as $filter => $config) {
163
+            if (in_array($key, $config)) {
164 164
                 return $this->getFilter($filter);
165 165
             }
166 166
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Response/Genericpayment/Approved.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function getPayDataArray() {
91 91
         $aPayData = array();
92
-        foreach($this->getPayData()->getItems() as $item) {
92
+        foreach ($this->getPayData()->getItems() as $item) {
93 93
             $sCorrectedKey = strtolower($item->getKey());
94 94
             $sCorrectedKey = str_replace('-', '_', $sCorrectedKey);
95 95
             $aPayData[$sCorrectedKey] = $item->getData();
@@ -105,17 +105,17 @@  discard block
 block discarded – undo
105 105
         $aPayData = $this->getPayDataArray();
106 106
         foreach ($aPayData as $sKey => $sValue) {
107 107
             $aSplit = explode('_', $sKey);
108
-            for($i = count($aSplit); $i > 0; $i--) {
109
-                if($i == count($aSplit)) {
110
-                    $aTmp = array($aSplit[$i-1] => $sValue);
108
+            for ($i = count($aSplit); $i > 0; $i--) {
109
+                if ($i == count($aSplit)) {
110
+                    $aTmp = array($aSplit[$i - 1] => $sValue);
111 111
                 } else {
112
-                    $aTmp = array($aSplit[$i-1] => $aTmp);
112
+                    $aTmp = array($aSplit[$i - 1] => $aTmp);
113 113
                 }
114 114
             }
115 115
             $aInstallmentData = array_replace_recursive($aInstallmentData, $aTmp);
116 116
         }
117 117
         
118
-        if(isset($aInstallmentData['paymentdetails']) && count($aInstallmentData['paymentdetails']) > 0) {
118
+        if (isset($aInstallmentData['paymentdetails']) && count($aInstallmentData['paymentdetails']) > 0) {
119 119
             return $aInstallmentData['paymentdetails'];
120 120
         }
121 121
         return false;
Please login to merge, or discard this patch.
lib/Payone/Config.php 1 patch
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.
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/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.