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.

Code Duplication    Length = 22-22 lines in 2 locations

system/helpers/file_helper.php 1 location

@@ 85-106 (lines=22) @@
82
	 * @param	string	$mode	fopen() mode (default: 'wb')
83
	 * @return	bool
84
	 */
85
	function write_file($path, $data, $mode = 'wb')
86
	{
87
		if ( ! $fp = @fopen($path, $mode))
88
		{
89
			return FALSE;
90
		}
91
92
		flock($fp, LOCK_EX);
93
94
		for ($result = $written = 0, $length = strlen($data); $written < $length; $written += $result)
95
		{
96
			if (($result = fwrite($fp, substr($data, $written))) === FALSE)
97
			{
98
				break;
99
			}
100
		}
101
102
		flock($fp, LOCK_UN);
103
		fclose($fp);
104
105
		return is_int($result);
106
	}
107
}
108
109
// ------------------------------------------------------------------------

system/libraries/Zip.php 1 location

@@ 419-440 (lines=22) @@
416
	 * @param	string	$filepath	the file name
417
	 * @return	bool
418
	 */
419
	public function archive($filepath)
420
	{
421
		if ( ! ($fp = @fopen($filepath, 'w+b')))
422
		{
423
			return FALSE;
424
		}
425
426
		flock($fp, LOCK_EX);
427
428
		for ($result = $written = 0, $data = $this->get_zip(), $length = strlen($data); $written < $length; $written += $result)
429
		{
430
			if (($result = fwrite($fp, substr($data, $written))) === FALSE)
431
			{
432
				break;
433
			}
434
		}
435
436
		flock($fp, LOCK_UN);
437
		fclose($fp);
438
439
		return is_int($result);
440
	}
441
442
	// --------------------------------------------------------------------
443