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 = 19-22 lines in 2 locations

modules/importer/ttimport.class.php 1 location

@@ 547-565 (lines=19) @@
544
	 * @param string $buff
545
	 * @return string
546
	 */
547
	function saveTemporaryFile($fp, $buff)
548
	{
549
		$temp_filename = $this->getTmpFilename();
550
		$buff = substr($buff, 9);
551
552
		while(!feof($fp))
553
		{
554
			$str = trim(fgets($fp, 1024));
555
			$buff .= $str;
556
			if(substr($str, -10) == '</content>') break;
557
		}
558
559
		$buff = substr($buff, 0, -10);
560
561
		$f = fopen($temp_filename, "w");
562
		fwrite($f, base64_decode($buff));
563
		fclose($f);
564
		return $temp_filename;
565
	}
566
567
	/**
568
	 * Replace img tag in the ttxml

modules/importer/importer.admin.controller.php 1 location

@@ 1204-1225 (lines=22) @@
1201
	 * @param resource $fp
1202
	 * @return string
1203
	 */
1204
	function saveTemporaryFile($fp)
1205
	{
1206
		$temp_filename = $this->getTmpFilename();
1207
		$f = fopen($temp_filename, "w");
1208
1209
		$buff = '';
1210
		while(!feof($fp))
1211
		{
1212
			$str = trim(fgets($fp, 1024));
1213
			if(trim($str) == '</file>') break;
1214
1215
			$buff .= $str;
1216
1217
			if(substr($buff,-7)=='</buff>')
1218
			{
1219
				fwrite($f, base64_decode(substr($buff, 6, -7)));
1220
				$buff = '';
1221
			}
1222
		}
1223
		fclose($f);
1224
		return $temp_filename;
1225
	}
1226
1227
1228
	/**