| @@ -125,12 +125,12 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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()); | 
| @@ -232,11 +232,11 @@ discard block | ||
| 232 | 232 | |
| 233 | 233 | $promotedProduct = $this->isPromoted($item); | 
| 234 | 234 |                  if ($promotedProduct == 'true') { | 
| 235 | - $promotedAmount+=$product->getAmount()*$item->getQty(); | |
| 236 | - $promotedMessage = 'Promoted Item: ' . $item->getName() . | |
| 237 | - ' Price: ' . $item->getPrice() . | |
| 238 | - ' Qty: ' . $item->getQty() . | |
| 239 | - ' Item ID: ' . $item->getItemId(); | |
| 235 | + $promotedAmount += $product->getAmount() * $item->getQty(); | |
| 236 | + $promotedMessage = 'Promoted Item: '.$item->getName(). | |
| 237 | + ' Price: '.$item->getPrice(). | |
| 238 | + ' Qty: '.$item->getQty(). | |
| 239 | + ' Item ID: '.$item->getItemId(); | |
| 240 | 240 |                      $metadataOrder->addMetadata('promotedProduct', $promotedMessage); | 
| 241 | 241 | } | 
| 242 | 242 | } | 
| @@ -273,7 +273,7 @@ discard block | ||
| 273 | 273 | ->setType(Channel::ONLINE) | 
| 274 | 274 | ; | 
| 275 | 275 | |
| 276 | - $haystack = ($this->store->getLocale()!=null) ? $this->store->getLocale() : $this->getResolverCountry(); | |
| 276 | + $haystack = ($this->store->getLocale() != null) ? $this->store->getLocale() : $this->getResolverCountry(); | |
| 277 | 277 | $language = strstr($haystack, '_', true); | 
| 278 | 278 | $orderConfiguration = new Configuration(); | 
| 279 | 279 | $orderConfiguration | 
| @@ -291,7 +291,7 @@ discard block | ||
| 291 | 291 | ->setUser($orderUser) | 
| 292 | 292 | ; | 
| 293 | 293 | |
| 294 | -            if ($this->config['pagantis_public_key']=='' || $this->config['pagantis_private_key']=='') { | |
| 294 | +            if ($this->config['pagantis_public_key'] == '' || $this->config['pagantis_private_key'] == '') { | |
| 295 | 295 |                  throw new \Exception('Public and Secret Key not found'); | 
| 296 | 296 | } | 
| 297 | 297 | |
| @@ -317,7 +317,7 @@ discard block | ||
| 317 | 317 | } | 
| 318 | 318 | |
| 319 | 319 | $displayMode = $this->extraConfig['PAGANTIS_FORM_DISPLAY_TYPE']; | 
| 320 | -        if ($displayMode==='0') { | |
| 320 | +        if ($displayMode === '0') { | |
| 321 | 321 | echo $url; | 
| 322 | 322 | exit; | 
| 323 | 323 |          } else { | 
| @@ -339,11 +339,11 @@ discard block | ||
| 339 | 339 | private function getOrders($customerId) | 
| 340 | 340 |      { | 
| 341 | 341 | $orderCollection = array(); | 
| 342 | -        if ($customerId!='') { | |
| 342 | +        if ($customerId != '') { | |
| 343 | 343 |              $this->orderCollection->addAttributeToFilter('customer_id', $customerId) | 
| 344 | 344 | ->addAttributeToFilter( | 
| 345 | 345 | 'status', | 
| 346 | - ['in' => ['processing','pending','complete']] | |
| 346 | + ['in' => ['processing', 'pending', 'complete']] | |
| 347 | 347 | ) | 
| 348 | 348 | ->load(); | 
| 349 | 349 | $orderCollection = $this->orderCollection->getData(); | 
| @@ -386,7 +386,7 @@ discard block | ||
| 386 | 386 | $tableName = $this->dbObject->getTableName(self::ORDERS_TABLE); | 
| 387 | 387 | return $dbConnection->insertOnDuplicate( | 
| 388 | 388 | $tableName, | 
| 389 | -            array('id'=>$quoteId,'order_id'=>$pagantisOrderId), | |
| 389 | +            array('id'=>$quoteId, 'order_id'=>$pagantisOrderId), | |
| 390 | 390 |              array('order_id') | 
| 391 | 391 | ); | 
| 392 | 392 | } | 
| @@ -400,7 +400,7 @@ discard block | ||
| 400 | 400 | $curlVersion = $curlInfo['version']; | 
| 401 | 401 | $magentoVersion = $this->productMetadataInterface->getVersion(); | 
| 402 | 402 |          $moduleInfo = $this->moduleList->getOne('Pagantis_Pagantis'); | 
| 403 | - return array( 'magento' => $magentoVersion, | |
| 403 | +        return array('magento' => $magentoVersion, | |
| 404 | 404 | 'pagantis' => $moduleInfo['setup_version'], | 
| 405 | 405 | 'php' => phpversion(), | 
| 406 | 406 | 'curl' => $curlVersion); |