Code Duplication    Length = 5-5 lines in 2 locations

api/src/Mail.php 2 locations

@@ 1644-1648 (lines=5) @@
1641
						// as attachment in order to not loose/miss information on our data
1642
						$partdisposition='attachment';//($partPrimaryType == 'image'&&!empty($cid)?'inline':'attachment');
1643
					}
1644
					if ($mime_type=='message/rfc822')
1645
					{
1646
						//error_log(__METHOD__.' ('.__LINE__.') '.' Uid:'.$uid.'->'.$mime_id.':'.array2string($part->contentTypeMap()));
1647
						foreach($part->contentTypeMap() as $sub_id => $sub_type) { if ($sub_id != $mime_id) $skipParts[$sub_id] = $sub_type;}
1648
					}
1649
					//error_log(__METHOD__.' ('.__LINE__.') '.' Uid:'.$uid.'->'.$mime_id.' Disp:'.$partdisposition.' Type:'.$partPrimaryType.' Skip:'.array2string($skipParts));
1650
					if (array_key_exists($mime_id,$skipParts)) continue;
1651
					if ($partdisposition=='attachment' ||
@@ 5604-5608 (lines=5) @@
5601
			$partPrimaryType = $part->getPrimaryType();
5602
			// we only want to retrieve the attachments of the current mail, not those of possible
5603
			// attached mails
5604
			if ($mime_type=='message/rfc822' && $_partID!=$mime_id)
5605
			{
5606
				//error_log(__METHOD__.' ('.__LINE__.') '.' Uid:'.$uid.'->'.$mime_id.':'.array2string($part->contentTypeMap()));
5607
				foreach($part->contentTypeMap() as $sub_id => $sub_type) {if ($sub_id != $mime_id) $skipParts[$sub_id] = $sub_type;}
5608
			}
5609
			if (empty($partDisposition) && $partPrimaryType != 'multipart' && $partPrimaryType != 'text')
5610
			{
5611
				// the absence of an partDisposition does not necessarily indicate there is no attachment. it may be an