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

@@ 184-186 (lines=3) @@
181
        $frame = implode('', $frameHead);
182
183
        // append payload to frame:
184
        for ($i = 0; $i < $payloadLength; $i++) {
185
            $frame .= ($masked === true) ? $payload[$i] ^ $mask[$i % 4] : $payload[$i];
186
        }
187
188
        return $frame;
189
    }