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

@@ 373-382 (lines=10) @@
370
			$this->state = self::STATE_HEADERS;
371
		}
372
373
		if ($this->state === self::STATE_HEADERS) {
374
			if (!$this->httpReadHeaders()) {
375
				return;
376
			}
377
			if (!$this->httpProcessHeaders()) {
378
				$this->finish();
379
				return;
380
			}
381
			$this->state = self::STATE_CONTENT;
382
		}
383
		if ($this->state === self::STATE_CONTENT) {
384
			$this->state = self::STATE_PREHANDSHAKE;
385
		}