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
Pull Request — develop (#141)
by Gwenaël
14:16 queued 08:27
created
system/helpers/download_helper.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
 		if ($filename === '' OR $data === '')
67 67
 		{
68 68
 			return;
69
-		}
70
-		elseif ($data === NULL)
69
+		} elseif ($data === NULL)
71 70
 		{
72 71
 			if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE)
73 72
 			{
@@ -77,8 +76,7 @@  discard block
 block discarded – undo
77 76
 			$filepath = $filename;
78 77
 			$filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename));
79 78
 			$filename = end($filename);
80
-		}
81
-		else
79
+		} else
82 80
 		{
83 81
 			$filesize = strlen($data);
84 82
 		}
Please login to merge, or discard this patch.
system/helpers/file_helper.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -141,8 +141,7 @@  discard block
 block discarded – undo
141 141
 				if (is_dir($path.DIRECTORY_SEPARATOR.$filename) && $filename[0] !== '.')
142 142
 				{
143 143
 					delete_files($path.DIRECTORY_SEPARATOR.$filename, $del_dir, $htdocs, $_level + 1);
144
-				}
145
-				elseif ($htdocs !== TRUE OR ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename))
144
+				} elseif ($htdocs !== TRUE OR ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename))
146 145
 				{
147 146
 					@unlink($path.DIRECTORY_SEPARATOR.$filename);
148 147
 				}
@@ -190,8 +189,7 @@  discard block
 block discarded – undo
190 189
 				if (is_dir($source_dir.$file) && $file[0] !== '.')
191 190
 				{
192 191
 					get_filenames($source_dir.$file.DIRECTORY_SEPARATOR, $include_path, TRUE);
193
-				}
194
-				elseif ($file[0] !== '.')
192
+				} elseif ($file[0] !== '.')
195 193
 				{
196 194
 					$_filedata[] = ($include_path === TRUE) ? $source_dir.$file : $file;
197 195
 				}
@@ -242,8 +240,7 @@  discard block
 block discarded – undo
242 240
 				if (is_dir($source_dir.$file) && $file[0] !== '.' && $top_level_only === FALSE)
243 241
 				{
244 242
 					get_dir_file_info($source_dir.$file.DIRECTORY_SEPARATOR, $top_level_only, TRUE);
245
-				}
246
-				elseif ($file[0] !== '.')
243
+				} elseif ($file[0] !== '.')
247 244
 				{
248 245
 					$_filedata[$file] = get_file_info($source_dir.$file);
249 246
 					$_filedata[$file]['relative_path'] = $relative_path;
@@ -382,32 +379,25 @@  discard block
 block discarded – undo
382 379
 		if (($perms & 0xC000) === 0xC000)
383 380
 		{
384 381
 			$symbolic = 's'; // Socket
385
-		}
386
-		elseif (($perms & 0xA000) === 0xA000)
382
+		} elseif (($perms & 0xA000) === 0xA000)
387 383
 		{
388 384
 			$symbolic = 'l'; // Symbolic Link
389
-		}
390
-		elseif (($perms & 0x8000) === 0x8000)
385
+		} elseif (($perms & 0x8000) === 0x8000)
391 386
 		{
392 387
 			$symbolic = '-'; // Regular
393
-		}
394
-		elseif (($perms & 0x6000) === 0x6000)
388
+		} elseif (($perms & 0x6000) === 0x6000)
395 389
 		{
396 390
 			$symbolic = 'b'; // Block special
397
-		}
398
-		elseif (($perms & 0x4000) === 0x4000)
391
+		} elseif (($perms & 0x4000) === 0x4000)
399 392
 		{
400 393
 			$symbolic = 'd'; // Directory
401
-		}
402
-		elseif (($perms & 0x2000) === 0x2000)
394
+		} elseif (($perms & 0x2000) === 0x2000)
403 395
 		{
404 396
 			$symbolic = 'c'; // Character special
405
-		}
406
-		elseif (($perms & 0x1000) === 0x1000)
397
+		} elseif (($perms & 0x1000) === 0x1000)
407 398
 		{
408 399
 			$symbolic = 'p'; // FIFO pipe
409
-		}
410
-		else
400
+		} else
411 401
 		{
412 402
 			$symbolic = 'u'; // Unknown
413 403
 		}
Please login to merge, or discard this patch.
system/helpers/form_helper.php 1 patch
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -127,8 +127,7 @@  discard block
 block discarded – undo
127 127
 		if (is_string($attributes))
128 128
 		{
129 129
 			$attributes .= ' enctype="multipart/form-data"';
130
-		}
131
-		else
130
+		} else
132 131
 		{
133 132
 			$attributes['enctype'] = 'multipart/form-data';
134 133
 		}
@@ -174,8 +173,7 @@  discard block
 block discarded – undo
174 173
 		if ( ! is_array($value))
175 174
 		{
176 175
 			$form .= '<input type="hidden" name="'.$name.'" value="'.html_escape($value)."\" />\n";
177
-		}
178
-		else
176
+		} else
179 177
 		{
180 178
 			foreach ($value as $k => $v)
181 179
 			{
@@ -281,8 +279,7 @@  discard block
 block discarded – undo
281 279
 		if ( ! is_array($data) OR ! isset($data['value']))
282 280
 		{
283 281
 			$val = $value;
284
-		}
285
-		else
282
+		} else
286 283
 		{
287 284
 			$val = $data['value'];
288 285
 			unset($data['value']); // textareas don't use the value attribute
@@ -349,8 +346,7 @@  discard block
 block discarded – undo
349 346
 				$options = $data['options'];
350 347
 				unset($data['options']); // select tags don't use an options attribute
351 348
 			}
352
-		}
353
-		else
349
+		} else
354 350
 		{
355 351
 			$defaults = array('name' => $data);
356 352
 		}
@@ -367,8 +363,7 @@  discard block
 block discarded – undo
367 363
 				{
368 364
 					$selected = array($_POST[$data['name']]);
369 365
 				}
370
-			}
371
-			elseif (isset($_POST[$data]))
366
+			} elseif (isset($_POST[$data]))
372 367
 			{
373 368
 				$selected = array($_POST[$data]);
374 369
 			}
@@ -401,8 +396,7 @@  discard block
 block discarded – undo
401 396
 				}
402 397
 
403 398
 				$form .= "</optgroup>\n";
404
-			}
405
-			else
399
+			} else
406 400
 			{
407 401
 				$form .= '<option value="'.html_escape($key).'"'
408 402
 					.(in_array($key, $selected) ? ' selected="selected"' : '').'>'
@@ -438,8 +432,7 @@  discard block
 block discarded – undo
438 432
 			if ($checked == FALSE)
439 433
 			{
440 434
 				unset($data['checked']);
441
-			}
442
-			else
435
+			} else
443 436
 			{
444 437
 				$data['checked'] = 'checked';
445 438
 			}
@@ -448,8 +441,7 @@  discard block
 block discarded – undo
448 441
 		if ($checked == TRUE)
449 442
 		{
450 443
 			$defaults['checked'] = 'checked';
451
-		}
452
-		else
444
+		} else
453 445
 		{
454 446
 			unset($defaults['checked']);
455 447
 		}
@@ -721,8 +713,7 @@  discard block
 block discarded – undo
721 713
 		if (isset($CI->form_validation) && is_object($CI->form_validation) && $CI->form_validation->has_rule($field))
722 714
 		{
723 715
 			return $CI->form_validation->set_select($field, $value, $default);
724
-		}
725
-		elseif (($input = $CI->input->post($field, FALSE)) === NULL)
716
+		} elseif (($input = $CI->input->post($field, FALSE)) === NULL)
726 717
 		{
727 718
 			return ($default === TRUE) ? ' selected="selected"' : '';
728 719
 		}
@@ -940,8 +931,7 @@  discard block
 block discarded – undo
940 931
 			if ($key === 'value')
941 932
 			{
942 933
 				$val = html_escape($val);
943
-			}
944
-			elseif ($key === 'name' && ! strlen($default['name']))
934
+			} elseif ($key === 'name' && ! strlen($default['name']))
945 935
 			{
946 936
 				continue;
947 937
 			}
Please login to merge, or discard this patch.
system/helpers/html_helper.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -147,8 +147,7 @@  discard block
 block discarded – undo
147 147
 			if ( ! is_array($val))
148 148
 			{
149 149
 				$out .= $val;
150
-			}
151
-			else
150
+			} else
152 151
 			{
153 152
 				$out .= $_last_list_item."\n"._list($type, $val, '', $depth + 4).str_repeat(' ', $depth + 2);
154 153
 			}
@@ -197,13 +196,11 @@  discard block
 block discarded – undo
197 196
 				if ($index_page === TRUE)
198 197
 				{
199 198
 					$img .= ' src="'.get_instance()->config->site_url($v).'"';
200
-				}
201
-				else
199
+				} else
202 200
 				{
203 201
 					$img .= ' src="'.get_instance()->config->slash_item('base_url').$v.'"';
204 202
 				}
205
-			}
206
-			else
203
+			} else
207 204
 			{
208 205
 				$img .= ' '.$k.'="'.$v.'"';
209 206
 			}
@@ -289,29 +286,24 @@  discard block
 block discarded – undo
289 286
 					if ($index_page === TRUE)
290 287
 					{
291 288
 						$link .= 'href="'.$CI->config->site_url($v).'" ';
292
-					}
293
-					else
289
+					} else
294 290
 					{
295 291
 						$link .= 'href="'.$CI->config->slash_item('base_url').$v.'" ';
296 292
 					}
297
-				}
298
-				else
293
+				} else
299 294
 				{
300 295
 					$link .= $k.'="'.$v.'" ';
301 296
 				}
302 297
 			}
303
-		}
304
-		else
298
+		} else
305 299
 		{
306 300
 			if (preg_match('#^([a-z]+:)?//#i', $href))
307 301
 			{
308 302
 				$link .= 'href="'.$href.'" ';
309
-			}
310
-			elseif ($index_page === TRUE)
303
+			} elseif ($index_page === TRUE)
311 304
 			{
312 305
 				$link .= 'href="'.$CI->config->site_url($href).'" ';
313
-			}
314
-			else
306
+			} else
315 307
 			{
316 308
 				$link .= 'href="'.$CI->config->slash_item('base_url').$href.'" ';
317 309
 			}
@@ -353,8 +345,7 @@  discard block
 block discarded – undo
353 345
 		if ( ! is_array($name))
354 346
 		{
355 347
 			$name = array(array('name' => $name, 'content' => $content, 'type' => $type, 'newline' => $newline));
356
-		}
357
-		elseif (isset($name['name']))
348
+		} elseif (isset($name['name']))
358 349
 		{
359 350
 			// Turn single array into multidimensional
360 351
 			$name = array($name);
Please login to merge, or discard this patch.
system/helpers/number_helper.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,23 +67,19 @@
 block discarded – undo
67 67
 		{
68 68
 			$num = round($num / 1099511627776, $precision);
69 69
 			$unit = $CI->lang->line('terabyte_abbr');
70
-		}
71
-		elseif ($num >= 1000000000)
70
+		} elseif ($num >= 1000000000)
72 71
 		{
73 72
 			$num = round($num / 1073741824, $precision);
74 73
 			$unit = $CI->lang->line('gigabyte_abbr');
75
-		}
76
-		elseif ($num >= 1000000)
74
+		} elseif ($num >= 1000000)
77 75
 		{
78 76
 			$num = round($num / 1048576, $precision);
79 77
 			$unit = $CI->lang->line('megabyte_abbr');
80
-		}
81
-		elseif ($num >= 1000)
78
+		} elseif ($num >= 1000)
82 79
 		{
83 80
 			$num = round($num / 1024, $precision);
84 81
 			$unit = $CI->lang->line('kilobyte_abbr');
85
-		}
86
-		else
82
+		} else
87 83
 		{
88 84
 			$unit = $CI->lang->line('bytes');
89 85
 			return number_format($num).' '.$unit;
Please login to merge, or discard this patch.
system/helpers/path_helper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@
 block discarded – undo
70 70
 		if (realpath($path) !== FALSE)
71 71
 		{
72 72
 			$path = realpath($path);
73
-		}
74
-		elseif ($check_existance && ! is_dir($path) && ! is_file($path))
73
+		} elseif ($check_existance && ! is_dir($path) && ! is_file($path))
75 74
 		{
76 75
 			show_error('Not a valid path: '.$path);
77 76
 		}
Please login to merge, or discard this patch.
system/helpers/smiley_helper.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,8 +117,7 @@  discard block
 block discarded – undo
117 117
 				}
118 118
 			}
119 119
 EOF;
120
-		}
121
-		elseif (is_array($alias))
120
+		} elseif (is_array($alias))
122 121
 		{
123 122
 			foreach ($alias as $name => $id)
124 123
 			{
@@ -152,8 +151,7 @@  discard block
 block discarded – undo
152 151
 		if (is_array($alias))
153 152
 		{
154 153
 			$smileys = $alias;
155
-		}
156
-		elseif (FALSE === ($smileys = _get_smiley_array()))
154
+		} elseif (FALSE === ($smileys = _get_smiley_array()))
157 155
 		{
158 156
 			return FALSE;
159 157
 		}
Please login to merge, or discard this patch.
system/helpers/text_helper.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -155,8 +155,7 @@  discard block
 block discarded – undo
155 155
 				}
156 156
 
157 157
 				$out .= $str[$i];
158
-			}
159
-			else
158
+			} else
160 159
 			{
161 160
 				if (count($temp) === 0)
162 161
 				{
@@ -213,12 +212,10 @@  discard block
 block discarded – undo
213 212
 				{
214 213
 					$out .= chr($digits);
215 214
 
216
-				}
217
-				elseif ($digits < 2048)
215
+				} elseif ($digits < 2048)
218 216
 				{
219 217
 					$out .= chr(192 + (($digits - ($digits % 64)) / 64)).chr(128 + ($digits % 64));
220
-				}
221
-				else
218
+				} else
222 219
 				{
223 220
 					$out .= chr(224 + (($digits - ($digits % 4096)) / 4096))
224 221
 						.chr(128 + ((($digits % 4096) - ($digits % 64)) / 64))
@@ -278,8 +275,7 @@  discard block
 block discarded – undo
278 275
 			if ($replacement !== '')
279 276
 			{
280 277
 				$str = preg_replace("/({$delim})(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")({$delim})/i", "\\1{$replacement}\\3", $str);
281
-			}
282
-			else
278
+			} else
283 279
 			{
284 280
 				$str = preg_replace("/({$delim})(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")({$delim})/ie", "'\\1'.str_repeat('#', strlen('\\2')).'\\3'", $str);
285 281
 			}
@@ -486,8 +482,7 @@  discard block
 block discarded – undo
486 482
 			if ($temp !== '')
487 483
 			{
488 484
 				$output .= $temp."\n".$line."\n";
489
-			}
490
-			else
485
+			} else
491 486
 			{
492 487
 				$output .= $line."\n";
493 488
 			}
@@ -538,8 +533,7 @@  discard block
 block discarded – undo
538 533
 		if ($position === 1)
539 534
 		{
540 535
 			$end = mb_substr($str, 0, -($max_length - mb_strlen($beg)));
541
-		}
542
-		else
536
+		} else
543 537
 		{
544 538
 			$end = mb_substr($str, -($max_length - mb_strlen($beg)));
545 539
 		}
Please login to merge, or discard this patch.
system/helpers/url_helper.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -213,13 +213,11 @@  discard block
 block discarded – undo
213 213
 
214 214
 			// Ref: http://www.w3schools.com/jsref/met_win_open.asp
215 215
 			$window_name = '_blank';
216
-		}
217
-		elseif ( ! empty($attributes['window_name']))
216
+		} elseif ( ! empty($attributes['window_name']))
218 217
 		{
219 218
 			$window_name = $attributes['window_name'];
220 219
 			unset($attributes['window_name']);
221
-		}
222
-		else
220
+		} else
223 221
 		{
224 222
 			$window_name = '_blank';
225 223
 		}
@@ -308,8 +306,7 @@  discard block
 block discarded – undo
308 306
 					}
309 307
 					$x[] = '"';
310 308
 				}
311
-			}
312
-			else
309
+			} else
313 310
 			{
314 311
 				for ($i = 0, $l = strlen($attributes); $i < $l; $i++)
315 312
 				{
@@ -328,8 +325,7 @@  discard block
 block discarded – undo
328 325
 			if ($ordinal < 128)
329 326
 			{
330 327
 				$x[] = '|'.$ordinal;
331
-			}
332
-			else
328
+			} else
333 329
 			{
334 330
 				if (count($temp) === 0)
335 331
 				{
@@ -482,8 +478,7 @@  discard block
 block discarded – undo
482 478
 		if ($separator === 'dash')
483 479
 		{
484 480
 			$separator = '-';
485
-		}
486
-		elseif ($separator === 'underscore')
481
+		} elseif ($separator === 'underscore')
487 482
 		{
488 483
 			$separator = '_';
489 484
 		}
@@ -540,16 +535,14 @@  discard block
 block discarded – undo
540 535
 		if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== FALSE)
541 536
 		{
542 537
 			$method = 'refresh';
543
-		}
544
-		elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
538
+		} elseif ($method !== 'refresh' && (empty($code) OR ! is_numeric($code)))
545 539
 		{
546 540
 			if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $_SERVER['SERVER_PROTOCOL'] === 'HTTP/1.1')
547 541
 			{
548 542
 				$code = ($_SERVER['REQUEST_METHOD'] !== 'GET')
549 543
 					? 303	// reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
550 544
 					: 307;
551
-			}
552
-			else
545
+			} else
553 546
 			{
554 547
 				$code = 302;
555 548
 			}
Please login to merge, or discard this patch.