Passed
Pull Request — master (#4)
by
unknown
02:13
created
catalog/ext/modules/payment/pagantis/notifyController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
             if ($this->origin == 'notify') {
76 76
                 $jsonResponse->printResponse();
77
-            } else {
77
+            }else {
78 78
                 header("Location: $shippingUrl");
79 79
                 exit;
80 80
             }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
         if ($_SERVER['REQUEST_METHOD'] == 'POST') {
103 103
             $jsonResponse->printResponse();
104
-        } else {
104
+        }else {
105 105
             return $jsonResponse;
106 106
         }
107 107
     }
@@ -173,12 +173,12 @@  discard block
 block discarded – undo
173 173
         try {
174 174
             $this->checkPagantisStatus(array('AUTHORIZED'));
175 175
         } catch (\Exception $e) {
176
-            if ($this->findOscommerceOrderId()!=='') {
176
+            if ($this->findOscommerceOrderId() !== '') {
177 177
                 return;
178
-            } else {
178
+            }else {
179 179
                 if ($this->pagantisOrder instanceof \Pagantis\OrdersApiClient\Model\Order) {
180 180
                     $status = $this->pagantisOrder->getStatus();
181
-                } else {
181
+                }else {
182 182
                     $status = '-';
183 183
                 }
184 184
                 throw new WrongStatusException($status);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     {
194 194
         global $order;
195 195
 
196
-        if ($order->info['order_status']!=='1') {
196
+        if ($order->info['order_status'] !== '1') {
197 197
             throw new AlreadyProcessedException();
198 198
         }
199 199
     }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             if ($orderId == null) {
271 271
                 $query = "delete from ".TABLE_PAGANTIS_CONCURRENCY." where  timestamp<".(time() - 5);
272 272
                 tep_db_query($query);
273
-            } elseif ($this->$orderId!='') {
273
+            } elseif ($this->$orderId != '') {
274 274
                 $query = "delete from ".TABLE_PAGANTIS_CONCURRENCY." where id='$orderId'";
275 275
                 tep_db_query($query);
276 276
             }
@@ -313,12 +313,12 @@  discard block
 block discarded – undo
313 313
             if (!$payed) {
314 314
                 if ($this->pagantisOrder instanceof \Pagantis\OrdersApiClient\Model\Order) {
315 315
                     $status = $this->pagantisOrder->getStatus();
316
-                } else {
316
+                }else {
317 317
                     $status = '-';
318 318
                 }
319 319
                 throw new WrongStatusException($status);
320 320
             }
321
-        } else {
321
+        }else {
322 322
             throw new OrderNotFoundException();
323 323
         }
324 324
     }
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         tep_db_query($query);
350 350
 
351 351
         $comment = "Pagantis id=$this->pagantisOrderId/Via=".$this->origin;
352
-        $query = "insert into ".TABLE_ORDERS_STATUS_HISTORY ."(comments, orders_id, orders_status_id, customer_notified, date_added) values
352
+        $query = "insert into ".TABLE_ORDERS_STATUS_HISTORY."(comments, orders_id, orders_status_id, customer_notified, date_added) values
353 353
             ('$comment', ".$insert_id.", '2', -1, now() )";
354 354
         tep_db_query($query);
355 355
 
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
     private function insertLog($exception)
372 372
     {
373 373
         if ($exception instanceof \Exception) {
374
-            $logEntry= new LogEntry();
374
+            $logEntry = new LogEntry();
375 375
             $logEntryJson = $logEntry->error($exception)->toJson();
376 376
 
377 377
             $query = "insert into ".TABLE_PAGANTIS_LOG."(log) values ('$logEntryJson')";
Please login to merge, or discard this patch.
catalog/ext/modules/payment/pagantis/callback.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@
 block discarded – undo
16 16
         tep_session_register($var);
17 17
     }
18 18
     $destUrl = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true, false);
19
-    $destUrl.="?order_id=$_GET[order_id]&from=notify";
20
-} else {
19
+    $destUrl .= "?order_id=$_GET[order_id]&from=notify";
20
+}else {
21 21
     $destUrl = tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL', true, false);
22 22
 }
23 23
 
Please login to merge, or discard this patch.