Code Duplication    Length = 10-10 lines in 3 locations

class/files/TDMCreatePhpCode.php 3 locations

@@ 452-461 (lines=10) @@
449
    *
450
    *  @return string
451
    */
452
    public function getPhpCodeArrayMerge($return, $left, $right, $isParam = false)
453
    {
454
        if ($isParam === false) {
455
            $ret = "\${$return} = array_merge({$left}, {$right});\n";
456
        } else {
457
            $ret = "array_merge({$left}, {$right})";
458
        }
459
460
        return $ret;
461
    }
462
463
    /*
464
    *  @public function getPhpCodeSprintf
@@ 514-523 (lines=10) @@
511
    *
512
    *  @return string
513
    */
514
    public function getPhpCodePregReplace($return, $exp, $str, $val, $isParam = false)
515
    {
516
        if ($isParam === false) {
517
            $ret = "\${$return} = preg_replace( '{$exp}', '{$str}', {$val});\n";
518
        } else {
519
            $ret = "preg_replace( '{$exp}', '{$str}', {$val})";
520
        }
521
522
        return $ret;
523
    }
524
525
    /*
526
    *  @public function getPhpCodePregMatch
@@ 535-544 (lines=10) @@
532
    *
533
    *  @return string
534
    */
535
    public function getPhpCodePregMatch($return, $exp, $str, $val, $isParam = false)
536
    {
537
        if ($isParam === false) {
538
            $ret = "\${$return} = preg_match( '{$exp}', '{$str}', {$val});\n";
539
        } else {
540
            $ret = "preg_match( '{$exp}', '{$str}', {$val})";
541
        }
542
543
        return $ret;
544
    }
545
546
    /*
547
    *  @public function getPhpCodeStrReplace