Code Duplication    Length = 10-10 lines in 2 locations

PHPDaemon/Servers/HTTP/Connection.php 1 location

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

PHPDaemon/Servers/WebSocket/Connection.php 1 location

@@ 368-377 (lines=10) @@
365
			$this->state = self::STATE_HEADERS;
366
		}
367
368
		if ($this->state === self::STATE_HEADERS) {
369
			if (!$this->httpReadHeaders()) {
370
				return;
371
			}
372
			if (!$this->httpProcessHeaders()) {
373
				$this->finish();
374
				return;
375
			}
376
			$this->state = self::STATE_CONTENT;
377
		}
378
		if ($this->state === self::STATE_CONTENT) {
379
			$this->state = self::STATE_PREHANDSHAKE;
380
		}