Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 415-425 (lines=11) @@
412
        // init the curve
413
        $path = '';
414
415
        if ($ext1X - $cenX != 0) {
416
            $xt1 = $cenX + ($ext1X - $cenX);
417
            $yt1 = $cenY + ($ext2Y - $cenY) * self::MY_ARC;
418
            $xt2 = $cenX + ($ext1X - $cenX) * self::MY_ARC;
419
            $yt2 = $cenY + ($ext2Y - $cenY);
420
        } else {
421
            $xt1 = $cenX + ($ext2X - $cenX) * self::MY_ARC;
422
            $yt1 = $cenY + ($ext1Y - $cenY);
423
            $xt2 = $cenX + ($ext2X - $cenX);
424
            $yt2 = $cenY + ($ext1Y - $cenY) * self::MY_ARC;
425
        }
426
        $path .= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
427
        $path .= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
428
@@ 484-494 (lines=11) @@
481
        // init the curve
482
        $path = '';
483
484
        if ($ext1X - $cenX != 0) {
485
            $xt1 = $cenX + ($ext1X - $cenX);
486
            $yt1 = $cenY + ($ext2Y - $cenY) * self::MY_ARC;
487
            $xt2 = $cenX + ($ext1X - $cenX) * self::MY_ARC;
488
            $yt2 = $cenY + ($ext2Y - $cenY);
489
        } else {
490
            $xt1 = $cenX + ($ext2X - $cenX) * self::MY_ARC;
491
            $yt1 = $cenY + ($ext1Y - $cenY);
492
            $xt2 = $cenX + ($ext2X - $cenX);
493
            $yt2 = $cenY + ($ext1Y - $cenY) * self::MY_ARC;
494
        }
495
        $path .= sprintf('%.2F %.2F m ', $ext1X, $ext1Y);
496
        $path .= sprintf('%.2F %.2F %.2F %.2F %.2F %.2F c ', $xt1, $yt1, $xt2, $yt2, $ext2X, $ext2Y);
497
        $path .= sprintf('%.2F %.2F l ', $intX, $intY);