Code Duplication    Length = 3-3 lines in 2 locations

src/Components/Connection.php 1 location

@@ 118-120 (lines=3) @@
115
        $frame = implode('', $frameHead);
116
117
        // append payload to frame:
118
        for ($i = 0; $i < $payloadLength; $i++) {
119
            $frame .= ($masked === true) ? $payload[$i] ^ $mask[$i % 4] : $payload[$i];
120
        }
121
122
        return $frame;
123
    }

src/Components/WscMain.php 1 location

@@ 296-298 (lines=3) @@
293
        }
294
295
        // Append payload to frame:
296
        for ($i = 0; $i < $payloadLen; $i++) {
297
            $frame .= ($masked === true) ? $payload[$i] ^ $mask[$i % 4] : $payload[$i];
298
        }
299
300
        $this->write($frame);
301
    }