Code Duplication    Length = 6-6 lines in 2 locations

PHPDaemon/SockJS/Session.php 2 locations

@@ 306-311 (lines=6) @@
303
                    return;
304
                }
305
                $reflush = false;
306
                if (sizeof($this->buffer) > $bsize) {
307
                    $this->buffer = array_slice($this->buffer, $bsize);
308
                    $reflush = true;
309
                } else {
310
                    $this->buffer = [];
311
                }
312
313
                if (sizeof($this->framesBuffer) > $fbsize) {
314
                    $this->framesBuffer = array_slice($this->framesBuffer, $fbsize);
@@ 313-318 (lines=6) @@
310
                    $this->buffer = [];
311
                }
312
313
                if (sizeof($this->framesBuffer) > $fbsize) {
314
                    $this->framesBuffer = array_slice($this->framesBuffer, $fbsize);
315
                    $reflush = true;
316
                } else {
317
                    $this->framesBuffer = [];
318
                }
319
                $this->onWrite();
320
                if ($reflush && in_array('stream', $this->pollMode)) {
321
                    $this->flush();