Code Duplication    Length = 7-8 lines in 6 locations

PhpAmqpLib/Helper/Protocol/Protocol080.php 4 locations

@@ 398-405 (lines=8) @@
395
    /**
396
     * @return array
397
     */
398
    public function queuePurge($ticket = 1, $queue = '', $nowait = false)
399
    {
400
        $args = new AMQPWriter();
401
        $args->write_short($ticket);
402
        $args->write_shortstr($queue);
403
        $args->write_bits(array($nowait));
404
        return array(50, 30, $args);
405
    }
406
407
408
@@ 534-540 (lines=7) @@
531
    /**
532
     * @return array
533
     */
534
    public function basicCancel($consumer_tag, $nowait = false)
535
    {
536
        $args = new AMQPWriter();
537
        $args->write_shortstr($consumer_tag);
538
        $args->write_bits(array($nowait));
539
        return array(60, 30, $args);
540
    }
541
542
543
@@ 766-772 (lines=7) @@
763
    /**
764
     * @return array
765
     */
766
    public function fileCancel($consumer_tag, $nowait = false)
767
    {
768
        $args = new AMQPWriter();
769
        $args->write_shortstr($consumer_tag);
770
        $args->write_bits(array($nowait));
771
        return array(70, 30, $args);
772
    }
773
774
775
@@ 958-964 (lines=7) @@
955
    /**
956
     * @return array
957
     */
958
    public function streamCancel($consumer_tag, $nowait = false)
959
    {
960
        $args = new AMQPWriter();
961
        $args->write_shortstr($consumer_tag);
962
        $args->write_bits(array($nowait));
963
        return array(80, 30, $args);
964
    }
965
966
967

PhpAmqpLib/Helper/Protocol/Protocol091.php 2 locations

@@ 454-461 (lines=8) @@
451
    /**
452
     * @return array
453
     */
454
    public function queuePurge($ticket = 0, $queue = '', $nowait = false)
455
    {
456
        $args = new AMQPWriter();
457
        $args->write_short($ticket);
458
        $args->write_shortstr($queue);
459
        $args->write_bits(array($nowait));
460
        return array(50, 30, $args);
461
    }
462
463
464
@@ 591-597 (lines=7) @@
588
    /**
589
     * @return array
590
     */
591
    public function basicCancel($consumer_tag, $nowait = false)
592
    {
593
        $args = new AMQPWriter();
594
        $args->write_shortstr($consumer_tag);
595
        $args->write_bits(array($nowait));
596
        return array(60, 30, $args);
597
    }
598
599
600