Code Duplication    Length = 8-8 lines in 2 locations

api/src/Mail.php 2 locations

@@ 5190-5197 (lines=8) @@
5187
			$envelope = array_change_key_case($envelope,CASE_UPPER);
5188
			//if ($decode) _debug_array($envelope);
5189
			//error_log(__METHOD__.' ('.__LINE__.') '.array2string($envelope));
5190
			if ($decode)
5191
			{
5192
				foreach ($envelope as $key => $rvV)
5193
				{
5194
					//try idn conversion only on 'FROM', 'TO', 'CC', 'BCC', 'SENDER', 'REPLY-TO'
5195
					$envelope[$key]=self::decode_header($rvV,in_array($key,array('FROM', 'TO', 'CC', 'BCC', 'SENDER', 'REPLY-TO')));
5196
				}
5197
			}
5198
			return $envelope;
5199
		} else {
5200
@@ 5319-5326 (lines=8) @@
5316
			$retValue['SUBJECT'] = $retValue['SUBJECT'][count($retValue['SUBJECT'])-1];
5317
		}
5318
		//error_log(__METHOD__.' ('.__LINE__.') '.':'.array2string($decode ? self::decode_header($retValue,true):$retValue));
5319
		if ($decode)
5320
		{
5321
			foreach ($retValue as $key => $rvV)
5322
			{
5323
				//try idn conversion only on 'FROM', 'TO', 'CC', 'BCC', 'SENDER', 'REPLY-TO'
5324
				$retValue[$key]=self::decode_header($rvV,in_array($key,array('FROM', 'TO', 'CC', 'BCC', 'SENDER', 'REPLY-TO')));
5325
			}
5326
		}
5327
		return $retValue;
5328
	}
5329