Code Duplication    Length = 10-10 lines in 2 locations

src/AMQP091/Channel.php 2 locations

@@ 546-555 (lines=10) @@
543
    /**
544
     * @param BasicAck $frame
545
     */
546
    private function onBasicAck(BasicAck $frame)
547
    {
548
        if (!$this->confirmCallable) {
549
            throw new \RuntimeException(
550
                'Something is wrong: channel is in confirm mode, but confirm callable is not set'
551
            );
552
        }
553
554
        call_user_func($this->confirmCallable, new Confirm(true, $frame->getDeliveryTag(), $frame->isMultiple()));
555
    }
556
557
    /**
558
     * @param BasicNack $frame
@@ 560-569 (lines=10) @@
557
    /**
558
     * @param BasicNack $frame
559
     */
560
    private function onBasicNack(BasicNack $frame)
561
    {
562
        if (!$this->confirmCallable) {
563
            throw new \RuntimeException(
564
                'Something is wrong: channel is in confirm mode, but confirm callable is not set'
565
            );
566
        }
567
568
        call_user_func($this->confirmCallable, new Confirm(false, $frame->getDeliveryTag(), $frame->isMultiple()));
569
    }
570
571
    /**
572
     * @param BasicCancel $frame