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

@@ 149-151 (lines=3) @@
146
        $frame = implode('', $frameHead);
147
148
        // append payload to frame:
149
        for ($i = 0; $i < $payloadLength; $i++) {
150
            $frame .= ($masked === true) ? $payload[$i] ^ $mask[$i % 4] : $payload[$i];
151
        }
152
153
        return $frame;
154
    }