Code Duplication    Length = 3-3 lines in 2 locations

includes/class-wpinv-invoice.php 1 location

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

includes/class-wpinv-item.php 1 location

@@ 399-401 (lines=3) @@
396
397
        if ( ! empty( $fees ) && ! empty( $type ) && 'all' !== $type ) {
398
            foreach( $fees as $key => $fee ) {
399
                if( ! empty( $fee['type'] ) && $type != $fee['type'] ) {
400
                    unset( $fees[ $key ] );
401
                }
402
            }
403
        }
404