Passed
Pull Request — master (#26)
by Raúl
01:44
created
controllers/front/notify.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     private function getPmtOrderId()
192 192
     {
193 193
         try {
194
-            $this->pmtOrderId= Db::getInstance()->getValue(
194
+            $this->pmtOrderId = Db::getInstance()->getValue(
195 195
                 'select order_id from '._DB_PREFIX_.'pmt_order where id = '.$this->merchantOrderId
196 196
             );
197 197
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     public function validateAmount()
254 254
     {
255 255
         $totalAmount = $this->pmtOrder->getShoppingCart()->getTotalAmount();
256
-        $merchantAmount = (int)((string) (100 * $this->merchantOrder->getOrderTotal(true)));
256
+        $merchantAmount = (int) ((string) (100 * $this->merchantOrder->getOrderTotal(true)));
257 257
         if ($totalAmount != $merchantAmount) {
258 258
             throw new AmountMismatchException($totalAmount, $merchantAmount);
259 259
         }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
                 Configuration::get('PS_OS_PAYMENT'),
273 273
                 $this->merchantOrder->getOrderTotal(true),
274 274
                 $this->module->displayName,
275
-                'pmtOrderId: ' . $this->pmtOrder->getId(),
275
+                'pmtOrderId: '.$this->pmtOrder->getId(),
276 276
                 array('transaction_id' => $this->pmtOrderId),
277 277
                 null,
278 278
                 false,
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     protected function unblockConcurrency()
332 332
     {
333 333
         try {
334
-            Db::getInstance()->delete('pmt_cart_process', 'timestamp < ' . (time() - 6));
334
+            Db::getInstance()->delete('pmt_cart_process', 'timestamp < '.(time() - 6));
335 335
         } catch (\Exception $exception) {
336 336
             throw new ConcurrencyException();
337 337
         }
@@ -348,13 +348,13 @@  discard block
 block discarded – undo
348 348
     public function cancelProcess($response = null)
349 349
     {
350 350
         if ($this->merchantOrder) {
351
-            $id = (!is_null($this->pmtOrder))?$this->pmtOrder->getId():null;
351
+            $id = (!is_null($this->pmtOrder)) ? $this->pmtOrder->getId() : null;
352 352
             $this->module->validateOrder(
353 353
                 $this->merchantOrderId,
354 354
                 Configuration::get('PS_OS_ERROR'),
355 355
                 $this->merchantOrder->getOrderTotal(true),
356 356
                 $this->module->displayName,
357
-                'pmtOrderId: ' . $id,
357
+                'pmtOrderId: '.$id,
358 358
                 null,
359 359
                 null,
360 360
                 false,
@@ -390,9 +390,9 @@  discard block
 block discarded – undo
390 390
             'id_cart' => $this->merchantOrderId,
391 391
             'key' => $this->config['secureKey'],
392 392
             'id_module' => $this->module->id,
393
-            'id_order' => ($this->pmtOrder)?$this->pmtOrder->getId(): null,
393
+            'id_order' => ($this->pmtOrder) ? $this->pmtOrder->getId() : null,
394 394
         );
395
-        $url = ($error)? $this->config['urlKO'] : $this->config['urlOK'];
395
+        $url = ($error) ? $this->config['urlKO'] : $this->config['urlOK'];
396 396
         return $this->redirect($url, $parameters);
397 397
     }
398 398
 }
Please login to merge, or discard this patch.