Code Duplication    Length = 22-24 lines in 2 locations

web_interface/astpp/application/libraries/html2pdf/html2pdf.php 2 locations

@@ 2507-2530 (lines=24) @@
2504
         * @param  array $param
2505
         * @return boolean
2506
         */
2507
        protected function _tag_close_PAGE_HEADER_SUB($param)
2508
        {
2509
            if ($this->_isForOneLine) {
2510
            	return false;
2511
            }
2512
2513
            $this->parsingCss->load();
2514
2515
            // restore the stat
2516
            $this->parsingCss->value = $this->_subSTATES['s'];
2517
            $this->parsingCss->table = $this->_subSTATES['t'];
2518
            $this->_pageMarges       = $this->_subSTATES['mp'];
2519
            $this->_margeLeft        = $this->_subSTATES['ml'];
2520
            $this->_margeRight       = $this->_subSTATES['mr'];
2521
            $this->_margeTop         = $this->_subSTATES['mt'];
2522
            $this->_margeBottom      = $this->_subSTATES['mb'];
2523
            $this->pdf->SetMargins($this->_margeLeft, $this->_margeTop, $this->_margeRight);
2524
            $this->pdf->setbMargin($this->_margeBottom);
2525
            $this->pdf->SetAutoPageBreak(false, $this->_margeBottom);
2526
            $this->pdf->setXY($this->_subSTATES['x'], $this->_subSTATES['y']);
2527
2528
            $this->parsingCss->fontSet();
2529
            $this->_maxH = 0;
2530
2531
            return true;
2532
        }
2533
@@ 2596-2617 (lines=22) @@
2593
         * @param  array $param
2594
         * @return boolean
2595
         */
2596
        protected function _tag_close_PAGE_FOOTER_SUB($param)
2597
        {
2598
            if ($this->_isForOneLine) {
2599
            	return false;
2600
            }
2601
2602
            $this->parsingCss->load();
2603
2604
            $this->parsingCss->value                = $this->_subSTATES['s'];
2605
            $this->parsingCss->table                = $this->_subSTATES['t'];
2606
            $this->_pageMarges = $this->_subSTATES['mp'];
2607
            $this->_margeLeft = $this->_subSTATES['ml'];
2608
            $this->_margeRight = $this->_subSTATES['mr'];
2609
            $this->_margeTop = $this->_subSTATES['mt'];
2610
            $this->_margeBottom = $this->_subSTATES['mb'];
2611
            $this->pdf->SetMargins($this->_margeLeft, $this->_margeTop, $this->_margeRight);
2612
            $this->pdf->SetAutoPageBreak(false, $this->_margeBottom);
2613
            $this->pdf->setXY($this->_subSTATES['x'], $this->_subSTATES['y']);
2614
2615
            $this->parsingCss->fontSet();
2616
            $this->_maxH = 0;
2617
2618
            return true;
2619
        }
2620