Completed
Push — master ( fad61c...4fed00 )
by Florian
11s
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/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.
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
 
Please login to merge, or discard this patch.
lib/Payone/TransactionStatus/Service/HandleRequest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             //
99 99
             $response = new Payone_TransactionStatus_Response('TSOK');
100 100
 
101
-            if($request->getClearingtype() == 'cc') {
101
+            if ($request->getClearingtype() == 'cc') {
102 102
                 $this->_handleTransactionId($request);
103 103
             }
104 104
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $oFactory = new Payone_Core_Model_Factory();
118 118
         $oTransaction = $oFactory->getModelTransaction();
119 119
         $oTransaction->load($oRequest->getReference(), 'reference');
120
-        if($oTransaction->getFrontendApiCall() == 1 && !$oTransaction->getTxid()) {
120
+        if ($oTransaction->getFrontendApiCall() == 1 && !$oTransaction->getTxid()) {
121 121
             $oTransaction->setTxid($oRequest->getTxid());
122 122
             $oTransaction->save();
123 123
         }
Please login to merge, or discard this 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.