Code Duplication    Length = 9-9 lines in 6 locations

src/Payant.php 6 locations

@@ 279-287 (lines=9) @@
276
    * @param  string $reference_code [Mandatory - Invoice Reference Code]
277
    * @return object               
278
    */
279
    public function getInvoice($reference_code){
280
        if(!$reference_code){
281
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
282
        }
283
284
        $url = "/invoices/{$reference_code}";
285
286
        return $this->sendRequest('get', $url);
287
    }
288
289
    /**
290
    * [sendInvoice]
@@ 294-302 (lines=9) @@
291
    * @param  string $reference_code [Mandatory - Invoice Reference Code]
292
    * @return object               
293
    */
294
    public function sendInvoice($reference_code = null){
295
        if(!$reference_code){
296
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
297
        }
298
299
            $url = "/invoices/send/{$reference_code}";
300
301
            return $this->sendRequest('get', $url);
302
    }
303
304
305
@@ 353-361 (lines=9) @@
350
    * @param  string $reference_code [Mandatory - Invoice Reference Code]
351
    * @return object                 
352
    */
353
    public function deleteInvoice($reference_code){
354
        if(!$reference_code){
355
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
356
        }
357
358
        $url = "/invoices/{$reference_code}";
359
360
        return $this->sendRequest('delete', $url);
361
    }
362
363
364
@@ 405-413 (lines=9) @@
402
    * @param  string $reference_code [Mandatory - Transfer Reference Code]
403
    * @return object               
404
    */
405
    public function getTransfer($reference_code){
406
        if(!$reference_code){
407
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
408
        }
409
410
        $url = "/transfers/{$reference_code}";
411
412
        return $this->sendRequest('get', $url);
413
    }
414
415
416
@@ 465-473 (lines=9) @@
462
    * @param  string $reference_code [Mandatory - Invoice Reference Code]
463
    * @return object                 
464
    */
465
    public function deleteTransfer($reference_code){
466
        if(!$reference_code){
467
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
468
        }
469
470
        $url = "/transfers/{$reference_code}";
471
472
        return $this->sendRequest('delete', $url);
473
    }
474
475
476
@@ 528-536 (lines=9) @@
525
    * [getPayment]
526
    * @param string $reference_code [Mandatory - Invoice Reference Code]
527
    */
528
    public function getPayment($reference_code){
529
        if(!$reference_code){
530
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
531
        }
532
533
        $url = "/payments/{$reference_code}";
534
535
        return $this->sendRequest('get', $url);
536
    }
537
538
    
539