GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Branch master (c527a4)
by w3l
04:25
created
holt45.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@  discard block
 block discarded – undo
5 5
  * @example if(chk_get("s") == "a") instead of if(isset($_GET["s"]) && $_GET["s"] == "a")
6 6
  */
7 7
 function chk_get($key) {
8
-    if (!isset($_GET[$key])) {
9
-        return false;
10
-    }
11
-    return $_GET[$key];
8
+	if (!isset($_GET[$key])) {
9
+		return false;
10
+	}
11
+	return $_GET[$key];
12 12
 }
13 13
 
14 14
 /**
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
  * @example if(chk_post("s") == "a") instead of if(isset($_POST["s"]) && $_POST["s"] == "a")
18 18
  */
19 19
 function chk_post($key) {
20
-    if (!isset($_POST[$key])) {
21
-        return false;
22
-    }
23
-    return $_POST[$key];
20
+	if (!isset($_POST[$key])) {
21
+		return false;
22
+	}
23
+	return $_POST[$key];
24 24
 }
25 25
 
26 26
 /**
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 function chk_get_all($keys) {
32 32
 	$s = true;
33 33
 
34
-	foreach($keys AS $key) {
34
+	foreach ($keys AS $key) {
35 35
 	
36 36
 		if (empty($_GET[$key])) {
37 37
 			$s = false;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 function chk_post_all($keys) {
49 49
 	$s = true;
50 50
 
51
-	foreach($keys AS $key) {
51
+	foreach ($keys AS $key) {
52 52
 	
53 53
 		if (empty($_POST[$key])) {
54 54
 			$s = false;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
  * For use in "Last-Modified" headers.
64 64
  */
65 65
 function timestamp_to_http_date($timestamp) {
66
-	if($timestamp == NULL) { return NULL; }
66
+	if ($timestamp == NULL) { return NULL; }
67 67
 	return gmdate("D, d M Y H:i:s T", strtotime($timestamp));
68 68
 }
69 69
 
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
 
77 77
 	if (getenv('HTTP_CLIENT_IP'))
78 78
 		return getenv('HTTP_CLIENT_IP');
79
-	else if(getenv('HTTP_X_FORWARDED_FOR'))
79
+	else if (getenv('HTTP_X_FORWARDED_FOR'))
80 80
 		return getenv('HTTP_X_FORWARDED_FOR');
81
-	else if(getenv('HTTP_X_FORWARDED'))
81
+	else if (getenv('HTTP_X_FORWARDED'))
82 82
 		return getenv('HTTP_X_FORWARDED');
83
-	else if(getenv('HTTP_FORWARDED_FOR'))
83
+	else if (getenv('HTTP_FORWARDED_FOR'))
84 84
 		return getenv('HTTP_FORWARDED_FOR');
85
-	else if(getenv('HTTP_FORWARDED'))
85
+	else if (getenv('HTTP_FORWARDED'))
86 86
 		return getenv('HTTP_FORWARDED');
87
-	else if(getenv('REMOTE_ADDR'))
87
+	else if (getenv('REMOTE_ADDR'))
88 88
 		return getenv('REMOTE_ADDR');
89 89
 	else
90 90
 		return '127.0.0.1'; // Unknown IP
@@ -107,14 +107,14 @@  discard block
 block discarded – undo
107 107
 function url_parser($url) {
108 108
 	
109 109
 	// multiple /// messes up parse_url, replace 3 or more with 2
110
-	$url = preg_replace('/(\/{2,})/','//',$url);
110
+	$url = preg_replace('/(\/{2,})/', '//', $url);
111 111
 	
112 112
 	$parse_url = parse_url($url);
113 113
 	
114
-	if(empty($parse_url["scheme"])) {
114
+	if (empty($parse_url["scheme"])) {
115 115
 		$parse_url["scheme"] = "http";
116 116
 	}
117
-	if(empty($parse_url["host"]) && !empty($parse_url["path"])) {
117
+	if (empty($parse_url["host"]) && !empty($parse_url["path"])) {
118 118
 		// Strip slash from the beginning of path
119 119
 		$parse_url["host"] = ltrim($parse_url["path"], '\/');
120 120
 		$parse_url["path"] = "";
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	$url_array = array("url" => "", "url_display" => "");
124 124
 	
125 125
 	// Check if scheme is correct
126
-	if(!in_array($parse_url["scheme"], array("http", "https", "gopher"))) {
126
+	if (!in_array($parse_url["scheme"], array("http", "https", "gopher"))) {
127 127
 		$url_array["url"] .= 'http'.'://';
128 128
 	} else {
129 129
 		$url_array["url"] .= $parse_url["scheme"].'://';
@@ -138,28 +138,28 @@  discard block
 block discarded – undo
138 138
 	$explode_host = array_values($explode_host);
139 139
 	
140 140
 	// Contains subdomain
141
-	if(count($explode_host) > 2) {
141
+	if (count($explode_host) > 2) {
142 142
 		// Check if subdomain only contains the letter w(then not any other subdomain).
143
-		if(substr_count($explode_host[0], 'w') == strlen($explode_host[0])) {
143
+		if (substr_count($explode_host[0], 'w') == strlen($explode_host[0])) {
144 144
 			// Replace with "www" to avoid "ww" or "wwww", etc.
145 145
 			$explode_host[0] = "www";
146 146
 			
147 147
 		}
148 148
 	}
149 149
 
150
-	$url_array["url"] .= implode(".",$explode_host);
151
-	$url_array["url_display"] = trim(implode(".",$explode_host), '\/'); // Removes trailing slash
150
+	$url_array["url"] .= implode(".", $explode_host);
151
+	$url_array["url_display"] = trim(implode(".", $explode_host), '\/'); // Removes trailing slash
152 152
 	
153
-	if(!empty($parse_url["port"])) {
153
+	if (!empty($parse_url["port"])) {
154 154
 		$url_array["url"] .= ":".$parse_url["port"];
155 155
 	}
156
-	if(!empty($parse_url["path"])) {
156
+	if (!empty($parse_url["path"])) {
157 157
 		$url_array["url"] .= $parse_url["path"];
158 158
 	}
159
-	if(!empty($parse_url["query"])) {
159
+	if (!empty($parse_url["query"])) {
160 160
 		$url_array["url"] .= '?'.$parse_url["query"];
161 161
 	}
162
-	if(!empty($parse_url["fragment"])) {
162
+	if (!empty($parse_url["fragment"])) {
163 163
 		$url_array["url"] .= '#'.$parse_url["fragment"];
164 164
 	}
165 165
 
Please login to merge, or discard this patch.
Braces   +16 added lines, -14 removed lines patch added patch discarded remove patch
@@ -74,20 +74,22 @@
 block discarded – undo
74 74
  */
75 75
 function get_client_ip_address() {
76 76
 
77
-	if (getenv('HTTP_CLIENT_IP'))
78
-		return getenv('HTTP_CLIENT_IP');
79
-	else if(getenv('HTTP_X_FORWARDED_FOR'))
80
-		return getenv('HTTP_X_FORWARDED_FOR');
81
-	else if(getenv('HTTP_X_FORWARDED'))
82
-		return getenv('HTTP_X_FORWARDED');
83
-	else if(getenv('HTTP_FORWARDED_FOR'))
84
-		return getenv('HTTP_FORWARDED_FOR');
85
-	else if(getenv('HTTP_FORWARDED'))
86
-		return getenv('HTTP_FORWARDED');
87
-	else if(getenv('REMOTE_ADDR'))
88
-		return getenv('REMOTE_ADDR');
89
-	else
90
-		return '127.0.0.1'; // Unknown IP
77
+	if (getenv('HTTP_CLIENT_IP')) {
78
+			return getenv('HTTP_CLIENT_IP');
79
+	} else if(getenv('HTTP_X_FORWARDED_FOR')) {
80
+			return getenv('HTTP_X_FORWARDED_FOR');
81
+	} else if(getenv('HTTP_X_FORWARDED')) {
82
+			return getenv('HTTP_X_FORWARDED');
83
+	} else if(getenv('HTTP_FORWARDED_FOR')) {
84
+			return getenv('HTTP_FORWARDED_FOR');
85
+	} else if(getenv('HTTP_FORWARDED')) {
86
+			return getenv('HTTP_FORWARDED');
87
+	} else if(getenv('REMOTE_ADDR')) {
88
+			return getenv('REMOTE_ADDR');
89
+	} else {
90
+			return '127.0.0.1';
91
+	}
92
+	// Unknown IP
91 93
 }
92 94
 
93 95
 /**
Please login to merge, or discard this patch.