Code Duplication    Length = 14-14 lines in 2 locations

PhpAmqpLib/Channel/AMQPChannel.php 2 locations

@@ 745-758 (lines=14) @@
742
     * @param AMQPReader $args
743
     * @throws AMQPRuntimeException
744
     */
745
    protected function basic_ack_from_server(AMQPReader $args)
746
    {
747
        $delivery_tag = $args->read_longlong();
748
        $multiple = (bool) $args->read_bit();
749
750
        if (false === isset($this->published_messages[$delivery_tag])) {
751
            throw new AMQPRuntimeException(sprintf(
752
                'Server ack\'ed unknown delivery_tag "%s"',
753
                $delivery_tag
754
            ));
755
        }
756
757
        $this->internal_ack_handler($delivery_tag, $multiple, $this->ack_handler);
758
    }
759
760
    /**
761
     * Called when the server sends a basic.nack
@@ 766-779 (lines=14) @@
763
     * @param AMQPReader $args
764
     * @throws AMQPRuntimeException
765
     */
766
    protected function basic_nack_from_server($args)
767
    {
768
        $delivery_tag = $args->read_longlong();
769
        $multiple = (bool) $args->read_bit();
770
771
        if (false === isset($this->published_messages[$delivery_tag])) {
772
            throw new AMQPRuntimeException(sprintf(
773
                'Server nack\'ed unknown delivery_tag "%s"',
774
                $delivery_tag
775
            ));
776
        }
777
778
        $this->internal_ack_handler($delivery_tag, $multiple, $this->nack_handler);
779
    }
780
781
    /**
782
     * Handles the deletion of messages from this->publishedMessages and dispatches them to the $handler