Code Duplication    Length = 18-19 lines in 2 locations

includes/wpinv-helper-functions.php 2 locations

@@ 262-280 (lines=19) @@
259
    $symbol = wpinv_currency_symbol( $currency );
260
261
    if ( $position == 'left' || $position == 'left_space' ) {
262
        switch ( $currency ) {
263
            case "GBP" :
264
            case "BRL" :
265
            case "EUR" :
266
            case "USD" :
267
            case "AUD" :
268
            case "CAD" :
269
            case "HKD" :
270
            case "MXN" :
271
            case "NZD" :
272
            case "SGD" :
273
            case "JPY" :
274
                $price = $position == 'left_space' ? $symbol . ' ' .  $amount : $symbol . $amount;
275
                break;
276
            default :
277
                //$price = $currency . ' ' . $amount;
278
                $price = $position == 'left_space' ? $symbol . ' ' .  $amount : $symbol . $amount;
279
                break;
280
        }
281
    } else {
282
        switch ( $currency ) {
283
            case "GBP" :
@@ 282-299 (lines=18) @@
279
                break;
280
        }
281
    } else {
282
        switch ( $currency ) {
283
            case "GBP" :
284
            case "BRL" :
285
            case "EUR" :
286
            case "USD" :
287
            case "AUD" :
288
            case "CAD" :
289
            case "HKD" :
290
            case "MXN" :
291
            case "SGD" :
292
            case "JPY" :
293
                $price = $position == 'right_space' ? $amount . ' ' .  $symbol : $amount . $symbol;
294
                break;
295
            default :
296
                //$price = $amount . ' ' . $currency;
297
                $price = $position == 'right_space' ? $amount . ' ' .  $symbol : $amount . $symbol;
298
                break;
299
        }
300
    }
301
    
302
    if ( $negative ) {