Code Duplication    Length = 3-3 lines in 2 locations

src/Components/WSClientTrait.php 1 location

@@ 236-238 (lines=3) @@
233
        }
234
235
        // Append payload to frame:
236
        for ($i = 0; $i < $payloadLen; $i++) {
237
            $frame .= ($masked === true) ? $payload[$i] ^ $mask[$i % 4] : $payload[$i];
238
        }
239
240
        $this->write($frame);
241
    }

src/Components/Connection.php 1 location

@@ 162-164 (lines=3) @@
159
        $frame = implode('', $frameHead);
160
161
        // append payload to frame:
162
        for ($i = 0; $i < $payloadLength; $i++) {
163
            $frame .= ($masked === true) ? $payload[$i] ^ $mask[$i % 4] : $payload[$i];
164
        }
165
166
        return $frame;
167
    }