Code Duplication    Length = 14-14 lines in 2 locations

web_interface/astpp/application/libraries/html2pdf/_tcpdf_5.0.002/barcodes.php 2 locations

@@ 708-721 (lines=14) @@
705
		$len = strlen($seq);
706
		$w = 0;
707
		$k = 0;
708
		for ($i = 0; $i < $len; ++$i) {
709
			$w += 1;
710
			if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i + 1)}))) {
711
				if ($seq{$i} == '1') {
712
					$t = true; // bar
713
				} else {
714
					$t = false; // space
715
				}
716
				$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
717
				$bararray['maxw'] += $w;
718
				++$k;
719
				$w = 0;
720
			}
721
		}
722
		return $bararray;
723
	}
724
	
@@ 1161-1174 (lines=14) @@
1158
		}
1159
		$clen = strlen($seq);
1160
		$w = 0;
1161
		for ($i = 0; $i < $clen; ++$i) {
1162
			$w += 1;
1163
			if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i + 1)}))) {
1164
				if ($seq{$i} == '1') {
1165
					$t = true; // bar
1166
				} else {
1167
					$t = false; // space
1168
				}
1169
				$bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0);
1170
				$bararray['maxw'] += $w;
1171
				++$k;
1172
				$w = 0;
1173
			}
1174
		}
1175
		return $bararray;
1176
	}
1177