Code Duplication    Length = 14-14 lines in 2 locations

lib/FPDF/src/fpdf_tpl.php 1 location

@@ 314-327 (lines=14) @@
311
            		$this->_out('/F'.$font['i'].' '.$font['n'].' 0 R');
312
            	$this->_out('>>');
313
            }
314
        	if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) ||
315
        	   isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls']))
316
        	{
317
                $this->_out('/XObject <<');
318
                if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) {
319
                    foreach($this->_res['tpl'][$tplidx]['images'] as $image)
320
              			$this->_out('/I'.$image['i'].' '.$image['n'].' 0 R');
321
                }
322
                if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) {
323
                    foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl)
324
                        $this->_out($this->tplprefix.$i.' '.$tpl['n'].' 0 R');
325
                }
326
                $this->_out('>>');
327
        	}
328
        	$this->_out('>>');
329
330
        	$this->_out('/Length '.strlen($p).' >>');

lib/FPDF/src/fpdi.php 1 location

@@ 312-325 (lines=14) @@
309
                		$this->_out('/F'.$font['i'].' '.$font['n'].' 0 R');
310
                	$this->_out('>>');
311
                }
312
            	if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) ||
313
            	   isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls']))
314
            	{
315
                    $this->_out('/XObject <<');
316
                    if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) {
317
                        foreach($this->_res['tpl'][$tplidx]['images'] as $image)
318
                  			$this->_out('/I'.$image['i'].' '.$image['n'].' 0 R');
319
                    }
320
                    if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) {
321
                        foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl)
322
                            $this->_out($this->tplprefix.$i.' '.$tpl['n'].' 0 R');
323
                    }
324
                    $this->_out('>>');
325
            	}
326
            	$this->_out('>>');
327
            }
328