Code Duplication    Length = 18-19 lines in 2 locations

includes/wpinv-helper-functions.php 2 locations

@@ 515-533 (lines=19) @@
512
    $symbol = wpinv_currency_symbol( $currency );
513
514
    if ( $position == 'left' || $position == 'left_space' ) {
515
        switch ( $currency ) {
516
            case "GBP" :
517
            case "BRL" :
518
            case "EUR" :
519
            case "USD" :
520
            case "AUD" :
521
            case "CAD" :
522
            case "HKD" :
523
            case "MXN" :
524
            case "NZD" :
525
            case "SGD" :
526
            case "JPY" :
527
                $price = $position == 'left_space' ? $symbol . ' ' .  $amount : $symbol . $amount;
528
                break;
529
            default :
530
                //$price = $currency . ' ' . $amount;
531
                $price = $position == 'left_space' ? $symbol . ' ' .  $amount : $symbol . $amount;
532
                break;
533
        }
534
    } else {
535
        switch ( $currency ) {
536
            case "GBP" :
@@ 535-552 (lines=18) @@
532
                break;
533
        }
534
    } else {
535
        switch ( $currency ) {
536
            case "GBP" :
537
            case "BRL" :
538
            case "EUR" :
539
            case "USD" :
540
            case "AUD" :
541
            case "CAD" :
542
            case "HKD" :
543
            case "MXN" :
544
            case "SGD" :
545
            case "JPY" :
546
                $price = $position == 'right_space' ? $amount . ' ' .  $symbol : $amount . $symbol;
547
                break;
548
            default :
549
                //$price = $amount . ' ' . $currency;
550
                $price = $position == 'right_space' ? $amount . ' ' .  $symbol : $amount . $symbol;
551
                break;
552
        }
553
    }
554
    
555
    if ( $negative ) {