Code Duplication    Length = 6-6 lines in 2 locations

src/Protocol/Publish.php 2 locations

@@ 53-58 (lines=6) @@
50
51
        // Check QoS level and perform the corresponding actions
52
        switch ($this->message->getQoSLevel()) {
53
            case 1:
54
                $this->specialFlags |= 2;
55
                $this->logger->debug('Activating QoS level 1 bit', ['specialFlags' => $this->specialFlags]);
56
                $this->packetIdentifier++;
57
                $bitString .= Utilities::convertNumberToBinaryString($this->packetIdentifier);
58
                break;
59
            case 2:
60
                $this->specialFlags |= 4;
61
                $this->logger->debug('Activating QoS level 2 bit', ['specialFlags' => $this->specialFlags]);
@@ 59-64 (lines=6) @@
56
                $this->packetIdentifier++;
57
                $bitString .= Utilities::convertNumberToBinaryString($this->packetIdentifier);
58
                break;
59
            case 2:
60
                $this->specialFlags |= 4;
61
                $this->logger->debug('Activating QoS level 2 bit', ['specialFlags' => $this->specialFlags]);
62
                $this->packetIdentifier++;
63
                $bitString .= Utilities::convertNumberToBinaryString($this->packetIdentifier);
64
                break;
65
            default:
66
                break;
67
        }