Code Duplication    Length = 10-10 lines in 2 locations

PHPDaemon/Servers/HTTP/Connection.php 1 location

@@ 278-287 (lines=10) @@
275
            $this->state = self::STATE_HEADERS;
276
        }
277
278
        if ($this->state === self::STATE_HEADERS) {
279
            if (!$this->httpReadHeaders()) {
280
                return;
281
            }
282
            if (!$this->httpProcessHeaders()) {
283
                $this->finish();
284
                return;
285
            }
286
            $this->state = self::STATE_CONTENT;
287
        }
288
        if ($this->state === self::STATE_CONTENT) {
289
            if (!isset($this->req->attrs->input) || !$this->req->attrs->input) {
290
                $this->finish();

PHPDaemon/Servers/WebSocket/Connection.php 1 location

@@ 384-393 (lines=10) @@
381
            $this->state = self::STATE_HEADERS;
382
        }
383
384
        if ($this->state === self::STATE_HEADERS) {
385
            if (!$this->httpReadHeaders()) {
386
                return;
387
            }
388
            if (!$this->httpProcessHeaders()) {
389
                $this->finish();
390
                return;
391
            }
392
            $this->state = self::STATE_CONTENT;
393
        }
394
        if ($this->state === self::STATE_CONTENT) {
395
            $this->state = self::STATE_PREHANDSHAKE;
396
        }