Code Duplication    Length = 24-30 lines in 2 locations

PhpAmqpLib/Channel/AMQPChannel.php 2 locations

@@ 430-459 (lines=30) @@
427
     * @param null $ticket
428
     * @return mixed|null
429
     */
430
    public function exchange_bind(
431
        $destination,
432
        $source,
433
        $routing_key = '',
434
        $nowait = false,
435
        $arguments = null,
436
        $ticket = null
437
    ) {
438
        $arguments = $this->getArguments($arguments);
439
        $ticket = $this->getTicket($ticket);
440
441
        list($class_id, $method_id, $args) = $this->protocolWriter->exchangeBind(
442
            $ticket,
443
            $destination,
444
            $source,
445
            $routing_key,
446
            $nowait,
447
            $arguments
448
        );
449
450
        $this->send_method_frame(array($class_id, $method_id), $args);
451
452
        if ($nowait) {
453
            return null;
454
        }
455
456
        return $this->wait(array(
457
            $this->waitHelper->get_wait('exchange.bind_ok')
458
        ));
459
    }
460
461
    /**
462
     * Confirms bind successful
@@ 516-539 (lines=24) @@
513
     * @param null $ticket
514
     * @return mixed|null
515
     */
516
    public function queue_bind($queue, $exchange, $routing_key = '', $nowait = false, $arguments = null, $ticket = null)
517
    {
518
        $arguments = $this->getArguments($arguments);
519
        $ticket = $this->getTicket($ticket);
520
521
        list($class_id, $method_id, $args) = $this->protocolWriter->queueBind(
522
            $ticket,
523
            $queue,
524
            $exchange,
525
            $routing_key,
526
            $nowait,
527
            $arguments
528
        );
529
530
        $this->send_method_frame(array($class_id, $method_id), $args);
531
532
        if ($nowait) {
533
            return null;
534
        }
535
536
        return $this->wait(array(
537
            $this->waitHelper->get_wait('queue.bind_ok')
538
        ));
539
    }
540
541
    /**
542
     * Confirms bind successful