Code Duplication    Length = 3-3 lines in 2 locations

includes/class-wpinv-item.php 1 location

@@ 391-393 (lines=3) @@
388
389
        if ( ! empty( $fees ) && ! empty( $type ) && 'all' !== $type ) {
390
            foreach( $fees as $key => $fee ) {
391
                if( ! empty( $fee['type'] ) && $type != $fee['type'] ) {
392
                    unset( $fees[ $key ] );
393
                }
394
            }
395
        }
396

includes/class-wpinv-invoice.php 1 location

@@ 1429-1431 (lines=3) @@
1426
1427
        if ( ! empty( $this->fees ) && is_array( $this->fees ) ) {
1428
            foreach ( $this->fees as $fee ) {
1429
                if( 'all' != $type && ! empty( $fee['type'] ) && $type != $fee['type'] ) {
1430
                    continue;
1431
                }
1432
1433
                $fee['label'] = stripslashes( $fee['label'] );
1434
                $fee['amount_display'] = wpinv_price( $fee['amount'], $this->get_currency() );