Code Duplication    Length = 12-12 lines in 2 locations

PHPDaemon/Clients/AMQP/Driver/Protocol/v091/Parser/MethodFrameParserTrait.php 2 locations

@@ 65-76 (lines=12) @@
62
63
                // method "connection.secure"
64
            }
65
            if ($method === 20) {
66
                $frame = new Connection\ConnectionSecureFrame();
67
68
                // consume "challenge" (longstr)
69
                list(, $length) = \unpack('N', $this->buffer);
70
                $frame->challenge = mb_orig_substr($this->buffer, 4, $length);
71
                $this->buffer = mb_orig_substr($this->buffer, 4 + $length);
72
73
                return $frame;
74
75
                // method "connection.tune"
76
            }
77
            if ($method === 30) {
78
                $frame = new Connection\ConnectionTuneFrame();
79
@@ 157-168 (lines=12) @@
154
        }
155
        if ($class === 20) {
156
            // method "channel.open-ok"
157
            if ($method === 11) {
158
                $frame = new Channel\ChannelOpenOkFrame();
159
160
                // consume "channel-id" (longstr)
161
                list(, $length) = \unpack('N', $this->buffer);
162
                $frame->channelId = mb_orig_substr($this->buffer, 4, $length);
163
                $this->buffer = mb_orig_substr($this->buffer, 4 + $length);
164
165
                return $frame;
166
167
                // method "channel.flow"
168
            }
169
            if ($method === 20) {
170
                $frame = new Channel\ChannelFlowFrame();
171