Code Duplication    Length = 8-9 lines in 4 locations

PhpAmqpLib/Helper/Protocol/Protocol080.php 3 locations

@@ 480-487 (lines=8) @@
477
    /**
478
     * @return array
479
     */
480
    public function basicQos($prefetch_size = 0, $prefetch_count = 0, $global = false)
481
    {
482
        $args = new AMQPWriter();
483
        $args->write_long($prefetch_size);
484
        $args->write_short($prefetch_count);
485
        $args->write_bits(array($global));
486
        return array(60, 10, $args);
487
    }
488
489
490
@@ 712-719 (lines=8) @@
709
    /**
710
     * @return array
711
     */
712
    public function fileQos($prefetch_size = 0, $prefetch_count = 0, $global = false)
713
    {
714
        $args = new AMQPWriter();
715
        $args->write_long($prefetch_size);
716
        $args->write_short($prefetch_count);
717
        $args->write_bits(array($global));
718
        return array(70, 10, $args);
719
    }
720
721
722
@@ 903-911 (lines=9) @@
900
    /**
901
     * @return array
902
     */
903
    public function streamQos($prefetch_size = 0, $prefetch_count = 0, $consume_rate = 0, $global = false)
904
    {
905
        $args = new AMQPWriter();
906
        $args->write_long($prefetch_size);
907
        $args->write_short($prefetch_count);
908
        $args->write_long($consume_rate);
909
        $args->write_bits(array($global));
910
        return array(80, 10, $args);
911
    }
912
913
914

PhpAmqpLib/Helper/Protocol/Protocol091.php 1 location

@@ 536-543 (lines=8) @@
533
    /**
534
     * @return array
535
     */
536
    public function basicQos($prefetch_size = 0, $prefetch_count = 0, $global = false)
537
    {
538
        $args = new AMQPWriter();
539
        $args->write_long($prefetch_size);
540
        $args->write_short($prefetch_count);
541
        $args->write_bits(array($global));
542
        return array(60, 10, $args);
543
    }
544
545
546