Code Duplication    Length = 14-14 lines in 2 locations

tcpdi/fpdf_tpl.php 1 location

@@ 409-422 (lines=14) @@
406
                    $this->_out('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R');
407
                $this->_out('>>');
408
            }
409
            if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || 
410
               isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls']))
411
            {
412
                $this->_out('/XObject <<');
413
                if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) {
414
                    foreach($this->_res['tpl'][$tplidx]['images'] as $image)
415
                          $this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R');
416
                }
417
                if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) {
418
                    foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl)
419
                        $this->_out($this->tplprefix . $i . ' ' . $tpl['n'] . ' 0 R');
420
                }
421
                $this->_out('>>');
422
            }
423
            $this->_out('>>');
424
            
425
            $this->_out('/Length ' . strlen($p) . ' >>');

tcpdi/tcpdi.php 1 location

@@ 505-518 (lines=14) @@
502
                        $this->_out('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R');
503
                    $this->_out('>>');
504
                }
505
                if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) ||
506
                    isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls']))
507
                {
508
                    $this->_out('/XObject <<');
509
                    if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) {
510
                        foreach($this->_res['tpl'][$tplidx]['images'] as $image)
511
                            $this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R');
512
                    }
513
                    if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) {
514
                        foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl)
515
                            $this->_out($this->tplprefix . $i . ' ' . $tpl['n'] . ' 0 R');
516
                    }
517
                    $this->_out('>>');
518
                }
519
                $this->_out('>>');
520
            }
521