Code Duplication    Length = 6-6 lines in 2 locations

src/Http/Request.php 2 locations

@@ 43-48 (lines=6) @@
40
	public function getServerProtocol() {
41
		$forwardedProto = $this->server('HTTP_X_FORWARDED_PROTO');
42
		if (!is_null($forwardedProto)) {
43
			if (strpos($forwardedProto, ',') !== false) {
44
				$parts = explode(',', $forwardedProto);
45
				$proto = strtolower(trim($parts[0]));
46
			} else {
47
				$proto = strtolower($forwardedProto);
48
			}
49
50
			// Verify that the protocol is always HTTP or HTTPS
51
			// default to http if an invalid value is provided
@@ 70-75 (lines=6) @@
67
		$host = 'localhost';
68
		$forwardedHost = $this->server('HTTP_X_FORWARDED_HOST');
69
		if (!is_null($forwardedHost)) {
70
			if (strpos($forwardedHost, ',') !== false) {
71
				$parts = explode(',', $forwardedHost);
72
				$host = trim(current($parts));
73
			} else {
74
				$host = $forwardedHost;
75
			}
76
		} else {
77
			$httpHost = $this->server('HTTP_HOST');
78
			if (is_null($httpHost)) {