Code Duplication    Length = 5-5 lines in 2 locations

api/src/Mail.php 2 locations

@@ 1664-1668 (lines=5) @@
1661
						// as attachment in order to not loose/miss information on our data
1662
						$partdisposition='attachment';//($partPrimaryType == 'image'&&!empty($cid)?'inline':'attachment');
1663
					}
1664
					if ($mime_type=='message/rfc822')
1665
					{
1666
						//error_log(__METHOD__.' ('.__LINE__.') '.' Uid:'.$uid.'->'.$mime_id.':'.array2string($part->contentTypeMap()));
1667
						foreach($part->contentTypeMap() as $sub_id => $sub_type) { if ($sub_id != $mime_id) $skipParts[$sub_id] = $sub_type;}
1668
					}
1669
					//error_log(__METHOD__.' ('.__LINE__.') '.' Uid:'.$uid.'->'.$mime_id.' Disp:'.$partdisposition.' Type:'.$partPrimaryType.' Skip:'.array2string($skipParts));
1670
					if (array_key_exists($mime_id,$skipParts)) continue;
1671
					if ($partdisposition=='attachment' ||
@@ 5645-5649 (lines=5) @@
5642
			$partPrimaryType = $part->getPrimaryType();
5643
			// we only want to retrieve the attachments of the current mail, not those of possible
5644
			// attached mails
5645
			if ($mime_type=='message/rfc822' && $_partID!=$mime_id)
5646
			{
5647
				//error_log(__METHOD__.' ('.__LINE__.') '.' Uid:'.$uid.'->'.$mime_id.':'.array2string($part->contentTypeMap()));
5648
				foreach($part->contentTypeMap() as $sub_id => $sub_type) {if ($sub_id != $mime_id) $skipParts[$sub_id] = $sub_type;}
5649
			}
5650
			if (empty($partDisposition) && $partPrimaryType != 'multipart' && $partPrimaryType != 'text')
5651
			{
5652
				// the absence of an partDisposition does not necessarily indicate there is no attachment. it may be an