Code Duplication    Length = 18-19 lines in 2 locations

includes/wpinv-helper-functions.php 2 locations

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