Code Duplication    Length = 3-3 lines in 2 locations

includes/class-wpinv-invoice.php 1 location

@@ 1441-1443 (lines=3) @@
1438
1439
        if ( ! empty( $this->fees ) && is_array( $this->fees ) ) {
1440
            foreach ( $this->fees as $fee ) {
1441
                if( 'all' != $type && ! empty( $fee['type'] ) && $type != $fee['type'] ) {
1442
                    continue;
1443
                }
1444
1445
                $fee['label'] = stripslashes( $fee['label'] );
1446
                $fee['amount_display'] = wpinv_price( $fee['amount'], $this->get_currency() );

includes/class-wpinv-item.php 1 location

@@ 460-462 (lines=3) @@
457
458
        if ( ! empty( $fees ) && ! empty( $type ) && 'all' !== $type ) {
459
            foreach( $fees as $key => $fee ) {
460
                if( ! empty( $fee['type'] ) && $type != $fee['type'] ) {
461
                    unset( $fees[ $key ] );
462
                }
463
            }
464
        }
465