Code Duplication    Length = 10-10 lines in 3 locations

class/files/TDMCreatePhpCode.php 3 locations

@@ 396-405 (lines=10) @@
393
    *
394
    *  @return string
395
    */
396
    public function getPhpCodeArrayMerge($return, $left, $right, $isParam = false)
397
    {
398
        if ($isParam === false) {
399
            $ret = "\${$return} = array_merge({$left}, {$right});\n";
400
        } else {
401
            $ret = "array_merge({$left}, {$right})";
402
        }
403
404
        return $ret;
405
    }
406
407
    /*
408
    *  @public function getPhpCodeSprintf
@@ 458-467 (lines=10) @@
455
    *
456
    *  @return string
457
    */
458
    public function getPhpCodePregReplace($return, $exp, $str, $val, $isParam = false)
459
    {
460
        if ($isParam === false) {
461
            $ret = "\${$return} = preg_replace( '{$exp}', '{$str}', {$val});\n";
462
        } else {
463
            $ret = "preg_replace( '{$exp}', '{$str}', {$val})";
464
        }
465
466
        return $ret;
467
    }
468
469
    /*
470
    *  @public function getPhpCodePregMatch
@@ 479-488 (lines=10) @@
476
    *
477
    *  @return string
478
    */
479
    public function getPhpCodePregMatch($return, $exp, $str, $val, $isParam = false)
480
    {
481
        if ($isParam === false) {
482
            $ret = "\${$return} = preg_match( '{$exp}', '{$str}', {$val});\n";
483
        } else {
484
            $ret = "preg_match( '{$exp}', '{$str}', {$val})";
485
        }
486
487
        return $ret;
488
    }
489
490
    /*
491
    *  @public function getPhpCodeStrReplace