Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 880-892 (lines=13) @@
877
			$dataPos = 0;
878
			$eccPos = 0;
879
			$endfor = $this->rsBlockNum1($spec);
880
			for ($i = 0; $i < $endfor; ++$i) {
881
				$ecc = array_slice($this->ecccode, $eccPos);
882
				$this->rsblocks[$blockNo] = array();
883
				$this->rsblocks[$blockNo]['dataLength'] = $dl;
884
				$this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos);
885
				$this->rsblocks[$blockNo]['eccLength'] = $el;
886
				$ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc);
887
				$this->rsblocks[$blockNo]['ecc'] = $ecc;
888
				$this->ecccode = array_merge(array_slice($this->ecccode, 0, $eccPos), $ecc);
889
				$dataPos += $dl;
890
				$eccPos += $el;
891
				$blockNo++;
892
			}
893
			if ($this->rsBlockNum2($spec) == 0) {
894
				return 0;
895
			}
@@ 903-915 (lines=13) @@
900
				return -1;
901
			}
902
			$endfor = $this->rsBlockNum2($spec);
903
			for ($i = 0; $i < $endfor; ++$i) {
904
				$ecc = array_slice($this->ecccode, $eccPos);
905
				$this->rsblocks[$blockNo] = array();
906
				$this->rsblocks[$blockNo]['dataLength'] = $dl;
907
				$this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos);
908
				$this->rsblocks[$blockNo]['eccLength'] = $el;
909
				$ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc);
910
				$this->rsblocks[$blockNo]['ecc'] = $ecc;
911
				$this->ecccode = array_merge(array_slice($this->ecccode, 0, $eccPos), $ecc);
912
				$dataPos += $dl;
913
				$eccPos += $el;
914
				$blockNo++;
915
			}
916
			return 0;
917
		}
918