Code Duplication    Length = 11-12 lines in 3 locations

Transport/PubSub/Publisher.php 1 location

@@ 54-65 (lines=12) @@
51
    /**
52
     * @return CmobiAMQPChannel
53
     */
54
    public function refreshChannel()
55
    {
56
        /** @var CmobiAMQPConnectionInterface $connection */
57
        $connection = $this->connectionManager->getConnection();
58
59
        if (!$connection->isConnected()) {
60
            $connection->reconnect();
61
        }
62
        $this->channel = $connection->channel();
63
64
        return $this->channel;
65
    }
66
67
    /**
68
     * @return CmobiAMQPChannel

Transport/Rpc/RpcClient.php 1 location

@@ 43-53 (lines=11) @@
40
     *
41
     * @throws \Cmobi\RabbitmqBundle\Connection\Exception\NotFoundAMQPConnectionFactoryException
42
     */
43
    public function refreshChannel()
44
    {
45
        $connection = $this->connectionManager->getConnection();
46
47
        if (!$connection->isConnected()) {
48
            $connection->reconnect();
49
        }
50
        $this->channel = $connection->channel();
51
52
        return $this->channel;
53
    }
54
55
    /**
56
     * @param $data

Transport/Worker/Task.php 1 location

@@ 51-62 (lines=12) @@
48
    /**
49
     * @return CmobiAMQPChannel
50
     */
51
    public function refreshChannel()
52
    {
53
        /** @var CmobiAMQPConnectionInterface $connection */
54
        $connection = $this->connectionManager->getConnection();
55
56
        if (!$connection->isConnected()) {
57
            $connection->reconnect();
58
        }
59
        $this->channel = $connection->channel();
60
61
        return $this->channel;
62
    }
63
64
    /**
65
     * @return string