Passed
Pull Request — master (#20)
by
unknown
06:59
created
Controller/Payment/Index.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
             $customer = $quote->getCustomer();
126 126
             $shippingAddress = $quote->getShippingAddress();
127 127
 
128
-            if (isset($params['email']) && $params['email']!='') {
128
+            if (isset($params['email']) && $params['email'] != '') {
129 129
                 $this->session->setEmail($params['email']); //Get guest email after refresh page
130 130
                 $customer->setEmail($params['email']);
131 131
                 $quote->setCheckoutMethod('guest');
132 132
                 $quote->getBillingAddress()->setEmail($params['email']);
133
-            } elseif ($customer->getEmail()=='') {
133
+            } elseif ($customer->getEmail() == '') {
134 134
                 $customer->setEmail($this->session->getEmail());
135 135
                 $quote->setCheckoutMethod('guest');
136 136
                 $quote->getBillingAddress()->setEmail($this->session->getEmail());
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             $currentQuote->setCustomerEmail($customer->getEmail());
142 142
             $this->quoteRepository->save($currentQuote);
143 143
 
144
-            $userAddress =  new Address();
144
+            $userAddress = new Address();
145 145
             $userAddress
146 146
                 ->setZipCode($shippingAddress->getPostcode())
147 147
                 ->setFullName($shippingAddress->getFirstname()." ".$shippingAddress->getLastname())
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                 ->setTaxId($tax_id)
164 164
             ;
165 165
 
166
-            $orderBillingAddress =  new Address();
166
+            $orderBillingAddress = new Address();
167 167
             $billingAddress = $quote->getBillingAddress();
168 168
             $orderBillingAddress
169 169
                 ->setZipCode($billingAddress->getPostcode())
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
             if ($customer->getDob()) {
193 193
                 $orderUser->setDateOfBirth($customer->getDob());
194 194
             }
195
-            if ($customer->getTaxvat()!='') {
195
+            if ($customer->getTaxvat() != '') {
196 196
                 $orderUser->setDni($customer->getTaxvat());
197 197
                 $orderBillingAddress->setDni($customer->getTaxvat());
198 198
                 $orderShippingAddress->setDni($customer->getTaxvat());
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                 ->setType(Channel::ONLINE)
263 263
             ;
264 264
             
265
-            $haystack  = $this->store->getLocale();
265
+            $haystack = $this->store->getLocale();
266 266
             $language = strstr($haystack, '_', true);
267 267
             $orderConfiguration = new Configuration();
268 268
             $orderConfiguration
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
                 ->setUser($orderUser)
281 281
             ;
282 282
 
283
-            if ($this->config['pagantis_public_key']=='' || $this->config['pagantis_private_key']=='') {
283
+            if ($this->config['pagantis_public_key'] == '' || $this->config['pagantis_private_key'] == '') {
284 284
                 throw new \Exception('Public and Secret Key not found');
285 285
             }
286 286
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         }
307 307
 
308 308
         $displayMode = $this->extraConfig['PAGANTIS_FORM_DISPLAY_TYPE'];
309
-        if ($displayMode==='0') {
309
+        if ($displayMode === '0') {
310 310
             echo $url;
311 311
             exit;
312 312
         } else {
@@ -328,11 +328,11 @@  discard block
 block discarded – undo
328 328
     private function getOrders($customerId)
329 329
     {
330 330
         $orderCollection = array();
331
-        if ($customerId!='') {
331
+        if ($customerId != '') {
332 332
             $this->orderCollection->addAttributeToFilter('customer_id', $customerId)
333 333
                             ->addAttributeToFilter(
334 334
                                 'status',
335
-                                ['in' => ['processing','pending','complete']]
335
+                                ['in' => ['processing', 'pending', 'complete']]
336 336
                             )
337 337
                             ->load();
338 338
             $orderCollection = $this->orderCollection->getData();
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
         $tableName = $this->dbObject->getTableName(self::ORDERS_TABLE);
376 376
         return $dbConnection->insertOnDuplicate(
377 377
             $tableName,
378
-            array('id'=>$quoteId,'order_id'=>$pagantisOrderId),
378
+            array('id'=>$quoteId, 'order_id'=>$pagantisOrderId),
379 379
             array('order_id')
380 380
         );
381 381
     }
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
         $curlVersion = $curlInfo['version'];
390 390
         $magentoVersion = $this->productMetadataInterface->getVersion();
391 391
         $moduleInfo = $this->moduleList->getOne('Pagantis_Pagantis');
392
-        return array(  'magento' => $magentoVersion,
392
+        return array('magento' => $magentoVersion,
393 393
                        'pagantis' => $moduleInfo['setup_version'],
394 394
                        'php' => phpversion(),
395 395
                        'curl' => $curlVersion);
Please login to merge, or discard this patch.