Code Duplication    Length = 3-3 lines in 2 locations

src/Components/Connection.php 1 location

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

src/Components/WscMain.php 1 location

@@ 341-343 (lines=3) @@
338
        }
339
340
        // Append payload to frame:
341
        for ($i = 0; $i < $payloadLen; $i++) {
342
            $frame .= ($masked === true) ? $payload[$i] ^ $mask[$i % 4] : $payload[$i];
343
        }
344
345
        $this->write($frame);
346
    }