Code Duplication    Length = 3-3 lines in 2 locations

includes/class-wpinv-item.php 1 location

@@ 438-440 (lines=3) @@
435
436
        if ( ! empty( $fees ) && ! empty( $type ) && 'all' !== $type ) {
437
            foreach( $fees as $key => $fee ) {
438
                if( ! empty( $fee['type'] ) && $type != $fee['type'] ) {
439
                    unset( $fees[ $key ] );
440
                }
441
            }
442
        }
443

includes/class-wpinv-invoice.php 1 location

@@ 1421-1423 (lines=3) @@
1418
1419
        if ( ! empty( $this->fees ) && is_array( $this->fees ) ) {
1420
            foreach ( $this->fees as $fee ) {
1421
                if( 'all' != $type && ! empty( $fee['type'] ) && $type != $fee['type'] ) {
1422
                    continue;
1423
                }
1424
1425
                $fee['label'] = stripslashes( $fee['label'] );
1426
                $fee['amount_display'] = wpinv_price( $fee['amount'], $this->get_currency() );