Code Duplication    Length = 6-7 lines in 4 locations

3rdparty/getID3/getid3/module.audio.avr.php 1 location

@@ 73-78 (lines=6) @@
70
71
		$info['avr']['raw']['magic'] = substr($AVRheader,  0,  4);
72
		$magic = '2BIT';
73
		if ($info['avr']['raw']['magic'] != $magic) {
74
			$this->error('Expecting "'.getid3_lib::PrintHexBytes($magic).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($info['avr']['raw']['magic']).'"');
75
			unset($info['fileformat']);
76
			unset($info['avr']);
77
			return false;
78
		}
79
		$info['avdataoffset'] += 128;
80
81
		$info['avr']['sample_name']        =         rtrim(substr($AVRheader,  4,  8));

3rdparty/getID3/getid3/module.audio.dsf.php 1 location

@@ 39-45 (lines=7) @@
36
		$info['dsf']['dsd']['magic'] = substr($dsfheader, $headeroffset, 4);
37
		$headeroffset += 4;
38
		$magic = 'DSD ';
39
		if ($info['dsf']['dsd']['magic'] != $magic) {
40
			$this->error('Expecting "'.getid3_lib::PrintHexBytes($magic).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($info['dsf']['dsd']['magic']).'"');
41
			unset($info['fileformat']);
42
			unset($info['audio']);
43
			unset($info['dsf']);
44
			return false;
45
		}
46
		$info['dsf']['dsd']['dsd_chunk_size']     = getid3_lib::LittleEndian2Int(substr($dsfheader, $headeroffset, 8)); // should be 28
47
		$headeroffset += 8;
48
		$info['dsf']['dsd']['dsf_file_size']      = getid3_lib::LittleEndian2Int(substr($dsfheader, $headeroffset, 8));

3rdparty/getID3/getid3/module.audio.tta.php 1 location

@@ 36-42 (lines=7) @@
33
34
		$info['tta']['magic'] = substr($ttaheader, 0, 3);
35
		$magic = 'TTA';
36
		if ($info['tta']['magic'] != $magic) {
37
			$this->error('Expecting "'.getid3_lib::PrintHexBytes($magic).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($info['tta']['magic']).'"');
38
			unset($info['fileformat']);
39
			unset($info['audio']);
40
			unset($info['tta']);
41
			return false;
42
		}
43
44
		switch ($ttaheader[3]) {
45
			case "\x01": // TTA v1.x

3rdparty/getID3/getid3/module.graphic.gif.php 1 location

@@ 42-47 (lines=6) @@
39
		$offset += 3;
40
41
		$magic = 'GIF';
42
		if ($info['gif']['header']['raw']['identifier'] != $magic) {
43
			$this->error('Expecting "'.getid3_lib::PrintHexBytes($magic).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($info['gif']['header']['raw']['identifier']).'"');
44
			unset($info['fileformat']);
45
			unset($info['gif']);
46
			return false;
47
		}
48
49
		//if (!$this->getid3->option_extra_info) {
50
		//	$this->warning('GIF Extensions and Global Color Table not returned due to !getid3->option_extra_info');