Code Duplication    Length = 9-9 lines in 6 locations

src/Payant.php 6 locations

@@ 278-286 (lines=9) @@
275
    * @param  string $reference_code [Mandatory - Invoice Reference Code]
276
    * @return object               
277
    */
278
    public function getInvoice($reference_code){
279
        if(!$reference_code){
280
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
281
        }
282
283
        $url = "/invoices/{$reference_code}";
284
285
        return $this->sendRequest('get', $url);
286
    }
287
288
    /**
289
    * [sendInvoice]
@@ 293-301 (lines=9) @@
290
    * @param  string $reference_code [Mandatory - Invoice Reference Code]
291
    * @return object               
292
    */
293
    public function sendInvoice($reference_code = null){
294
        if(!$reference_code){
295
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
296
        }
297
298
            $url = "/invoices/send/{$reference_code}";
299
300
            return $this->sendRequest('get', $url);
301
    }
302
303
304
@@ 335-343 (lines=9) @@
332
    * @param  string $reference_code [Mandatory - Invoice Reference Code]
333
    * @return object                 
334
    */
335
    public function deleteInvoice($reference_code){
336
        if(!$reference_code){
337
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
338
        }
339
340
        $url = "/invoices/{$reference_code}";
341
342
        return $this->sendRequest('delete', $url);
343
    }
344
345
346
@@ 387-395 (lines=9) @@
384
    * @param  string $reference_code [Mandatory - Transfer Reference Code]
385
    * @return object               
386
    */
387
    public function getTransfer($reference_code){
388
        if(!$reference_code){
389
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
390
        }
391
392
        $url = "/transfers/{$reference_code}";
393
394
        return $this->sendRequest('get', $url);
395
    }
396
397
398
@@ 431-439 (lines=9) @@
428
    * @param  string $reference_code [Mandatory - Invoice Reference Code]
429
    * @return object                 
430
    */
431
    public function deleteTransfer($reference_code){
432
        if(!$reference_code){
433
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
434
        }
435
436
        $url = "/transfers/{$reference_code}";
437
438
        return $this->sendRequest('delete', $url);
439
    }
440
441
442
@@ 494-502 (lines=9) @@
491
    * [getPayment]
492
    * @param string $reference_code [Mandatory - Invoice Reference Code]
493
    */
494
    public function getPayment($reference_code){
495
        if(!$reference_code){
496
            throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code");
497
        }
498
499
        $url = "/payments/{$reference_code}";
500
501
        return $this->sendRequest('get', $url);
502
    }
503
504
    
505