Code Duplication    Length = 5-9 lines in 2 locations

core/EE_Session.core.php 2 locations

@@ 568-572 (lines=5) @@
565
             if ($session_data) {
566
                 $session_data = preg_replace_callback(
567
                     '!s:(d+):"(.*?)";!',
568
                     function ($match) {
569
                         return $match[1] === strlen($match[2])
570
                             ? $match[0]
571
                             : 's:' . strlen($match[2]) . ':"' . $match[2] . '";';
572
                     },
573
                     $session_data
574
                 );
575
             }
@@ 1075-1083 (lines=9) @@
1072
		$error = '<pre>';
1073
		 $data2 = preg_replace_callback(
1074
			 '!s:(\d+):"(.*?)";!',
1075
			 function ( $match ) {
1076
				 return ( $match[1] === strlen( $match[2] ) )
1077
					 ? $match[0]
1078
					 : 's:'
1079
					   . strlen( $match[2] )
1080
					   . ':"'
1081
					   . $match[2]
1082
					   . '";';
1083
			 },
1084
			 $data1
1085
		 );
1086
		$max = ( strlen( $data1 ) > strlen( $data2 ) ) ? strlen( $data1 ) : strlen( $data2 );