Code Duplication    Length = 8-8 lines in 2 locations

web_interface/astpp/application/libraries/html2pdf/_class/parsingCss.class.php 2 locations

@@ 1527-1534 (lines=8) @@
1524
        $res = true;
1525
1526
        // convert the first value
1527
        if ($css[0] == 'left')        $x = '0%';
1528
        else if ($css[0] == 'center') $x = '50%';
1529
        else if ($css[0] == 'right')  $x = '100%';
1530
        else if ($css[0] == 'top')    $y = '0%';
1531
        else if ($css[0] == 'bottom') $y = '100%';
1532
        else if (preg_match('/^[-]?[0-9\.]+%$/isU', $css[0])) $x = $css[0];
1533
        else if ($this->convertToMM($css[0])) $x = $this->convertToMM($css[0]);
1534
        else $res = false;
1535
1536
        // convert the second value
1537
        if ($css[1] == 'left')        $x = '0%';
@@ 1537-1544 (lines=8) @@
1534
        else $res = false;
1535
1536
        // convert the second value
1537
        if ($css[1] == 'left')        $x = '0%';
1538
        else if ($css[1] == 'right')  $x = '100%';
1539
        else if ($css[1] == 'top')    $y = '0%';
1540
        else if ($css[1] == 'center') $y = '50%';
1541
        else if ($css[1] == 'bottom') $y = '100%';
1542
        else if (preg_match('/^[-]?[0-9\.]+%$/isU', $css[1])) $y = $css[1];
1543
        else if ($this->convertToMM($css[1])) $y = $this->convertToMM($css[1]);
1544
        else $res = false;
1545
1546
        // return the values
1547
        return array($x, $y);