Code Duplication    Length = 12-12 lines in 2 locations

3rdparty/getID3/demos/demo.mp3header.php 1 location

@@ 467-478 (lines=12) @@
464
}
465
466
if (!function_exists('Dec2Bin')) {
467
	function Dec2Bin($number) {
468
		while ($number >= 256) {
469
			$bytes[] = (($number / 256) - (floor($number / 256))) * 256;
470
			$number = floor($number / 256);
471
		}
472
		$bytes[] = $number;
473
		$binstring = '';
474
		for ($i = 0; $i < count($bytes); $i++) {
475
			$binstring = (($i == count($bytes) - 1) ? decbin($bytes[$i]) : str_pad(decbin($bytes[$i]), 8, '0', STR_PAD_LEFT)).$binstring;
476
		}
477
		return $binstring;
478
	}
479
}
480
481
if (!function_exists('Bin2Dec')) {

3rdparty/getID3/getid3/getid3.lib.php 1 location

@@ 432-443 (lines=12) @@
429
	 *
430
	 * @return string
431
	 */
432
	public static function Dec2Bin($number) {
433
		while ($number >= 256) {
434
			$bytes[] = (($number / 256) - (floor($number / 256))) * 256;
435
			$number = floor($number / 256);
436
		}
437
		$bytes[] = $number;
438
		$binstring = '';
439
		for ($i = 0; $i < count($bytes); $i++) {
440
			$binstring = (($i == count($bytes) - 1) ? decbin($bytes[$i]) : str_pad(decbin($bytes[$i]), 8, '0', STR_PAD_LEFT)).$binstring;
441
		}
442
		return $binstring;
443
	}
444
445
	/**
446
	 * @param string $binstring