Completed
Push — master ( e9dbc8...c9d103 )
by Ramūnas
23:40
created

AMQPLazySSLConnection::connectOnConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace PhpAmqpLib\Connection;
4
5 View Code Duplication
class AMQPLazySSLConnection extends AMQPSSLConnection
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function channel($channel_id = null)
11
    {
12
        $this->connect();
13
14
        return parent::channel($channel_id);
15
    }
16
17
    /**
18
     * @return null|\PhpAmqpLib\Wire\IO\AbstractIO
19
     */
20
    public function getIO()
21
    {
22
        if (empty($this->io)) {
23
            $this->connect();
24
        }
25
26
        return $this->io;
27
    }
28
29
    /**
30
     * Should the connection be attempted during construction?
31
     *
32
     * @return bool
33
     */
34
    public function connectOnConstruct()
35
    {
36
        return false;
37
    }
38
}
39