Passed
Pull Request — master (#32)
by Raúl
11:06
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
         }
@@ -349,13 +349,13 @@  discard block
 block discarded – undo
349 349
     {
350 350
         sleep(5);
351 351
         if ($this->merchantOrder) {
352
-            $id = (!is_null($this->pmtOrder))?$this->pmtOrder->getId():null;
352
+            $id = (!is_null($this->pmtOrder)) ? $this->pmtOrder->getId() : null;
353 353
             $this->module->validateOrder(
354 354
                 $this->merchantOrderId,
355 355
                 Configuration::get('PS_OS_ERROR'),
356 356
                 $this->merchantOrder->getOrderTotal(true),
357 357
                 $this->module->displayName,
358
-                'pmtOrderId: ' . $id,
358
+                'pmtOrderId: '.$id,
359 359
                 null,
360 360
                 null,
361 361
                 false,
@@ -391,9 +391,9 @@  discard block
 block discarded – undo
391 391
             'id_cart' => $this->merchantOrderId,
392 392
             'key' => $this->config['secureKey'],
393 393
             'id_module' => $this->module->id,
394
-            'id_order' => ($this->pmtOrder)?$this->pmtOrder->getId(): null,
394
+            'id_order' => ($this->pmtOrder) ? $this->pmtOrder->getId() : null,
395 395
         );
396
-        $url = ($error)? $this->config['urlKO'] : $this->config['urlOK'];
396
+        $url = ($error) ? $this->config['urlKO'] : $this->config['urlOK'];
397 397
         return $this->redirect($url, $parameters);
398 398
     }
399 399
 }
Please login to merge, or discard this patch.