Test Setup Failed
Push — master ( 27bb17...16acb2 )
by Emmanuel
02:25
created
src/Payant.php 1 patch
Braces   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
         if(!$fee_bearer){
247 247
             throw new IsNull("Error Processing Request - Null Fee Bearer");
248
-        }elseif (!in_array($fee_bearer, $valid_fee_bearers)) {
248
+        } elseif (!in_array($fee_bearer, $valid_fee_bearers)) {
249 249
             throw new InvalidFeeBearer("Invalid Fee Bearer - Use either 'account' or 'client'");
250 250
         }
251 251
 
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 
388 388
         if(!$channel){
389 389
             throw new IsNull("Error Processing Request - Null/Invalid amount");
390
-        }elseif (!in_array(ucfirst($channel), $valid_channels)) {
390
+        } elseif (!in_array(ucfirst($channel), $valid_channels)) {
391 391
             throw new IsInvalid("Invalid Channel - Cash, BankTransfer, POS or Cheque");
392 392
         }
393 393
 
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
 
491 491
         if(!$type){
492 492
             throw new IsNull("Error Processing Request - Null/Invalid type");
493
-        }elseif (!in_array(strtolower($type), $valid_product_type)) {
493
+        } elseif (!in_array(strtolower($type), $valid_product_type)) {
494 494
             throw new IsInvalid("Invalid Type - Available options: 'product' or 'service'");
495 495
         }
496 496
 
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
 
548 548
         if(!$product_type){
549 549
             throw new IsNull("Error Processing Request - Null/Invalid type");
550
-        }elseif (!in_array($product_type, $valid_product_type)) {
550
+        } elseif (!in_array($product_type, $valid_product_type)) {
551 551
             throw new IsInvalid("Invalid Type - Available options: 'product' or 'service'");
552 552
         }
553 553
 
@@ -607,17 +607,16 @@  discard block
 block discarded – undo
607 607
         try{
608 608
             if (strtolower($method) == 'get'){
609 609
                 $result = $this->client->request('GET', $url);
610
-            }elseif (strtolower($method) == 'post'){
610
+            } elseif (strtolower($method) == 'post'){
611 611
                 $result = $this->client->request('POST', $url, $params);
612
-            }elseif (strtolower($method) == 'put'){
612
+            } elseif (strtolower($method) == 'put'){
613 613
                 $result = $this->client->request('PUT', $url, $params);
614
-            }elseif (strtolower($method) == 'delete'){
614
+            } elseif (strtolower($method) == 'delete'){
615 615
                 $result = $this->client->request('DELETE', $url);
616 616
             }
617 617
 
618 618
             return cleanResponse($result);
619
-        }
620
-        catch( Exception $e){
619
+        } catch( Exception $e){
621 620
             throw $e;
622 621
         }
623 622
     }
Please login to merge, or discard this patch.