Code Duplication    Length = 20-20 lines in 2 locations

PHPDaemon/Clients/AMQP/Driver/Protocol/v091/Protocol/Connection/ConnectionBlockedFrame.php 1 location

@@ 13-32 (lines=20) @@
10
 * @author Aleksey I. Kuleshov YOU GLOBAL LIMITED
11
 * @package PHPDaemon\Clients\AMQP\Driver\Protocol\v091\Protocol\Connection
12
 */
13
class ConnectionBlockedFrame implements MethodFrame, IncomingFrame
14
{
15
    const METHOD_ID = 0x000a003c;
16
17
    public $frameChannelId = 0;
18
    public $reason = ''; // shortstr
19
20
    public static function create(
21
        $reason = null
22
    )
23
    {
24
        $frame = new self();
25
26
        if (null !== $reason) {
27
            $frame->reason = $reason;
28
        }
29
30
        return $frame;
31
    }
32
}
33

PHPDaemon/Clients/AMQP/Driver/Protocol/v091/Protocol/Connection/ConnectionSecureFrame.php 1 location

@@ 13-32 (lines=20) @@
10
 * @author Aleksey I. Kuleshov YOU GLOBAL LIMITED
11
 * @package PHPDaemon\Clients\AMQP\Driver\Protocol\v091\Protocol\Connection
12
 */
13
class ConnectionSecureFrame implements MethodFrame, IncomingFrame
14
{
15
    const METHOD_ID = 0x000a0014;
16
17
    public $frameChannelId = 0;
18
    public $challenge; // longstr
19
20
    public static function create(
21
        $challenge = null
22
    )
23
    {
24
        $frame = new self();
25
26
        if (null !== $challenge) {
27
            $frame->challenge = $challenge;
28
        }
29
30
        return $frame;
31
    }
32
}
33