Code Duplication    Length = 3-3 lines in 2 locations

src/Components/WscMain.php 1 location

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

src/Components/Connection.php 1 location

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